[Closed] Advice on reansform baking
I have been baking transform by just storing transform matrix per frame.
Then I realize that I can not handle properly the rotation which is bigger than 180 degree.
What would be your suggestion to solve this issue?
Should I save position/rotation/scale separately like chan file?
Maybe an additional support track for rotation?
Please share some ideas.
thanks
For cases where a thing doesn’t rotate more than 359 degrees per frame, the simplest, but wasteful, solution would be to increase the temporal resolution – also store the transforms between frames. Sort of how you would record a PointCache every 0.5 or 0.25 frame for fast animations.
If something rotates like 20 revs per frame, it’s probably time to start dealing with euler values… But then if you don’t keep the hierarchy when applying the motion, you should be re-creating the euler rotations in world space and storing those; which you would have to align/key at a pretty high frequency to avoid gimbal locks. I guess you could simplify curves afterwards and store the resulting sparse keys, but that’s loosing precision.
I’d go the wasteful way.
A slightly smarter solution would be detecting the amount of over-rotation by looking at rotations between frames and varying your recording resolution dynamically. For example, suppose you have an object that spins up and then stops, you could record like this: every 1.0 frame at frames 0-100, then 0.5 frames 100-120, then 0.25 at 120-130. But I’m not convinced the added complexity in the file is worth it for most situations.
Thanks…,
Subframe sampling… doesn’t sound appealing.
Gimbal lock… forgot that…
Any other alternatives?