animation_guide

Mesh & Animation Exporting

Mesh

Place meshes zeroed in world, XZ plane is floor.

Freeze all transforms, (Zeroing out transform pivot point).

Assign a material, (either Lambert or Phong) to each mesh.

Assign a texture, (usually only one for enveloped objects) to each mesh.

Freeze the geometry, (collapse stack, delete construction history, whatever you like to call it).

Bones

Place bones with hierarchy as children of mesh.

Bones can be Skeleton 2D/3D chain bones or nulls. (Bones can be geometry as well but shouldn"t be used in the mesh.)

Place a traversing bone, usually a null named "dummyroot", as parent of the mesh.

This "dummyroot" bone defines the mesh traversing along the ground.

Optional:

Place a world bone, usually a null named "grounddummy", as a parent to the traverse bone.

This "grounddummy" world bone will allow you to offset the animation starting point in the world.

All bones must have a direct parent/child relation. (Chain bone effectors must be linked to the last bone in IK chain.)

To ensure your effectors are linked to the last bone in a chain you should tick the SI|3D Skeleton Drawing option before you start drawing the bone chains.

This option can be enabled in the Animate module > Create > Skeleton menu.

It will make your effector automatically be child to the last bone in that chain when you're done drawing it, and it'll meet the requirements of the game.

You should not have more than 3 bones in an IK chain for this game.

Place hardpoints, (usually nulls or simple geometry), wherever needed.

Hardpoints are simply bones that have the prefix "hp_".

They are used as transform nodes that can be used as reference points for placing weapons, event hot spots, etc.

Rig

Rig nodes should NOT be in the hierarchy of the skeleton. Rig elements could be regarded as bones or offset child bone transforms otherwise. Use rig controllers to drive IK effectors and up vectors. Bones can be animated with IK or FK depending on the situation.

Enveloping

Most meshes require rigid enveloping meaning only one bone influence for each vertex (see weighting), (this is mostly for soldiers & vehicles). Otherwise, you could have up to 3 bones influence each vertex but you must define it as "-softskin" in the meshes .option file, (I hope .option files are covered elsewhere). ;)

Animation

Do not animate the mesh, skeleton 2D/3D chain bone roots or effectors. It will offset child bones transforms.

The traverse bone (dummyroot) must start at the world bone (grounddummy), (it will zero the traverse bone transforms).

This is good for if you have multiple animations in a scene with different starting locations.

The traverse bone (dummyroot) must have only two keyframes from the beginning of the animation to the end of the animation sequence with only linear interpolation, (you could use spline interpolation to normalize certain overextended motions).

When animating using IK, expressions or constraints then you should plot all animations to the bones before exporting to ensure that your animation will work ingame, the exporter discards animation (keys) on effectors (IK handle).

ODF Tip: Do not name your animation with a _# (underscore number) at the end of the name or else your game will crash with no severity 3 errors.

Example:

AnimationName = "somename_1" --this will cause a crash

AnimationName = "somename1" --this seems to work, but avoid using numbers at the end whenever possible.

AnimationName = "somename" --its best to stick with this naming convention

Exporting The Mesh

You need to have XSI version 4 - 5.11 with the Pandemic Tools installed, the exporter will not work with any other versions.

The enveloped mesh with the skeleton must be exported as the in-game object name and the skeleton itself must be exported individually as a basepose, (called "basepose.msh").

The basepose is keyframed on frames 0 and 1, which sets up the skeleton and what is included in it.

Exporting The Animations

Remove all meshes from the skeleton hierarchy.

Set the start and end frame in the playback timeline boxes.

Branch select (middle click) the traverse bone (dummyroot).

Export the mesh using the exporter plugin. File > Pandemic Tools > Export Mesh

Be sure to have "Export Selected Models Only", "Export Animations" & "Export FK Animation" selected.