Import a char Blender

From PSwiki
Revision as of 18:50, 21 July 2018 by Zweitholou (talk | contribs)
Jump to navigation Jump to search

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. Convert character textures from .dds to .png 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 the standard ue4 skeleton is brought into the blender file for each character. The skeleton is adjusted to each different geometry and additional bones are added where needed for tails or wings. This needs to be done with all bone layers visible. Once the editing of the skeleton 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 wieghting to match along edges of module joints and make sure the weighting is not too strong or dropping off too sharply. This is the step I am on for all characters currently.

After module joint fixes are done, export the character to .fbx from blender, only exporting selected, using deform bones only and disabling leaf bones.

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 50-60

Idlevar 50-60

Die 50 full contact at frame 18-20

Attack 30-35 full contact at frame 18-20

Attackvar1 30-35 full contact at frame 18-20

Hit 30-35 full contact at frame 18-20

Attackidle 30

Strafe 30 movement speed must be 1,35 meters / second

Cast 60

Greet 80

Sit down 55-60

Sit idle 50-60

Stand up 55-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 2 bones for the mouth (upper, lower) 1 ponytail bones

4-6 spine bones 2 bones per each arm 1 bone for each hand (palm) 2 bone for each hand finger

2 bones per each leg 2 bones for each foot

Optional: 4 bones for the tail

Article in progress - to be expanded with more information and step by step images as I go