ikarus Posted May 11, 2011 Share Posted May 11, 2011 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)? Quote Link to comment Share on other sites More sharing options...
edward Posted May 11, 2011 Share Posted May 11, 2011 Can't you just do this with a VOP SOP? It has some VOPs for quaternions. Quote Link to comment Share on other sites More sharing options...
anim Posted May 12, 2011 Share Posted May 12, 2011 here is VOP example blend_normals.hip Quote Link to comment Share on other sites More sharing options...
ikarus Posted May 12, 2011 Author Share Posted May 12, 2011 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 Quote Link to comment Share on other sites More sharing options...
edward Posted May 12, 2011 Share Posted May 12, 2011 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 Quote Link to comment Share on other sites More sharing options...
ikarus Posted May 12, 2011 Author Share Posted May 12, 2011 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 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.