TomRaynor Posted April 12, 2014 Share Posted April 12, 2014 I have constructed a rotation matrix for each particle in my simple set up using a velocity vector and an up vector. I am trying to rotate this matrix around the velocity vector for each particle and bind that to the orient attribute. It works well without the rotate but for some reason if you disable the "rotate1" VOP inside "/obj/ORIENTATION_TESTING/vopsop_createOrient", the particles don't rotate around the velocity vector as I would expect, instead they seem to do some other weirdness and flip around all over the place. If I try and rotate about any other axis, such as the up vector or some other arbitrary axis then it seems to behave itself. Any ideas? Quote Link to comment Share on other sites More sharing options...
TomRaynor Posted April 12, 2014 Author Share Posted April 12, 2014 Apologies... Now with attached hip file. rotateAroundVelocity_v01.hip Quote Link to comment Share on other sites More sharing options...
Hudson Posted April 12, 2014 Share Posted April 12, 2014 Hi tom! First of all my particles never flipped around and behaved weird as you said it would when I disabled the "rotate1" -VOP. Maybe you shared an older version of the scene? Anyhow I multiplied the orient created in POPs (just a rotation around the Z-axis) with your lookat-VOP. You can do that rotation after the sim as well. I hope this helps Now have a nice weekend rotateAroundVelocity_Fixed.hipnc Quote Link to comment Share on other sites More sharing options...
TomRaynor Posted April 12, 2014 Author Share Posted April 12, 2014 Hmmm, I still see flipping when trying to rotate the gizmos around the particle's velocity vector. I have disabled the pop torque as I want to get it working post simulation rather than in the sim. I have animated the rotate angle in the VOP SOP but still don't see the behaviour I would expect (each gizmo around its velocity vector like an arrow). Any thoughts? rotateAroundVelocity_stillNotWorking.hipnc Quote Link to comment Share on other sites More sharing options...
Skybar Posted April 12, 2014 Share Posted April 12, 2014 Does it work better if you normalize the vel before using it? Ie, put a Normalize VOP after the velocity import, between your Lookat VOP and Rotate VOP. Quote Link to comment Share on other sites More sharing options...
TomRaynor Posted April 12, 2014 Author Share Posted April 12, 2014 Damn, yeah that is was it. I thought that the input normalised it for me. I assumed wrong... Thanks Skybar, working fine now. 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.