Jump to content

rotations, particles, transition to velocity directions


itriix

Recommended Posts

Hello all

Right now i'm a bit brain dead on rotations, particles and having a transition from a rotation to a different rotation. I'm attaching an example. It's a bit messy because it has quite a few failed attempts tossed around. Imagine a vine, swinging around in the wind. Attached to the vine are some arrows, that are dangling around like leaves in the wind, rotating and swinging as the vine swings... After a certain magnitude has been reached *calculated from the velocity of the vines*, I want the arrows to release from the vine, and then begin a "new" rotation, towards their flight velocity direction... rotating essentially from their "swinging" rotation, to their velocity direction!

I originally was able to get this mostly accomplished using copy stamping, and using some stamp parameters in the rotation channel... however, i will not be "copy stamping" in the end, but instead delayed loading. Therefore, I need to get the "orient" or rotation actually occuring on the points.

Please if you have any ideas, that would be fantastic. You will also notice, in my vopsop, where i was attempting to get some rotations to occur, that I only have it happening for one axis! I was a bit lost on how to get it for multiple axis at the same time!

Cheers,

Jonathan

arrows_take_off_from_some_vines5.hip

Link to comment
Share on other sites

Hello all

Right now i'm a bit brain dead on rotations, particles and having a transition from a rotation to a different rotation. I'm attaching an example. It's a bit messy because it has quite a few failed attempts tossed around. Imagine a vine, swinging around in the wind. Attached to the vine are some arrows, that are dangling around like leaves in the wind, rotating and swinging as the vine swings... After a certain magnitude has been reached *calculated from the velocity of the vines*, I want the arrows to release from the vine, and then begin a "new" rotation, towards their flight velocity direction... rotating essentially from their "swinging" rotation, to their velocity direction!

I originally was able to get this mostly accomplished using copy stamping, and using some stamp parameters in the rotation channel... however, i will not be "copy stamping" in the end, but instead delayed loading. Therefore, I need to get the "orient" or rotation actually occuring on the points.

Please if you have any ideas, that would be fantastic. You will also notice, in my vopsop, where i was attempting to get some rotations to occur, that I only have it happening for one axis! I was a bit lost on how to get it for multiple axis at the same time!

Cheers,

Jonathan

Hey

I didnt have a chance to take a look at your file, but here is a link on the math to get the angle between two direction vectors.

http://www.euclideanspace.com/maths/algebra/vectors/angleBetween/index.htm

Basically, the two important bits is this to get the angle and axis

angle = acos(v1•v2)

axis = norm(v1 x v2)

Ive attached a file which will rotate a Normal from its current direction to a destination direction. Theres a "Mix" parameter which rotates it from current to destination.

Hope this helps.

rotateN_001sl.hip

Link to comment
Share on other sites

Thanks! That did the trick with some modifications. I still would like to learn more about matrix rotations and quaternions. I was trying to do this with that kind of an approach but was stuck. Some day when I get time, i'd like to study the whole rotation thing a bit more. It seems very essential. I just wasn't sure about the math.

Anyways, Thanks again!

Cheers,

Jonathan

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