What exactly happens when you bake animations for exporting to a game engine?

I just read the thread linked above, and I wasn’t sure to necro that one or to create a new one. Sorry if I’m doing it wrong!

Anyway, after reading that thread a few more questions arised, namely:

  1. When baking your animation, is it true that all that’s being done, is that for every frame the bones’ locations are being ‘saved’? Does it only do that for the deforming bones?

  2. And am I correct in thinking that none of the vertices’ positions are being saved, as in, when playing the animation in a game engine like Unreal4, the engine still has to calculate the vertices’ position based on the weights that the bones have on them, in real time. Even when you’re in game?

  3. Also, if you export your stuff to FBX, with only the deform bones ticked. Does that mean that any IK setup wouldn’t work/exist in Unreal4 anymore after importing? Meaning that you can’t setup a ragdoll or the feet matching a slope thing? If so, am I right in thinking it’s preferred or even necessary to export your IK systems aswell?

Thanks in advance for any answers!

To 1: Wether it exports only the deform bones or not depends on the setting you choose on export. I recommend marking the bones as deform or non deform and using “only deform” on export, as this is a good practice for optimization aswell as some other functions during Skinning.
Baking (wether done manually or on export) takes all bones transformation and saves them per frame.
On import in Unity for example, your animations will look like this



with one key per bone, channel and frame.This is the common practice.

To 2: That is correct. The groups and weights are saved, but not the deformation itself. Thus, game Engines can have a limitation as to how many bones can affect one vertex. (max 5 Bones per vertex in Unity for example)

To 3: IK setup and constraints etc. can never be saved in FBX, because constraints work different in every software. Everything is converted to FK movements (local location and rotation for every bone).
If you want IK Setups that are calculated on runtime in the engine, you need to find out if your engine has functionalities like that. (Unity has the Mechanim system for that, I don’t know if UE4 has something similar)
In most cases it is not useful to export more than your deform bones. If you have Bone controllers for Shapekeys or simiar, you should mark these as deform, too.