Animation API - Outerra/anteworld GitHub Wiki
This page describes how to work with animations in Outerra.
Import
Outerra stores animations in custom file format with .anim extension. Such files are created only by Outerra`s own importer. If a FBX file has multiple takes they can be imported all at once. You can also import them one by one - each from a separate FBX file.
If you are going to import animations for one model from multiple FBX files you just need to move the newly imported .anim files to the actual model folder. Such FBX files, used only for animation import, do not need to contain anything except of bones.
Note: Not all software can work with multiple animation tracks. For example: 3DS Max can work only with one.
The API
Loading animations
In code we work with the animations using the ot::animation
interface. The way of loading them is using the interface creator get
Animation loading is asynchronous => they cannot be used immediately. You have to check if the loading is done by calling is_ready()
of the animation. You can also check if there was an error while loading the animation by calling is_failed()
. If this method returns true the animation will never be ready.