For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

Blender Vertex Mesh export Plugin [V1.2.5].

Questions and tools for modelling.
Post Reply
User avatar
luke11685
OldUnreal Member
Posts: 441
Joined: Wed Mar 28, 2018 5:38 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by luke11685 »

Can you tell me how can I extract JazzMeshes(in ue1 classes list browser) from Unreal Editor 1(only by using it to unpack it without using user Gildor's Unreal Model Viewer) to later import it in Blender by using this plugin/add-on?
User avatar
MrRobotBear
OldUnreal Member
Posts: 22
Joined: Sat May 10, 2014 9:14 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by MrRobotBear »

Uhm, I don't think UnrealEd1 supports exporting models. Can't you use the WOTgreal Exporter?
User avatar
luke11685
OldUnreal Member
Posts: 441
Joined: Wed Mar 28, 2018 5:38 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by luke11685 »

I didn't know that. Is this tool WOTgreal Exporter also unpacking and packing Unreal package content to editor?
Last edited by luke11685 on Sat Sep 28, 2019 6:51 am, edited 1 time in total.
User avatar
MrRobotBear
OldUnreal Member
Posts: 22
Joined: Sat May 10, 2014 9:14 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by MrRobotBear »

It's an exporter only, you point it to a folder of Unreal packages and select what you want to export.
User avatar
luke11685
OldUnreal Member
Posts: 441
Joined: Wed Mar 28, 2018 5:38 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by luke11685 »

Because JazzMeshes when exported/unpacked by this tool later then it can be packed by using Unreal Editor 1,right?
User avatar
Skywolf
OldUnreal Member
Posts: 880
Joined: Sun Aug 02, 2009 12:20 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by Skywolf »

First of all, thanks for doing my work of finding all these issues :P. Lets go over them:
When importing static meshes with animations:
  • I get an index out of range when I try to import a static mesh, with only the "Still" animation frame. Maybe that's cause "From Frame" is set to 1 (not possible to set to 0)? Something similar happens if I set "From Frame" to a number the Mesh doesn't have. Would it be possible to add some null check, or if "From Frame" is larger than the number of Frames in the _a.3d then start at the first frame? It makes little sense to start at the last frame since we want animations.
  • I also get a Shape key with Frame0 that prevents me from applying certain modifiers (easy to delete though), might be a bit of a hack, but perhaps check if there is only one frame, then don't make a shape key at all? Sometimes I don't know if it's a mesh with animations or not, so I just want to import with animations to make sure. If this is possible then we could just keep the Animation box ticked all the time, unless we know we don't want animations.
Importing in general:
  • Would it be possible to have Import format auto-sensing? Like it could check if it conforms to the ION Storm format, and if so use that? I only work on Deus Ex, and it's a bit of a pain to always change the format when importing meshes. Sometimes I forget and have to redo it. It doesn't seem possible to save this an default. While it won't resolve having to select the correct format when exporting, at least with this I don't have to do it when importing.
  • Sometimes when importing and using "Make Materials" (which I always use), the materials are not properly named in sequence (all materials start with 000). I haven't been able to pinpoint what triggers it, certain meshes does this when imported while others are fine. If you want to try it, import this with Animations in the ION Storm format: https://www.dropbox.com/s/5sfs81rorhap5 ... 1.zip?dl=1
    Edit: This happens when there is only one material, but different polys have different polyflags. However in the resulting .uc file I still get texture imports and settexture for all of the materials and not just one per number.
  • Also when using "Make Materials" I noticed that there is an extra underscore in the material name on import like 001_TRANSLUCENT__UNLIT_ I'm not sure if this affects the polyflags set and if it works with both one underscore and two, but should probably be fixed. Also not sure if the underscore at the end is needed. In your first post you specify the modifiers with a leading underscore but then in the examples you also have a underscore at the end.
When exporting:
  • When exporting using Timeline I don't need to select the mesh when in Object mode, regardless of your instructions to select the mesh. In my case I started with an empty scene, imported a mesh and made my edit to it directly. I have nothing else like armatures, lights or cameras in the scene. However if I have it unselected and in Edit mode I get an index out of range. I'm not sure if this is fixable, but if it's possible to make it behave the same as in object mode that would be nice.
  • If LODFRAME=0, which is the default, could you make it not add that to the .uc file? It doesn't do anything since it's default in the engine too.
  • When I do UV in Blender need to set the material to use the texture belonging to the mesh. I set the Material to use Nodes, then Surface to Diffuse BSDF and then Color to Image texture and I open the texture (not sure if I can use Image textures in another way). Side note: I only work with .bmp for Deus Ex, unless I really need .pcx due to a bug in the TextureFactory when importing/exporting really small .bmp images. This works fine. But then in the .uc file after export it doesn't strip the .bmp from the Texture name so I end up with

    Code: Select all

    #exec TEXTURE IMPORT NAME=LightSwitchTex1.bmp FILE=Textures\LightSwitchTex1.bmp.PCX
    Could you perhaps make it recognize both .bmp and .pcx and use the correct extension in FILE and strip the extension in NAME?
  • If the material is not set to Masked, don't set FLAGS=2 in the .uc file. You could also set the FLAGS to the polyflags for the material, like if it's NoSmooth then FLAGS=2048 and if both masked and NoSmooth then it's 2050. However that's a matter of taste, since maybe you don't want to import the texture with the flags, just cause the material uses it.
1&2: I simply went for your suggestion and made it not add any shape keys when the file only has one frame of animation. This also solved the issue with the index out of range error.

3: Done
4: The multiple materials are normal. Else there wouldnt really be a way to export the polyflags and polytypes correctly. Having multiple lines for a single texnum isn't though. So I fixed that.
5: Simple typo. Fixed it.

6: All I can do is forcing the object in object mode when it isn't in that already. But this is literally one tap of the tab key for the user so can't really be bothered. Most exporters I know of don't like it when you are in edit mode and mine isn't any different :P
7: Don't really see why I would change that. If that's the default then it does no harm to leave it there while making it easier for the user to adjust the LODframe without having to either re-export or manually type the line.
8:Huh, didn't know UCC accepted .bmp. Fixed that and the double extension issue. A left over from the old way of getting the texture name before 2.8 removed Blender's internal renderer.
9: Not sure if I entirely understand you but from what I get you want the exporter to use Blender's material settings for polyflags/types? If so I considered it but found it would be rather inconsistent to what you have to adjust to get various polyflags/types. To avoid confusion I just decided to not make it care for your material/texture settings other than the image texture node.
I've been messing around a bit with animated meshes now and found some more things.
  • It took a while for me to notice, but in order to export all the frames you must set the current frame to 0, otherwise it will start at the frame you are at and repeat it. Like I had a mesh with two frames. If I stand on frame 1 instead of 0 it will export frame 1 twice to fill both frames. Presumably you'd like to export all the frames regardless of the current frame in the timeline. Could you change the exporter to start at frame 0?
  • Something that makes this even more confusing is that if you stand on frame 0 and then export, the exporter will run trough all frames and end up on the last frame. If you don't catch that and export again it would appear as if the animation suddenly broke with no changes at all. Would it perhaps be possible to save aside the current frame you are on and after export restore to that frame? Would be a nice combo with the previous point as well, or just the notion that the mesh is invariant when run through the exporter.
  • As I know, some modifiers can't be used with shape keys (can any?). I added a Edge Split modifier just to see how it would look, but you can't actually press apply since Blender won't allow you. Then I forgot that it was added to the stack but not applied, and I went about my business and did other stuff and eventually exported the mesh. Frame 0 looks good, then all hell breaks loose. Eventually I realized it was the modifier that was left there. Could the exporter warn about that, or would you have to hardcode every illegal modifier if shape keys are present?
10: This seems to be a bug in Blender 2.8. If you start on a different frame than the first frame of your animation that uses shape keys and export then the first frame of the exported animation will be the frame you were on when you exported. However, even the mesh in blender is affected by this. Having its first frame stuck at this frame until you either click in the shape keys list or enter and exit edit mode. Doing the exact same commands from my exporter in the python console makes it work as intended. So again, seems like Blender is screwing something up.
11: Made it jump back to the first frame of exported animations now. The Importer already did this so really just laziness on my side.
12: Can't really do that as the thing that screws up is the change in vertex count. Depending on how you configure a modifier can it either work or not. In case of edge split I assume you used the default settings which makes it angle based. And the angle of the edges change constantly as the mesh deforms during animations. Checking Sharp Edges only works fine as you now manually tell it which edges to split. And therefore have a consistent vertex count. To make things more clear I did make it catch changes in the vertex count and raise an exception when it does.

TL:DR: V1.3.5:
https://www.dropbox.com/s/s42mp3uokkhdx ... 5.zip?dl=0

Changlog:

Code: Select all

#   1.3.5 - 28/7/2019
#       -Fixed the _TRANSLUCENT_ flag when importing and exporting materials to _TRANSLUCENT.
#       -Added automatic detection of the model format.
#       -Made importer not create any keyframes nor set any animation data if the mesh only has 1 frame of animation.
#       -Exporter now checks for changes in vertex count to avoid unexpected breaking of animations due to procedural modifiers and the like.
#       -Exporter now returns to the starting frame of the last exported animation to make re-exporting easier.
#       -Importer now adds the name of the file to the material name. This is to ensure the material for the model is unique.
#       -Fixed Importer only looking for materials in the created objects rather than all materials. This caused a new material to be made for each polygon using a material that already existed but wasn't used on the created object.
#       -Fixed Exporter writing multiple #exec texture import lines for materials that share the same texnum.
#       -Exporter now accepts both .BMP and .PCX extensions for textures when writing the .uc file. Any texture that isn't either of the two gets changed to .PCX. Also fixes issue where files got double file extensions.
Last edited by Skywolf on Sat Sep 28, 2019 9:18 pm, edited 1 time in total.
I hate it when people ask me what my favorite game is. Just try to explain you're not talking about Unreal Tournament ::).
User avatar
luke11685
OldUnreal Member
Posts: 441
Joined: Wed Mar 28, 2018 5:38 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by luke11685 »

Actually this WOTgreal is promming related only tool. What am I suppose to do with it?
User avatar
MrRobotBear
OldUnreal Member
Posts: 22
Joined: Sat May 10, 2014 9:14 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by MrRobotBear »

Skywolf, this is awesome! Thanks for looking into my feedback. I grabbed the latest version now to test. I do have some follow up questions/clarifications though.

3. I still have the format picker on import and still have to select the correct format. Did I miss something?

6. No worries. Didn't realize it's a general "problem" to be in Edit mode and exporting. Didn't know you could switch with Tab either, so thanks! I just started with using Blender this week, so it's all pretty new to me.

7. I was thinking it doesn't make sense to bloat the .uc files with parameters you don't need. I've never seen a DeusEx mesh that has this set, neither in the original game or from a mod. What I do use occasionally is the MESH LODPARAMS STRENGTH parameter to make it less aggressive, but since that's always a bit of trial and error I do it manually. However if this is a used feature to use LODFRAME it makes sense to keep it. From my POV it was just some random LOD parameter.

8. Maybe the BMP texture factory doesn't exist in earlier engine versions? It does for Deus Ex though, and I would assume games based around the same engine version like UT. However it looks like it still doesn't work for me. I assigned a texture using Nodes as I described earlier, and now the .uc file looks like this:

Code: Select all

#exec TEXTURE IMPORT NAME=Switch1Tex1.bmp FILE=Textures\Switch1Tex1.PCX GROUP=Skins FLAGS=2
#exec MESHMAP SETTEXTURE MESHMAP=Switch1 NUM=0 TEXTURE=Switch1Tex1.bmp
9. When you import something as masked (FLAGS=2) it uses the first color of the palette to determine the masking color (and thus make anything that color invisible). While this is as intended for textures that are made that way (like have magenta as their first color, and then use it only on the area you want to mask out), if I would to take a regular texture, and import it that way, it would potentially be full of holes. That texture could have a commonly used color of blue as it's first color, and making it invisible is not what you want.
So, my suggestion was to check if any material slot in the texnum has any masked flag set (in the material name), if not import the texture normally in the .uc, otherwise with flags=2.

10. Ah. After looking at the bugtracker it sounds a bit like this bug: https://developer.blender.org/T68878 Maybe they'll sort it out eventually.

12. I was really suggesting like checking "Would Blender allow this modifier or would it reject it? If it won't allow it, then just ignore it when exporting." I sort of can understand that it would increase the vertex count, which in itself would be causing issues with the next frame. But I like your solution better now of allowing it if it doesn't mess with the vertex count.

A question, why does the material name have to be unique? And wouldn't it be if you were to import any model, as everything gets imported into one object?

Also, did you see the post about the mesh where one material is not in the correct order for some reason?
User avatar
MrRobotBear
OldUnreal Member
Posts: 22
Joined: Sat May 10, 2014 9:14 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by MrRobotBear »

luke11685, not WOTGreal itself, but the exporter. However it might not work as it should I saw now.

I just use HTK's FullBatchExport cmdlet from ucc. However try opening the mesh package in UED2.1 from 227 and see if that's able to export the models.
Last edited by MrRobotBear on Sun Sep 29, 2019 9:00 pm, edited 1 time in total.
User avatar
luke11685
OldUnreal Member
Posts: 441
Joined: Wed Mar 28, 2018 5:38 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by luke11685 »

From UT99 level editor?
User avatar
MrRobotBear
OldUnreal Member
Posts: 22
Joined: Sat May 10, 2014 9:14 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by MrRobotBear »

No... Install Unreal 1, then install the OldUnreal 227i patch and use UnrealEd that came with that. Load up your package and then export the meshes.
User avatar
luke11685
OldUnreal Member
Posts: 441
Joined: Wed Mar 28, 2018 5:38 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by luke11685 »

Do you also this problem like I have that we can't check versions of older Unreal Editor 1? I hope this error message that occured in my default internet browser Microsoft Edge won't appear if I will feel need and want to check the latest Unreal patch version 227i,right?
Image
Last edited by luke11685 on Wed Oct 02, 2019 1:26 pm, edited 1 time in total.
User avatar
Skywolf2
Posts: 1
Joined: Sun Oct 06, 2019 5:23 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by Skywolf2 »

Sorry for the late response. Had a busy week and I'm also unable to login to my old account. (Already e-mailed Smirftsch about this).

3.Are you sure you installed the plugin via Bender's Preferences and restarted Blender before checking? Because it works fine here. But Blender tends to not fully update things until you restart it.

8. My bad. Fixed it already for the next version.

9. Will see if I can make a check for Flags=2. Although you can always just uncheck bMasked in the texture properties as far as I know.

As to why material names have to be unique: Imagine you import two models both with polygons that use texture slot 000 and have no special flag (_NORMAL). You import the first, the importer checks what name a material should have based on the polyflags (000_NORMAL in this case), It then moves on to the next polygons and does the same. This time it sees the material already exists so it just assigns those polygons the material 000_NORMAL.

Now you import another model. It checks for what the material name it should have but now it detects the material already exists. So it assigns the same material from the previous model. Preventing you from giving each model their own texture.



User avatar
luke11685
OldUnreal Member
Posts: 441
Joined: Wed Mar 28, 2018 5:38 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by luke11685 »

Will this solve my problem with exporting _a.3d and _d.3d files? Because someone here asked me to send _a.3d and _d.3d files before.
User avatar
MrRobotBear
OldUnreal Member
Posts: 22
Joined: Sat May 10, 2014 9:14 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by MrRobotBear »

No worries, I figured you got busy, been quite busy myself.

Ah, now the "Automatic" option appears when I checked now (barely touched Blender since my last post to you). What was strange was that the other fixes were in except that one, somehow I would expect it to either not update or fully update, not like a partial update. Weird.

Where can I find the bMasked property?

Didn't consider multiple imports into the same .blend file, glad you caught that.

As for the materials in the wrong order, does the importer sort materials not in number order but in modifier order (ie all normal textures first, all translucent later) instead of 000_Normal, 001_Translucent, 002_Normal?
User avatar
Skywolf
OldUnreal Member
Posts: 880
Joined: Sun Aug 02, 2009 12:20 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by Skywolf »

bMasked can be found by right-clicking a texture in the texture browser -> properties -> surface -> bMasked.

Materials are imported in the order the importer reads the polygons (which is in the order their appear in the _d.3d file). So if the first polygon has texnum 069 and every polygon after that has texnum 000 it will put the material for the polygon using texnum 069 as the first material in the list followed by a material with texnum 000. Same with polytypes and flags.

Luke, the exporter worked fine before. These are quality of life improvements and some minor bug fixes. If you model didn't export correctly before it won't export correctly now.
I hate it when people ask me what my favorite game is. Just try to explain you're not talking about Unreal Tournament ::).
User avatar
luke11685
OldUnreal Member
Posts: 441
Joined: Wed Mar 28, 2018 5:38 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by luke11685 »

Okay.
User avatar
Crimzan
OldUnreal Member
Posts: 5
Joined: Tue Dec 11, 2018 8:50 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by Crimzan »

Hello there!

I am trying to get a custom weapon into Deus Ex. I have successfully converted static models, that worked very well, but getting animated models converted to .3d feels a bit more tricky.

In general I am wondering: I have 3 animated models (with armatures), a left arm, a right arm, and my weapon. But for the exporter it has to be a single mesh, that's moving with shapekeys, right?

Is there a way to convert the armature animations to shape keys and combine the meshes?
User avatar
Skywolf
OldUnreal Member
Posts: 880
Joined: Sun Aug 02, 2009 12:20 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by Skywolf »

The exporter does support armatures (or any modifiers that deforms a mesh). So no need to convert your animations to Shape Keys first. The exporter simply takes the vertex locations for each frame of animation and writes these to the _a.3d file. How you move these vertices is up to you (can be armature modifiers, displacement modifiers, softbody physics simulation .etc).

If you have 3 meshes with each their own armatures and these are supposed to be one mesh in Deus Ex then you should merge the meshes. You can have multiple armatures control one mesh provided you export with Scene Timeline as source (Actions only work with one armature). Merging the meshes shouldn't cause many issues provided no data (like vertex groups) are the same between the meshes.
I hate it when people ask me what my favorite game is. Just try to explain you're not talking about Unreal Tournament ::).
User avatar
Crimzan
OldUnreal Member
Posts: 5
Joined: Tue Dec 11, 2018 8:50 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by Crimzan »

Ah, alright, must have misunderstood something then!

Thank you very much for your answer! Love your work!!

Edit.
I might have been misunderstanding something, but I was trying to join the meshes, so that I just have one single one. But once I do it, the arm for instance just jumps to its base pose and doesn't move anymore. Happens with the other meshes too.
I am not too good with Blender, is this a normal issue I'm misunderstanding and can be fixed, or am I just out of luck in this particular case and need to find a way to convert things?
Last edited by Crimzan on Sun Oct 13, 2019 12:02 pm, edited 1 time in total.
User avatar
luke11685
OldUnreal Member
Posts: 441
Joined: Wed Mar 28, 2018 5:38 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by luke11685 »

How can I export any pc or console(emulated) game maps .obj as .ase,.t3d and then as .unr? I mean is this .ase plugin downloadable for Blender 2.79?
User avatar
Skywolf
OldUnreal Member
Posts: 880
Joined: Sun Aug 02, 2009 12:20 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by Skywolf »

Didn't see you edited you message. So sorry for the late responds.

The likely reason the mesh doesn't deform with the armature is because it doesn't have the armature modifier anymore (merging a mesh with another keeps only the modifiers from the one you merge with, which is generally the one you selected last). To fix it simply add it manually. If that doesn't work then I would have to take a look at your specific .blend file to see what you have to do to merge the objects correctly.

It depends on the game how (and if) you can export the level geometry. Once you get it into Blender you can convert it to something Unreal can read. .obj imported as static mesh and the converting that to BSP will generally be your best bet as the other ways to convert polygonal meshes to BSP don't maintain UV data.
I hate it when people ask me what my favorite game is. Just try to explain you're not talking about Unreal Tournament ::).
User avatar
luke11685
OldUnreal Member
Posts: 441
Joined: Wed Mar 28, 2018 5:38 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by luke11685 »

It seems I can't install .ase plug-in/add-on in Blender 2.79 however it's not working. I tried to click on compressed .ase file and as I remember I even tried to extract this compressed file to folder directory where I installed Blender and it didn't work eighter.
User avatar
Crimzan
OldUnreal Member
Posts: 5
Joined: Tue Dec 11, 2018 8:50 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by Crimzan »

Ah! Thank you very much for the answer!

Indeed, adding the armature modifier after joining a mesh and selecting the correct root bone allowed my arms and weapon to move exactly how they should! Thanks!!

However, the MuzzleFlash Model is just something I parented to my weapon. And once I joined the meshes, the Muzzle flash just floats there and doesn't move anymore at all. ... which kinda makes sense as its part of the object it was previously parented to now.

Do you know of a quick way to solve that issue?

I have since figured out a way to convert all meshes to ShapeKeys, which is a little annoying to do but overall it just takes a couple of minutes and works very very well even when joined.
If fixing this issue while keeping armatures is a little too difficult, I might just stick to my ShapeKeys-Method. I could share my workflow to convert this to shape keys if anybody is interested.
User avatar
MrRobotBear
OldUnreal Member
Posts: 22
Joined: Sat May 10, 2014 9:14 pm

Re: Blender Vertex Mesh export Plugin [V1.2.5].

Post by MrRobotBear »

I'm sorry Skywolf, I must be blind but I can't see the bMasked stuff. Probably our layouts are not the same or something else is set up differently. Could you screenshot the place where it is so I know where to look, or a small gif if you have the time (ShareX records nice gifs and uploads them in case you need it).
Post Reply

Return to “Modelling”