"spherical linear interpolation" when blending primitive trans

Recommended Posts

Hi there.

Houdini 14.0.215: The Blend Shapes SOP and Time Blend SOPs now have an option to use spherical linear interpolation when blending primitive transforms.

Thanks to this change, some time warps with packed primitives that were badly deforming the copies now work seemingly well.

Can anybody explain what´s this and what´s going un under the hood. Wikipedia hints this is related to quaternion rotations but I could certainly take a specific explanation to what´s going on there.

Share on other sites

I assume it's matrix to quat and then slerp(quat) and then quat to matrix? Or do you want to know the exact code?

Share on other sites

Quaternions can represent a rotation, just like Euler angles. Blending the 2 sets of 3 Euler angles individually often shows bad flipping and weird twisting rotations, whereas spherical linear interpolation with quaternions just "does the right thing" and takes the shortest path between two orientations.

Spherical Linear Interpolation basically forms a plane between the two orientation vectors (imagine two vectors pointing down Z in each orientation, like a lookat vector) such that both lie on that plane. Then, it interpolates between those 2 vectors such that they all lie along the shortest arc between those vectors on that plane. The "twist" around each of those vectors is interpolated as well. I can show you the math if you like, but that's easy to search for and not nearly as easy to grasp

Share on other sites

Thanks for fixing this bug Mark

Now that packs prims finally can make transforms correctly, we just need to have a faster preview in the viewport and this will make packs prims a much better option for production.

Cheers.

Share on other sites

ah, I see.

So, is this only for packed, or should it be enabled every time? I ask because it´s not enabled by default.

Share on other sites

I didn't implement it, so I'm afraid I can't really answer the implementation-specific details (just drawing on my knowledge of slerps from my CHOPs days). My guess is that it's off to maintain backwards compatibility, so loading an H13 file into H14 doesn't produce different results. It'll be slower than normal interpolation as well, but I don't think that's the reason it isn't enabled.

Share on other sites

Spherical Linear Interpolation basically forms a plane between the two orientation vectors (imagine two vectors pointing down Z in each orientation, like a lookat vector) such that both lie on that plane. Then, it interpolates between those 2 vectors such that they all lie along the shortest arc between those vectors on that plane.

Slerp alone does not always produces shortest path, so I assume there are some dot product checks to ensure that.

Share on other sites

There is a check that determines which arc to interpolate along, and it picks the shortest one. Though I thought that was a standard part of the slerp algorithm, so I didn't mention it

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×

• Support

×
• Create New...