Last updated: June 24, 2012
Before you begin:
Be careful with your scale.
As far as I am aware UDK treats all units in a one to one manner.
Personally, I setup Blender to use a metric scale of 0.010, so everything I do is in centimetres.
When I export, I keep the export scale at 1.0.
This results in my 180cm tall player model in Blender being 180 Unreal units tall in UDK.
If you setup Blender to use an imperial scale in feet and have a 6′ player model in Blender,
you’ll end up with a very short model in UDK.
Be aware of this.
Stop the armature being added as root bone after FBX export
This helps keep your bone heiarchies how you want it, rather than an extra root bone appearing everytime.
Open “C:\Program Files (x86)\Blender Foundation\Blender\2.63\scripts\addons\io_scene_fbx\export_fbx.py file” (Back it up first).
Around line 2546, you should find the following:
else: # the armature object is written as an empty and all root level bones connect to it fw('\n\tConnect: "OO", "Model::%s", "Model::%s"' % (my_bone.fbxName, my_bone.fbxArm.fbxName))
Comment it out:
# else: # the armature object is written as an empty and all root level bones connect to it # fw('\n\tConnect: "OO", "Model::%s", "Model::%s"' % (my_bone.fbxName, my_bone.fbxArm.fbxName))
The rig setup is entirely up to you.
Personally, I have used :
- a rig based on the latest Rigify AutoRigging system included in Blender 2.63a.
- an imported model from MakeHuman using its ‘simple rig’.
- a custom rig included in a model grabbed from BlendSwap.
All rigs had a root bone, to which the hips/torso was parented too.
Any additional bones used by the game engine (ie. gun IK & foot IK) were also parented to the root bone.
It is important the every bone you intend to export have ‘Deform’ enabled, and all those that you don’t (ie. IK targets or control bones) have it disabled.
To do so, select the bone while in Edit or Pose mode, click on the Bone tab and check/uncheck the ‘Deform’ option.
Next, ensure everything you want to export together is in Object mode and select them.
Bring up the FBX export dialogue and choose these options:
Note: Optimize Keyframes, Include Animation & All Actions are optional, depending on whether or not animations are being exported along with the model.
Once complete, click import in the UDK editor and select the FBX file you just created.
If the “Import Type” comes up as Static Mesh, something went wrong during export.
Ensure you selected your mesh and armature object and try again.
If it still didn’t work, make sure your mesh is correctly rigged to the armature.
Under the Skeletel Mesh tab, select Advanced, “Use TOAs Ref Pose”.
This should ensure your model is facing the correct direction.
Importing materials, textures and animations is entirely up to you.
When you are done selecting options, click OK or OK To All.
You will probably be presented with the following:
You have two options: ignore it or use the FBX Converter to convert it to FBX 2012.
Unless creating your final models, it is probably fine to ignore it.
After it is finished, you should be good to go.
It is a good idea to check the bones, scale etc.
Open your newly created Skeletal Mesh and have a look.
Any imported animations will show up as an AnimSet with the same name as your models root bone. You will probably fix up all the animation names, as UDK has an odd habit of prefixing all animations with the name of the file they were imported from.
Before you animations will work correctly, you will need to setup the AnimSet’s translation bones.
Under the AnimSet tab, use to the green plus to add an entry to the “Use Translation Bone Name” list, then enter the name of a bone that should translate/move. Repeat as needed.
You could disable the “Anim Rotation Only” option, but it is probably best not to.
At this time, I do not know what “Force Mesh Translation Bone Names” is does or is useful for.
Missing information about material export and so forth, but for now, I hope you’ve found this useful.
If I’ve made a mistake or missed something, please let me know so that I can update it.
Have to say a give a big thank you to Spoof over at the UDK forums for the heads up on how to get the correct the model orientation.
Thanks again mate!