Version 1.2.5 Disclaimer: use at your own risk. Shouldn't do anyting malicious and the worst it could do it ruin your .blend file (so make a back-up to be on the safe side) but you never know.
To install or update open the User Preferences of Blender. Go to the Add-ons tab and click install from file. Then select the .zip file. Now click on the Import-Export Catergory and enable it.
When exporting with Use Actions checked make sure you selected objects that affect the mesh first and then select the mesh you want to export last so it is the active object (yellow outline instead of orange).
So lets say you have a mesh and an armature that deforms it. Select the armature first and then select the mesh while holding shift. Now the armature should have a orange outline while the mesh has a yellow one.
When just using the Timeline (Use Actions unchecked) you just need to select the mesh.
Now it's time to go over the options and limitations (because this is Unreal. So ofcourse there are limitations )
When exporting you have the options to pick whether it should use Actions or just the scene timeline for animation data. Using Actions is eassier to work with while using the Timeline allows for things like Keyframes and the NLA editor (Non Linear Action editor) to be used.
Down side is that when using the timeline method you won't be getting a nice .uc file with all the animation data filled in for you. Just an ALL and Still sequence. The others will have to be entered by hand.
Due to how Blender handles frames is it not possible to have an Action export with just one frame. To get around this did I set it up so that when an Action only has 1 set of key frames (one vertical row) it will export it as an 1 frame sequence.
Now the limits dictated by the file format.
- There is a vertex (note vertex. not polygons) limit of 16383 dictated by the animation file. So people dreaming of making 6million polygon versions of every asset in Unreal will probably have a bad time .
- Always keep your vertices within 255*255*255 units. -128 to 127 Blender units on each axis.
- UVs snap to a 256 to 256 grid. But because Unreal reads everything on a 1 pixel offset on the x axis was I forced to add an offset. This basically means that, when using a 256*256 image, the whole outer ring of pixels wont be used and UV vertices on these will cause an error. Just like when you move your vertices outside the image.
- For the best results set the fps under render settings to something lower than the default 24fps and base your animations on that. Around 10-15 should be fine. Setting it higher will just give you larger file sizes while making the animations look worse aswell. Keep in mind that this doesn't affect the rate at which the animations are played back in Unreal.
Polyflags and texnum are handled by material name The material should start with a three digits containing a number between 0 and 255 (if not it will use the material index instead) which is the texnum. After this you can add one of the following (case sensitive):
- _NOMRAL/_NM The default. Used if none of these are given.
- _2SIDED/_DD Makes this poly 2-sided
- _TRANSLUCENT/_LU Makes this poly translucent and 2-sided
- _MASKED/_CL Makes this poly masked and 2-sided
- _MODULATED/_MD Makes this poly modulated and 2-sided
- _ALPHABLEND/_AB Makes this poly alphablend and 2-sided (227 only)
- _WEAPONTRI/_PH makes this poly a weapon triangle (used to place the weapon in 3rd person view).
- _UNLIT/_UL No lighting and full lit.
- _FLAT/_FL Not really sure to be honest. Probably related to the mesh curvy thingy.
- _ENVIRONMENT/_RF Render this poly to make it look shiny.
- _NOSMOOTH/_NS No texture smoothing (see: Minecraft)
Note how the order of the flags don't matter. The only thing that has a specific spot in the name is the texture slot.
You can have different flags for different polygons while still make them use the same texture slot. So lets say I make another one and name it like this:
Would it use the same texture slot while using these flags instead.
The texture name (used for the .uc file) is read from the name of the first texture in the texture list of a given material. If two materials with the same material slot have a different texture only the first in the list will be used. the .pcx extension will be added automatically.
This should be everything.
While using this plugin is at your own risk (aka: make a backup of your .Blend file), are any feedback and bug reports welcome .
Plan to write a proper documentation on the Oldunreal wiki at one point. But this will have to do for now.
Code: Select all
1.2.5 - 04/06/17 -Fixed the mesh scaling for ION Storm (Deus Ex) format in the .uc file to adjust for the larger scale due to the larger file format. 1.2.4 - 04/02/17 -Fixed the mesh scaling for ION Storm (Deus Ex) format in the .uc file. -Fixed a crash when exporting the .uc file if the user unchenked exporting the animation and/or data file. 1.2.3 - 04/01/17 -Changed the way the ION Storm (Deus Ex) is written at the suggestion of Han. Should yield the same result but doesn't have the unnecessary bit shifting. 1.2.2 - 03/31/17 -Fixed padding in ION Storm (Deus Ex) format. 1.2.1 - 03/30/17 -Fixed crashing when a mesh is exported with no UV data. A model with no UV data will have LODNOTEX=True set in the .uc file. -Added MLOD, LODSTYLE and LODFRAME settings for the .uc file. -Updated the version number in the bl_info section this time.... 1.1.2 - 03/24/17 -Added support for ION Storm format. -Added support for ION Polytype and Polyflag matertial naming scheme. -Modified reading of the texture slots space in the material names to allow up to 256 (0-255) texture slots. -Added RATE= for sequences in .uc file based on scene fps setting. -Set an initial rotation in the .uc file to rotate the mesh 90 degrees to make Blender's front also the front in Unreal. -Added folder settings for use with ucc -make. -Made the selection for Actions or Scene Timeline a list instead of a bool. -Vertex coordinates are now rounded instead of truncated. -Vertex coordinates are now clamped to move any vertices outside the 255*255*255 range to the borders instead of a random location. -Fixed crashing when exporting meshes with no materials or empty first texture slot. 0.9.0 - 03/21/17 -Initial release.