Netvudu Posted February 17, 2015 Share Posted February 17, 2015 Hi there. The journal reads 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. Quote Link to comment Share on other sites More sharing options...
magneto Posted February 17, 2015 Share Posted February 17, 2015 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? Quote Link to comment Share on other sites More sharing options...
malexander Posted February 17, 2015 Share Posted February 17, 2015 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 1 Quote Link to comment Share on other sites More sharing options...
lisux Posted February 17, 2015 Share Posted February 17, 2015 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. Quote Link to comment Share on other sites More sharing options...
Netvudu Posted February 17, 2015 Author Share Posted February 17, 2015 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. Quote Link to comment Share on other sites More sharing options...
malexander Posted February 18, 2015 Share Posted February 18, 2015 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. Quote Link to comment Share on other sites More sharing options...
rayman Posted February 18, 2015 Share Posted February 18, 2015 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. Quote Link to comment Share on other sites More sharing options...
malexander Posted February 19, 2015 Share Posted February 19, 2015 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 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.