Import a char Blender: Difference between revisions

From PSwiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 50: Line 50:


'''Attackfaststart'''         
'''Attackfaststart'''         
10          
5          


'''Attackfastloop'''         
'''Attackfastloop'''         
Line 57: Line 57:


'''Attackfastend'''         
'''Attackfastend'''         
10          
5          


'''Attackfastvar1'''     
'''Attackfastvar1'''     
Line 64: Line 64:


'''Attackmedstart'''         
'''Attackmedstart'''         
15          
12          


'''Attackmedloop'''         
'''Attackmedloop'''         
5          
6          
''full contact at frame 5''
''full contact at frame 6''


'''Attackmedend'''         
'''Attackmedend'''         
15          
12          


'''Attackmedvar1'''     
'''Attackmedvar1'''     
5          
6          
''full contact at frame 5''
''full contact at frame 6''


'''Attackslowstart'''         
'''Attackslowstart'''         
20          
19          


'''Attackslowloop'''         
'''Attackslowloop'''         
5          
7          
''full contact at frame 5''
''full contact at frame 7''


'''Attackslowend'''         
'''Attackslowend'''         
20          
19          


'''Attackslowvar1'''     
'''Attackslowvar1'''     
5          
7          
''full contact at frame 5''
''full contact at frame 7''


'''Attack2handstart'''         
'''Attack2handstart'''         
40    
25    


'''Attack2handloop'''         
'''Attack2handloop'''         
5          
10          
''full contact at frame 5''
''full contact at frame 10''


'''Attack2handend'''         
'''Attack2handend'''         
40
25


'''Attack2handvar1'''     
'''Attack2handvar1'''     
5          
10          
''full contact at frame 18-20''
''full contact at frame 10''


'''Hit'''             
'''Hit'''             
30-35           
30-35           
''full contact at frame 18-20''


'''Attackidle'''     
'''Attackidle'''     
Line 158: Line 157:
An example bipedal character may have:
An example bipedal character may have:
1 head bone
1 head bone
2 bones for the mouth (upper, lower)
1 neck bone
1 ponytail bones


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


2 bones per each leg
2 bones per each leg
Line 171: Line 169:
Optional:
Optional:
4 bones for the tail
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
Article in progress - to be expanded with more information and step by step images as I go

Revision as of 00:27, 27 July 2018

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

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 30-35

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