Export: Upper Body Animation

From CryWiki

Jump to: navigation, search


To set up a upper body animation you will already need a Mods folder that contains the necessary folders and files for exporting. This would be the Bin32 folder and Tools/Maxscript folder. This is critical in getting animations to export at all.

Note
The rest of the documentation assumes you have the correct needed files and folder structure and crytools working in 3DS Max when loaded.


Contents

Exporting Upper Body Animation

Setting Up The Basics

  • First you need to add the necessary object and animation folders and add any needed files. This would be:

\Mods\Mymods\Game\Objects\Characters\Human\human_male\character.chr

\Mods\Mymods\Game\Animations\human\male\combat

\Mods\Mymods\Game\Animations\Animations.cba


  • \Mods\Mymods\Game\Objects\Characters\Human\human_male\character.chr

This is the same file used in the Example/Example Assets Mod from the SDK. Its needed in the same Mod folder that your exporting your animations CAF file to.


  • \Mods\Mymods\Game\Animations\human\male\combat

This will be the folder we export our new replacement animations to. The folder structure follows the original game since were just replacing original full body animations.


  • \Mods\Mymods\Game\Animations\Animations.cba

This file needs to be added and modified to export correctly. Grab the original from the Animation.pak file and put it in your mods Animation folder. When you open it up (notepad/wordpad) the "Animation Definition" for the character.chr file needs to be called also. You can get the required code for it by opening the Animations.cba file in the animation folder of the Examples/Example Assets mod. Grab from <AnimationDefinition> to <SpecialAnimsList> and copy/paste it into the one in your Mods animation folder.

Note
Make a break after </AnimationDefinition> for the Nanosuit info and paste the new character info under it, that should be just fine. You do not need </SpecialAnimsList> and </AnimationDefinition> at the end of the pasted Character info like the Nanosuit info. By doing so will cause an exporting error.


  • One more thing you should do in the Animations.cba file is to get rid of this in the Nanosuit info:

<RotatePosRoot value="L180"/>

<RotateQuatRoot value="L90"/>

<RotatePosChild value="L90"/>

<RotateQuatChild value="L90"/>

Note
Having it in won't affect upper body animations but it will for full body animations if you choose to do them later. You can leave it for later or just delete it now.


Inside 3DS Max

  • Open up the character.max file given in the Example/Example Assets mod (\Mods\Examples\Example Assets\Objects\Characters\human_male).


  • When we first open the file all you'll see is the character mesh. All we want is the biped so were going to unhide and hide some things.
Note
By default max doesn't have any shortcuts for hide/unhide. You can change that though by going to Customize/Customize User Interface and entering in a hotkey for it.



  • All you need is the biped, so first select the Display tab in the command panel(1). Next select the mesh and click on [Hide Selected](2). Finally, click on [Unhide by Name] and you will get a new menu(3).



  • Collapse the second line Bip01 Pelvis Phys(1). You can then select Bip 01 and click Unhide(2). The next box will ask you if you would like to Unhide the layers of the objects, click ok.



  • You can toggle off the rest you don't need. In Category click off Geometry and Helpers.


Setting Up The Biped

  • Not much needs to be done to set up the biped for a upper body animation. After Max is setup you can pretty much go right into animating.



  • First select the Motion tab in the command panel(1). Select the left hand of the character in the viewport and open the Key Info section(2). Finally click the Time Configuration button to set the amount of frames were going to be using(3).



  • In the Time Configuration window change End Time to 20 for this animation.



  • Click the Set Key button and you will see a new keyframe at frame zero(1). Shift-select the key and drag it across to frame 20. Click the timeline to deselect the copied key and grab the timeline scroll bar and drag it to frame 10(2).



  • Select the Z axis and transform the left hand up and then the X axis and move it out a little(1). Next set a new key with the Set Key button (little red dot). Finally select Utilities in the command panel(2).
Note
When animating if you are not in the Motion tab when doing so you could witness a slow down. If you would like to view your animation you can either click-drag the scroll bar in the timeline or hit the Play Animation button.


Exporting


  • Remove everything in the Object Export section except 'character'.



  • Select the Bip01 Spine and scroll down the utilities to the Bone Export list(1). Click on Clear List and then click on Add Selected. You should only see Bip01 Spine on the list(2). Finally click on "Export Bones" and click ok to the "Biped lower arm twist bones reparented" prompt.
Note
Three things that can mess up exporting your animation at this phase is the selected amount of time frames your exporting, where the Root Path in the CryEngine2 Settings is pointing, and not exporting from the Bip01 Spine. If your Timing Export Range isn't exporting manually you should be fine. The Cryengine 2 Settings root path should be pointing to the mod folder your exporting to (C:\Program Files (x86)\Electronic Arts\Crytek\Crysis\Mods\Mymods). You always need to export from the Bip01 Spine, after a export Max likes to automatically switch it back to the Bip01 so look out for that.


  • You will then be asked to save the CAF file somewhere and to name it. Put the CAF file in the combat folder made in the beginning (\Mods\Mymods\Game\Animations\human\male\combat) and name it combat_weaponPunchLeftUB_nw_01. This animation is the basic punch while not equipped with a weapon.
Note
After that is done you can save the 3DS Max file out to whatever name you like and to the 3DS Max scenes folder. You don't always need to start out from the original character.max file.


Sandbox2

  • Open the Editor with the mod running where your new animation was saved into. Click the little green guy in the top right corner for the Character Editor.



  • The animation was saved in the combat folder so open that. Look for combat_weaponPunchLeftUB_nw_01 in the list. A successful upper body animation export will be showing your character arcing its left arm up and down.


Credits

[DBD]Mephisto03


See Also

CAF File

CAL File

What is the SDK?

Creating New Animation Entry

Personal tools