APG Posted November 23, 2016 Share Posted November 23, 2016 hello,How do I connect using vop? thanks,please help me. Quote Link to comment Share on other sites More sharing options...
catchyid Posted November 23, 2016 Share Posted November 23, 2016 Hi, I don't have much experience in VOP, so here is just a quick comment : a quaternion should be converted to an angle AND rotation axis (i.e. a quaternion to angle won't work, it must be an angle and rotation axis). Have you checked VEX functions, or VOPs? I am sure that conversion must be straightforward... Quote Link to comment Share on other sites More sharing options...
APG Posted November 23, 2016 Author Share Posted November 23, 2016 1 hour ago, catchyid said: Hi, I don't have much experience in VOP, so here is just a quick comment : a quaternion should be converted to an angle AND rotation axis (i.e. a quaternion to angle won't work, it must be an angle and rotation axis). Have you checked VEX functions, or VOPs? I am sure that conversion must be straightforward... Thank you for your answer. I get the angle just to rotate the model,How can I use the resulting quaternion to rotate my model? Quote Link to comment Share on other sites More sharing options...
shawn_kearney Posted November 23, 2016 Share Posted November 23, 2016 (edited) Convert quaternion to matrix3 and multiply by position, with position on the top input such that the output is vector. Similar to "make transform". I don't totally understand matrix as well as I'd like to, but essentially matrix3 can be used for rotation, while matrix4 can be used for both rotation and position/scale. They are applied by multiplying the position vector by the matrix. For a 2D primer on the subject:https://www.khanacademy.org/math/algebra-home/alg-matrices/alg-matrices-as-transformations/v/transforming-position-vector For application in Houdini: http://www.hossamfx.org/math-in-houdini/ Edited November 23, 2016 by shawn_kearney Quote Link to comment Share on other sites More sharing options...
narbuckl Posted November 23, 2016 Share Posted November 23, 2016 Great resource on matrices and quaternions: http://www.tokeru.com/cgwiki/?title=HoudiniVex Quote Link to comment Share on other sites More sharing options...
APG Posted November 24, 2016 Author Share Posted November 24, 2016 19 hours ago, shawn_kearney said: Convert quaternion to matrix3 and multiply by position, with position on the top input such that the output is vector. Similar to "make transform". I don't totally understand matrix as well as I'd like to, but essentially matrix3 can be used for rotation, while matrix4 can be used for both rotation and position/scale. They are applied by multiplying the position vector by the matrix. For a 2D primer on the subject:https://www.khanacademy.org/math/algebra-home/alg-matrices/alg-matrices-as-transformations/v/transforming-position-vector For application in Houdini: http://www.hossamfx.org/math-in-houdini/ Thanks for the answer. I succeeded in calculating the angle,But the rotation center point of this angle is in world coordinates(0,0,0),It is not understand. Quote Link to comment Share on other sites More sharing options...
shawn_kearney Posted November 24, 2016 Share Posted November 24, 2016 (edited) After posting I was a little worried about that. The math involved with actually getting a set of rads out of q doesn't look too crazy, if a little tedious (VOPs would be a tangle mess, better done in VEX).http://stackoverflow.com/questions/12891843/java-converting-a-quaternion-into-radians-or-degrees From here you could just take that, convert to deg and use "make transformation" binding your pivot attribute to the pivot parameter. I will poke around and see after the holiday here. What exactly are you trying to do here? It looks like you're working with DOP geometry? Edited November 24, 2016 by shawn_kearney Quote Link to comment Share on other sites More sharing options...
shawn_kearney Posted November 25, 2016 Share Posted November 25, 2016 (edited) @APG Is this what you're looking for? quat2.hiplc Edited November 25, 2016 by shawn_kearney optimized file 1 Quote Link to comment Share on other sites More sharing options...
APG Posted November 25, 2016 Author Share Posted November 25, 2016 1 hour ago, shawn_kearney said: @APG Is this what you're looking for? quat2.hiplc thanks for your answer. see attachment,please. rot_v004_apg.hipnc 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.