Jump to content

Random Rotation expression for each primitive


Recommended Posts

Hi all, I am trying to rotate a bunch of primitives with a rand expression under the rotate channel. But the result is that all the rotations of the primitives look somewhat similar. Am I doing it the right way? I am looking for a random(different) rotation for each primitive. All help provided is very much appreciated. The node that controls the rotation is colored yellow.

ripple_inPops_testing_v009.hipnc

Link to comment
Share on other sites

Hi all, I am trying to rotate a bunch of primitives with a rand expression under the rotate channel. But the result is that all the rotations of the primitives look somewhat similar. Am I doing it the right way? I am looking for a random(different) rotation for each primitive. All help provided is very much appreciated. The node that controls the rotation is colored yellow.

The rand function is only going to give you a 0-1 value, in degrees this is quite small. Try:

fit01(rand($PR+seed),-180,180)

  • Like 1
Link to comment
Share on other sites

Between those two, nothing. But if you use something like e^(-Rand()^2)*360 you can get a more controlled distribution of the rotations. That particular function will give you lots of low rotations and some very large ones. It is very similar to the standard bell curve. Actually, if you replace Rand()^2 with (Rand()*2-1)^2 you will get the full bell curve for your distribution. The two methods that were looked at earlier will have the exact same effect though.

I like to try to do things with math when I can because I can manipulate it easier to control and introduce less randomness to the random function. I know that seems a little counter intuitive, but being able to have a broad control over a random feature can be very powerful.

Link to comment
Share on other sites

my work mate pointed something interesting out

Rand()*2-1

and

fit01(rand(),-1,1)

yield identical results, so I guess really it's just a matter of prefference.

For me the fit function pretty much tells the story at a glance; ie: It's intention is obvious...nice if someone else has to pick up your scene.

While complex math formulas can become neccessary, i think it's best to go with the simplest of solutions if given the option... Occam's razor razor and all... o_0

Edited by 3dbeing
Link to comment
Share on other sites

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