Symbolic Posted July 3, 2010 Share Posted July 3, 2010 Hi, I am trying to calculate a rotational matrix for the points on an animated curve. But it just does not work as I expect it to work. I have a curve with, lets say 19 points, and it is swimming around, simple wire simulation. What I do: * Calculate the tangents. So I have a nice "N" aligned with the curve for each point. * By normalising and cross, I get couple of extra vectors. * Now comes the complex part, I know that as part of calculating the rotation, once should use the "Align VOP" and then this gives us a Matrix3... and then? do we extract the transformation? do we convert to Matrix4? * Which vector we align to what? Do we compare our vectors to an up vector like (0,1,0)? You see, I have some fundamental and serious confusions I would be really happy if somebody can share their matrix creation and application examples, and some links to resources related to this topic. Thanks. (... ah and just to add. I am trying to place some cubes on these points. But I would like them to properly align, just like "N", "up" and a CopySop would make them to align nicely, only that I would like to that with the rotational and transformational matrices. By the way, the transformation matrix works fine. Which means that, when I connect 19 cubes sitting in the origin to my VOPSOP network and multiply their position with the transformation matrix (per "class")... they snap to those curve points.) Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted July 3, 2010 Share Posted July 3, 2010 Can you post your hip ? I know that it's simpe but everything I'm doing works as expected and judging by time you play with this (and number of people involved to help you in your previous topics that, I supose, concerned the same project) there must be really something wrong there, so I really like to take your setup and play with it (propably other to). Quote Link to comment Share on other sites More sharing options...
Symbolic Posted July 3, 2010 Author Share Posted July 3, 2010 Can you post your hip ? I know that it's simpe but everything I'm doing works as expected and judging by time you play with this (and number of people involved to help you in your previous topics that, I supose, concerned the same project) there must be really something wrong there, so I really like to take your setup and play with it (propably other to). Hello SWANN, Well, it is all over the place. The wire thing works fine now. I kind of solved my problems with the "Sweep Sop" and feeding my attributes into it to create a nice bend and twist and everything orients well etc. However... I tried to control the twisting of the instances by manipulating the rotational values of a matrix that I build around the deformation of the curve. I have couple of workflows to add rotation to an existing matrix4, but the problem is creating one from scratch. but you are right about the file. I will try to put something together so we make a good case. Meanwhile, any help is welcome. The setup is simple. A wobbly curve moving around, twisting waving etc. and cubes instanced on the curve points. As I said, a good tangent "N" an "up" vector crteated around that "N" and a copySop is working fine, only that I am trying to understand matrix opearations in VOPSOPs. Thanks. Quote Link to comment Share on other sites More sharing options...
symek Posted July 3, 2010 Share Posted July 3, 2010 Some examples with: ortho vectors -> matrix -> quaternion -> vectors (hit play) does it help? skk. rotation_matrix_quaternion_ortho_vectors.hip 2 Quote Link to comment Share on other sites More sharing options...
symek Posted July 3, 2010 Share Posted July 3, 2010 I missed the one without any matrix (angle / axis -> quaternion). All are simple anyway... rotation_matrix_quaternion_ortho_vectors.hip 4 Quote Link to comment Share on other sites More sharing options...
petz Posted July 4, 2010 Share Posted July 4, 2010 I will try to put something together so we make a good case. Meanwhile, any help is welcome. The setup is simple. A wobbly curve moving around, twisting waving etc. and cubes instanced on the curve points. As I said, a good tangent "N" an "up" vector crteated around that "N" and a copySop is working fine, only that I am trying to understand matrix opearations in VOPSOPs. Thanks. i guess this belongs to your previous post so i put a simple example on top of the older one. hth. petz matrix_rot.hipnc 1 Quote Link to comment Share on other sites More sharing options...
Symbolic Posted July 4, 2010 Author Share Posted July 4, 2010 Thanks alot guys! Thank you very much... I will look at the files as soon as possible. Very very exciting. Cheers Quote Link to comment Share on other sites More sharing options...
smbell Posted June 15, 2018 Share Posted June 15, 2018 On 7/3/2010 at 4:30 PM, symek said: I missed the one without any matrix (angle / axis -> quaternion). All are simple anyway... rotation_matrix_quaternion_ortho_vectors.hip I know this thread is super old, but I just wanted to say how much this file has helped me. In the process of converting them to vex and having all the different combos of rotations is so awesome! 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.