I’ve been talking to some artist friends of mine, who all say that when creating an animation sequence for, say, a walk cycle they like to compose the animation in their 3D modeler of choice with the translations per frame “baked in”. That is, they synchronize the translation of the skeleton to animate the forward motion of the character throughout the duration of the cycle, in order to more tightly control pacing and motion. For an example, see this worm:
See how as the animation progresses, the bones translate forward leaving the origin behind.
I currently don’t do it this way in my game. Things like walk cycles, I animate forward by a constant speed in the game. However, I am finding that animating with translation in the modeler is much nicer for things such as having my guy step forward, climb up a ledge, then stand up at the top. Or for things like a lunge attack or shield bash, animations that don’t have a constant forward translation for the entire duration.
I am trying to figure out the best way of handling this, though. In this scheme, the key is to keep the node stationary and play back the animation, then at the end of the sequence, change the node’s position to correspond with the position of the final frame of the animation. Done correctly, it works pretty smoothly. The problem is that it creates a disconnect between the visual position of the object and the actual position represented by the node. If there are other components attached to the node, such as collision shapes, they’re going to think that the node is stationary throughout the duration of the animation, and that it suddenly jumps to another location at the end.
Is there an “industry standard” method for handling this? Some people have suggested that when the animation is exported, “subtract out” the forward translation and output a motion curve so that the node itself can be animated from this motion curve while the animation plays. I also have experimented with nesting the animated model in a sub-node, manually querying the animation for the translation of the root bone, then translating the sub-node by the inverse of this translation, while at the same time translating the parent node forward by the translation. However, this is clunky in that it requires a custom component to coordinate it all.
I am using the Blender exporter for my animations, and I don’t really see any options in there to export a motion track for the root bone. Anyone got any suggestions?