Jump to content

Calculating a rotational matrix.


Symbolic

Recommended Posts

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.)

Link to comment
Share on other sites

Guest Swann

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

  • 7 years later...
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!

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...