probineroutlook
probineroutlook

Reputation: 21

3D Rigging: Belt twist or Frame Interpolation beyond 180 degrees. Euler, Matrix, Quaternions?

3D TD here, defining a "Bezier curve" and orientation along it with Control Objects' transforms. I'm having issues to interpolate the "Up Vector" between the Control Objects, in a way that would allow me to have a differential of more than 180 degrees between control, so I'm limited in how much I can twist.

I'm using SideFX Houdini, which has a C-like language called VEX for achieve them. Here you can see the control items, the Bezier handles(cyan, yellow) and the transform panel for one of them.

Image of Objects and Bezier

To generate the frames the Bezier is re-sampled to a polyline and starting at each Control Object corresponding point there's a Parallel Frame Transport up to the Control Object corresponding point.

This will cause breaks in the the continuity of the frames, so what I do is a weighted rotation about the tangent axis so the frames' "Up Vector" gradually align with the next Control Object's "Up Vector".

The issue is this alignment is done by checking the angle between two vectors Frame Transport Up and next Control Object Up in the same plane. Which biggest different is 180 degrees. Beyond that it flips to the other side: Clip with Flipping Frames

Now, I can have more than 180 if apply such twist or roll, as an offset of the Frame Transport and subsequent alignment, but this is an extra step. Twist above 180 as Offset

I understand that when dealing with matrices there's no notion of turns and so this may be impossible with what I extract from objects being posed with Euler. But I have a feeling there might a solution around involving quaternions, I usually use them as Axis-Angle, not that I fully grasp them conceptually.

My issue seems to be how I relate one control object with the next one in a way I can grasp how much twisting it takes to go from one to the other.

Looking for references that I should study to sort this. If it's even possible...

Thanks

Upvotes: 2

Views: 154

Answers (0)

Related Questions