4 ms·
I'm curious what modern animation systems use quaternions. Can anyone who knows graphics well provide references?
by j2kun 3y ago
I'm curious what modern animation systems use quaternions. Can anyone who knows graphics well provide references?
- mrcode007 3y agoThey’re ubiquitous in computer graphics for video games and to some degree in space and aeronautics. They’re better than Euler angles because they don’t go singular as often. There are other more ansvanced and better parametrizations though. In space rotations are of critical importance and ensure stability or instability depending on the axis of rotation
- interroboink 3y ago> they don’t go singular as often A term I've often heard is "gimbal lock"[1]. Can happen, eg, when a player points the camera straight up, then tries to rotate themselves (depending on how your axes are set up). I don't believe quaternions _ever_ have that particular problem, so not quite sure what is meant by "less often," here. [1] https://en.wikipedia.org/wiki/Gimbal_lock https://en.wikipedia.org/wiki/Gimbal_lock
- mrcode007 3y agoYou’re right, quaternions don’t go singular. I misremembered what the problem was. And the problem with the quaternions is that the multiple revolutions will resolve to the same quaternion and then you don’t know how many times you’ve revolved around. For some applications this is important to know.
- j2kun 3y agoReferences though. If you had to prove it was ubiquitous, what would you point to?
- djmips 3y agoYou could look at the Unreal Engine source.
- omoikane 3y agoMany game engines has first class support for quaternions, for example Godot: https://docs.godotengine.org/en/stable/classes/class_quaternion.html https://docs.godotengine.org/en/stable/classes/class_quatern...
- Wistar 3y agoThe Grass Valley Group's late 1980s real-time digital video effects system, the Kaleidoscope, used quaternions for orientation of 2D planes in 3D space (Cartesian) to avoid gimbal lock although it also offered Euler angles for animation of multiple rotations.
- djmips 3y agoDual quaternions have been used in animation skinning to produce more attractive looking results.
- qwertox 3y agoAny animation software uses it. Even if you manually set up rotations of an object, like the camera, via xyz-rotations, as soon as you start animating them via keyframes, the interpolation is done by using quaternions. Maya exposes them in their API, Blender, Unreal also do so, basically any system. While an animation system might not have had it in the beginning, it can be added later and all the benefits can be used, without doing any major changes to the system. You first transform the Euler rotation into a quaternion rotation, then do your work with them, like interpolating a rotation, and when you want to visualize this interpolation, you just calculate the Euler rotation for a given interpolation step and apply the xyz rotations to the object to visualize it. Unreal's API gives a good overview of the functionality quaternions offer: https://docs.unrealengine.com/4.27/en-US/API/Runtime/Core/Math/FQuat/ https://docs.unrealengine.com/4.27/en-US/API/Runtime/Core/Ma...