efour Posted June 24, 2020 Share Posted June 24, 2020 I need help I newly started with Houdini and doesn't know hot vops and vex works and I want to create a line where the normals are pointing in a different direction while keeping a 90-degree angle to the line. I fount a tutorial on the internet which only make the normals point in a random direction but not in the 90-degree angle I tried to set the normal direction to zero with floats and stuff but it always results in vex errors. @N = sample_direction_uniform(rand(@ptnum)); rand nomrals.hip Quote Link to comment Share on other sites More sharing options...
animatrix Posted June 24, 2020 Share Posted June 24, 2020 Hi, There are many ways to do this. Here is one way: float r = radians ( 360 * rand ( @ptnum ) ); float x = sin ( r ); float z = cos ( r ); @N = set ( x, 0, z ); Quote Link to comment Share on other sites More sharing options...
efour Posted June 24, 2020 Author Share Posted June 24, 2020 (edited) 4 hours ago, animatrix said: Hi, There are many ways to do this. Here is one way: float r = radians ( 360 * rand ( @ptnum ) ); float x = sin ( r ); float z = cos ( r ); @N = set ( x, 0, z ); float r = radians ( 360 * rand ( @ptnum ) ); float x = 0; float z = 0; @N = set ( 0, 1, r); Thanks but the normals aren't random at a full 360 degrees and the normal size varies I need them no be uniform because I want them to drive the velocity of a pop simulation edit: sorry my line was not on the right axis (wrong up vector) it works Thanks Edited June 24, 2020 by efour add 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.