SamuKata
colortwist
colortwist

patreon


You spin me right around (3/4)

Another quick demo of some more (boring?) quaternion stuff.

This is a decent example of why normal 3D angles don't really work that well for twist extraction. In this demo, the source objects (on the left) are free to tumble around in 3D space while the destination objects (on the right) are constrained to only rotate about their Z axis.

What should happen is that the green axis of the source and destination do their best to line up. This is extremely useful for determining what the twist angle should be for something like a wrist, since you can use that information to wind up and unwind the skin around the forearm of the limb.

What actually happens instead is that the HPB objects (the ones on the top) almost work- but not quite. The destination tries to rotate to match the twist of the source, but this fails as the source rotation approaches 90° and goes into gimbal lock.

However, with the bottom objects this rotation remains reasonably stable- even near 90° angles, the quaternions continue to successfully track the "twist" of the source object's rotation. Only at -180/180° will the angles potentially flip- however this is to be expected since most trigonometric functions can only return a result from -PI to PI anyways.

You spin me right around (3/4)

More Creators