Mogul4200 Posted September 27, 2018 Share Posted September 27, 2018 I've been looking all over the place to find a way to make my particles have an up vector perpendicular to the normal it is on. I have the particles flowing around a sphere. I have seen many solutions for this type of thing, but I'm too new to implement this for my situation. Thank you for the help. particlesFlow.hip Quote Link to comment Share on other sites More sharing options...
StepbyStepVFX Posted September 27, 2018 Share Posted September 27, 2018 Mathematically speaking, you have an infinite number of vectors that are perpendicular to a given vector. To chose one of them, you usually use a second vector, and make a cross product between your two vectors. The vector you obtain is perpendicular to the two firsts and is unique. So what you can do is do a cross product (in a POP Wrangle, with VEX function cross(vector 1, vector 2)), and use the normal and a second vector. I don't know how your normal was build, but when I need to create a frame of vectors on particles, I like to use : v@up = {0,1,0}; @N = normalize(@vel); (if velocity != 0) Then i do the cross product on those 2 vectors, but in my case, up vector is... up :-) So I am not sure if that helps you... Maybe what you need is : vector3 tempup = {0,1,0}; (temporary up vector) vector3 tempz = cross(normalize(@N), v@tempup); (and you can set @N to be normalized speed, if you want, like example above) v@up = cross(@N, v@temp); 1 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.