Playing an fbx/usd/bvh file
Since Golaem9, file formats like the fbx, usd and bvh can be used in simulation/layout, without the burden of converting it. Depending on the case, these files can either be used to directly replay a complex skeleton, or with a mapping to another morphology with live conversion.
Playing the animation on the exact same skeleton
Using fbx/usd file to directly replay the animation on the same morphology allows to also replay translation and scale animations, which are limited in the gmo file format.
To direct-play fbx/usd/bvh animation on an entity:
- make sure than the entity's character file has the exact same skeleton than the animation to play (same bones, same hierarchy)
- configure the Motion Clip with the fbx/usd/bvh file, and
- make sure to configure the correct Motion Take if several are present in the file
- if a support sequence is present, configure the 'Support Property Name' to use (read the 'Adding support sequences' at the end of this page to see how to add a support sequence property)
- let the Motion Behavior configured without body mask (keep as default)
To make sure that an entity is replaying the animation in direct mode, set the Golaem SDK severity level to INFO, and check wether a log message tells ' [GolaemSDK]: Animation configured to direct replay. '.
Playing the animation on a different morphology
Replaying the animation on a different morphology is internally like converting it in gmo and playing the gmo file, except that the conversion is done on the fly by Golaem.
To do so, the Motion Clip node needs to define a Motion Skeleton Mapping with:
- the Skeleton Mapping file that defines the skeleton and limbs from the animation file
- the method to define the support sequence mode
If no Motion Skeleton Mapping is configured, an automatic skeleton mapping will be used to try to define the skeleton and the support sequence.
Like when replaying a gmo file, the Motion Behavior also needs a Motion Mapping to tell where to replay each limb. Here also, if none is configured, Golaem will use an automatic detection.
Adding support sequences
To be able to use a support sequence from an attribute in a Motion Clip or a Motion Skeleton Mapping, one first needs to save the support sequence in the desired property.
In Maya, the support sequence property needs to be an attribute on the foot bone (the end of the Golaem leg Ik chain).
To add an attribute on a Maya bone, open the attribute editor, click in the Attributes menu and Add Attributes:
Add an attribute in the Attribute Editor
Once the attribute created and named, keys can be added on it. Any key with a value >0.5 will be considered as a frame where the given foot is in ground support, and any keyframe with a frame value <0.5 will be considered as not in support:
Animating the ground support sequence
Once the ground supportsequence is added to and exported in the fbx file, the support sequence can be used by Golaem by correctly configuring the Support Property Name.
Note that the property name needs to be the same for all the legs.