Import a char Blender
As part of the overall port to unreal, all character models are being moved to blender and rerigged with the standard ue4 skeleton and ik setup. This allows for easy retargeting of animation from a blender master animation file onto all characters, significantly streamlining the process of adding new animations in the game. Here I will document the workflow to move characters from obj exports out of 3ds into blender, then prepare them to import into unreal and retarget animations from the master as well as blend multiple animations together.
The first few steps are already completed for all existing character models
First, the geometry must be exported from 3dsMax as .fbx to preserve UV mapping for the existing textures. Bones do not transfer properly from 3dsMax to Blender due to the way Blender reverse engineers the .fbx format.
Next, open blender and import the character model. Select character textures located in the ueart repository and assign them within blender, renaming materials and texture names in Blender for consistency. This is where normal maps, spec maps, and alpha information is added, which will transfer to unreal on export.
Next, rig the character according to Character rigging. Once the editing of the mesh is complete, change the skeleton to pose mode and press Ctrl A, set as rest pose. Next select the mesh, then the skeleton in object mode, and press Ctrl-P, set parent armature with automatic weighting. Also make sure all parts of the mesh have an armature modifier set to the ue4 skeleton.
The automatic weighting gives a good base but has errors with the module joints and occasionally with the way previous planeshift meshes have been modeled. Clean all weighting to match along edges of module joints and make sure the weighting is not too strong or dropping off too sharply.
After module joint fixes are done, export the character to .fbx from blender with the following steps:
- Select one mesh at a time (example Torso) and the Armature
- Export FBX using "Selected only", "deform bones only" and disabling leaf bones.
- Also if exporting animations uncheck "force start/end keying" so animations will all export to their own length.
Import the FBX in Unreal, using Load the character asset into unreal and make sure the materials and textures are applying correctly. This should happen automatically on import. Set up the model for retargeting to a humanoid rig in unreal.
Bring in the blender animations from the master file and also any specific animations from the character file. Next, setup the animation blueprint for the master file and retarget it to each character. This is where animations are triggered and blended together.
Animations are played at 30FPS, and usually span from 50 to 150 frames. The numbers below are an indication of our current characters, and should not be considered a strict guideline.
Here is the official list of needed animations for characters.
Animations Number of frames Notes
Walk 44 movement speed must be 1,4 meters / second
Run 30 movement speed must be 5,6 meters / second
Sneak 50 movement speed must be 1 meters / second
Idle 60
Idlevar 60
Die 50 full contact at frame 18-20
Attackfaststart 5
Attackfastloop 5 full contact at frame 5
Attackfastend 5
Attackfastvar1 5 full contact at frame 5
Attackmedstart 12
Attackmedloop 6 full contact at frame 6
Attackmedend 12
Attackmedvar1 6 full contact at frame 6
Attackslowstart 19
Attackslowloop 7 full contact at frame 7
Attackslowend 19
Attackslowvar1 7 full contact at frame 7
Attack2handstart 25
Attack2handloop 10 full contact at frame 10
Attack2handend 25
Attack2handvar1 10 full contact at frame 10
Hit 35
Attackidle 30
Strafe 30 movement speed must be 1,35 meters / second
Cast 60
Greet 80
Sit down 60
Sit idle 60
Stand up 60
Craft 70
Crafthammer 70
Swim 40
Shootbow 100 attack ends at 65, wait till 100 for the arrow to hit
Ride 100 the character sits on the saddle on point 0,0,0
Ridehorse 100 the character sits on the saddle on point 0,0,0
Number of Bones
An example bipedal character may have: 1 head bone 1 neck bone
4-6 spine bones 2 bones per each arm 1 bone for each hand (palm) 3 bones for each finger
2 bones per each leg 2 bones for each foot
Optional: 4 bones for the tail 4 bones for each wing
Various ik bones to help with rigging
Article in progress - to be expanded with more information and step by step images as I go