Jump to content

random functions


hatrick

Recommended Posts

I posted a question about that a while ago and my solution was to "paint" a distribution on to points and then uniformly and randomly sample from it to set a random attribute. It is cumbersome but works and you get the added advantage of being able to have complete freedom over the distribution shape. Other than that there is python of course and a few posts ago Symek posted a nifty resample trick in chops that does a similar thing.

You could also try ramping the randomly generated atts. I don't think it's the correct way but sometimes it's good enough.

Edited by Macha
Link to comment
Share on other sites

How Random is Random?

This is a pretty old thread, but Mario posted a vop node in here that outputs a "Uniform" Random... I love that phrase, if that's what you mean by proper.

Randomness in 3d is quite interesting too. It's not always so straightforward to get a uniform distribution of points. Consider the following: Create a bunch of points at [0,0,0] and displace them along randomly scaled vectors. The result will not be a sphere of uniform points. The reason for this, I believe, is that even though your length of the vector is truly random you get more points in a given unit volume the closer you are to the center. So they look denser there. If you use the standard random vex functions you will notice a similar behavior. Sometimes a cross-like pattern is visible (close to the axes, so I suspect a similar thing is happening there to what I described).

I think by proper Hatrick means a set of functions that give you more control than just plain uniform. Like these:

http://en.wikipedia.org/wiki/Probability_distribution

and we would have some expressions like these:

http://docs.python.org/library/random.html

Edited by Macha
  • Like 1
Link to comment
Share on other sites

Randomness in 3d is quite interesting too. It's not always so straightforward to get a uniform distribution of points. Consider the following: Create a bunch of points at [0,0,0] and displace them along randomly scaled vectors. The result will not be a sphere of uniform points. The reason for this, I believe, is that even though your length of the vector is truly random you get more points in a given unit volume the closer you are to the center. So they look denser there. If you use the standard random vex functions you will notice a similar behavior. Sometimes a cross-like pattern is visible (close to the axes, so I suspect a similar thing is happening there to what I described).

that kind of bheavior is quite logic... imagine evenly distributed points along axis between 0 and 1 .. then you rotate points randomly around [0,0,0] ... you get same result...

points from 0 to 0,5 will occupay 0.523 volume units (volume of a 0.5 radius sphere) and points between 0.5 and 1 will occupay 4.01 volume units...

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