Jump to content

random rotarion added to the each Y axis


Recommended Posts

Hi people!

Justa superquick issue B)

I need to keep the normal direction of the point, so all the heads will be oriented along the normal direction. BUT I would like to randomize their rotation around the Y axis, so they should not be all "looking straight up" but they should be ALL randomly rotated along each of their Y axis. I hope this explanation does make a bit sense. :rolleyes:

I am attaching the file.

Thank you so much for any advice guys!

rotY_issue.hipnc

rot.JPG

Link to comment
Share on other sites

Hi,

You can write something like this to add some random rotation around N:

float angle = radians ( fit ( rand ( @ptnum + ch("seed") ), 0, 1, -360, 360 ) );
@rot = quaternion ( angle, normalize ( @N ) );

image.thumb.png.a559170fa5ac0255e244f3fe107ed30f.png

Make sure the geometry to be copied is aligned to Z axis though.

VcpwTuL.gif

Link to comment
Share on other sites

  • 5 months later...

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