Jump to content

Blending/Interpolating Normals


Recommended Posts

Say you have two sets of Normals on a surface that you would blend (based on an attribute), you can't use linear interpolation since yould be getting zero'd out normals and not the appropriate rotation of the vector

i'm pretty weak with quaternions and rotation vectors and such but is there some way to blend between two Normals (or rotations i suppose)?

Link to comment
Share on other sites

great example anim! i didn't even know spherical lerp was in vops heh.

i think the thing about quaternions and matrices is that they arent't too well documented on their usage in vops, they arent a simple scalar or vector data type so all the common sense things might not necessarily apply to them (like multiplying a vector by a matrix?)

i'm wondering if theres a resource on these things somewhere

Link to comment
Share on other sites

i think the thing about quaternions and matrices is that they arent't too well documented on their usage in vops, they arent a simple scalar or vector data type so all the common sense things might not necessarily apply to them (like multiplying a vector by a matrix?)

i'm wondering if theres a resource on these things somewhere

Google? :) Matrices and quaternions are heavily documented themselves. The problem is that the explanations are usually mixed along with low level details that you don't usually care about if you're using Houdini because all (or most) of the formulas are already implemented for you.

From an artist's bird's eye view, matrices allow you to transform (translate, rotate, scale) point positions (as 3-vectors) when you multiply them together. If you have a couple of transform matrices, you can multiply them together into a single matrix that represents doing those transforms all at once. Quaternions can be thought of as way to compactly represent a matrix that only does rotation around a particular axis into 4 numbers instead of using 9 (3x3) numbers. They're directly convertible back and forth from rotation matrices. Quaternions are also convenient for rotation interpolation (eg. slerp) so that the rotations are done in the "shortest path" between them. To do shortest path rotation interpolation, you could also do them using matrix math as well but in my opinion, it's easier in quaternions. (NOTE: This explanation is majorly simplifying it but you get the idea. :) )

Here are some other links that might help:

http://forums.odforc...ost__p__7292687 (see the attached .hip file examples in the later posts)

http://www.andynicholas.com/?cat=90

http://www.flipcode....ts/matrfaq.html

Link to comment
Share on other sites

Google? :) Matrices and quaternions are heavily documented themselves. The problem is that the explanations are usually mixed along with low level details that you don't usually care about if you're using Houdini because all (or most) of the formulas are already implemented for you.

From an artist's bird's eye view, matrices allow you to transform (translate, rotate, scale) point positions (as 3-vectors) when you multiply them together. If you have a couple of transform matrices, you can multiply them together into a single matrix that represents doing those transforms all at once. Quaternions can be thought of as way to compactly represent a matrix that only does rotation around a particular axis into 4 numbers instead of using 9 (3x3) numbers. They're directly convertible back and forth from rotation matrices. Quaternions are also convenient for rotation interpolation (eg. slerp) so that the rotations are done in the "shortest path" between them. To do shortest path rotation interpolation, you could also do them using matrix math as well but in my opinion, it's easier in quaternions. (NOTE: This explanation is majorly simplifying it but you get the idea. :) )

Here are some other links that might help:

http://forums.odforc...ost__p__7292687 (see the attached .hip file examples in the later posts)

http://www.andynicholas.com/?cat=90

http://www.flipcode....ts/matrfaq.html

that is some really useful info, i will read into this, thanks

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

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

×
×
  • Create New...