Trying to manipulate orient

   6842   5   1
User Avatar
Member
79 posts
Joined: March 2012
Offline
I have a particle Sim, I am copying some geo's on it, everything is oriented nicely, what would be the best way to manipulate the orient so that I can randomize the rotation of my orient vector in z-axis, I've tried creating a new vector based on my up and normal (perpendicular vectors) and double cross it with up to create an axis which I used to multiply the rotation matrix but it has a very slight effect unlike when you do a rotation matrix.

In short how would you rotate a orient vector before copy node.
Edited by rizviali110 - July 18, 2017 18:46:26
FX - Artist / TD
User Avatar
Member
79 posts
Joined: March 2012
Offline
figured so thought of sharing it here..

you can basically split out each element and manipulate it, I just realized the correct way of visualizing orient is by turning on axis on each point (under visualization style) .. inside vops you can bind orient in and connect vector4 to vector that ll give you all 4 values (1 vector OR 3 floats with an additional float value ), again drop a vector to float and split the xyz axis, now you can pick any axis along which you want to randomly rotate the orient (in my case I use z axis because I am aligning things up based on that), again float to vector 4 and you can add or multiply between the vector to float and this float to vector 4, connect 4th value from the vector 4 to vector , bind it back to orient and done.
FX - Artist / TD
User Avatar
Member
8 posts
Joined: April 2017
Offline
Can anybody tell me if you use the randomize attribute, what the default min-max value should be of the orient attribute?
Degrees go from 0 to 360, what about the orient attribute?
User Avatar
Member
7757 posts
Joined: Sept. 2011
Online
Orient doesn't use min/max. Change the distribution mode to Orientation/Direction, and dimensions to 4. You either get the full hypersphere, or you can bias the orientation to a specific orientation and/or clamp to within an certain angle of the specified orientation.
User Avatar
Member
86 posts
Joined: Aug. 2010
Offline
always wished there was a more straightforward method of getting rotations to points than orient.
orient is a vector4 attribute,randomizing one axis is easy,but trying out anything more sophistcited(e.g animating point rotations is hard)
the xon can
User Avatar
Member
8539 posts
Joined: July 2007
Online
thexon
always wished there was a more straightforward method of getting rotations to points than orient.
orient is a vector4 attribute,randomizing one axis is easy,but trying out anything more sophistcited(e.g animating point rotations is hard)
not sure what exactly you mean by hard or what you are trying to do
if you want to define rotation as angles there is Euler to quaternion VOP or VEX function
or Maketransform VOP and convert to quaternion
VOPs and VEX offer lot of quaternion and matrix functions that alow you to control rotations in simple and precise ways whereas keeping the rotation as euler angles for any operations would have countless issues like flipping, gimbal locks, …
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links