Random Material Seed

Ive been searching for a while to get a way to be able to create random seeds in the materials.
unfortunally i didnt find any.
Today i finally thougth a very good way to get a changeable random seed for the Input>Object>Random node:

it is so simple that i feel stupid i didnt come up with it earlier, if you change the size you will get these results:

It is also animateable, this will give some sort of firelike flickering when its played slowly.

I hope you guy can get a good use for it!

Other than coming up with a random seed - I don’t think the Voronoi texture is doing anything here. If you had the random pointing directly into what your Voronoi Fac is going into, you would have more or less the same result (1 random numb er between 0 and 1 per object)

i am not good at explaining but i try. so, the voronoi can be repaced by other textures but i think the voronoi looks the most evenly distributed. Changing the voronoi scale changes the distribution of the randomness. so using multiple voronoi with different scales can change the random value of the objects

i apologize for bad english

Ahh - - I see… yes, and it means you can get more than one random number per object.

Another method is…

Object Info Random into maths node: multiply by prime number - then the output of that into another maths node : modulo 1.

oh ok i tried it out. but i got a little confused

do i have to always change the prime number?

cause one has to do some math then to get the random seeds, the voronoi way there is only 1 number, personal prefference.

Yep, that’s exactly what I meant…

The advantage of using prime numbers is that they will never be in sync with each other… if you have, for example, a 4 and an 8 they will be in sync with each other every so often. I guess that would be the same as using a 1 and a 2 and it will work with any number.

Using a 1 will be the same as just having random go straight into the output.

The next test is… which is faster?

the one was 0.001 seconds faster!

1 Like

Or you can do random -> noise with 42.5, 0, 42.5 and use the color output fed into separate HSV. The H output will produce a more uniform distribution than the other two more normal distributions. Alternatively, one I use often myself, is to separate into RGB instead after having done a contrast node to straighten out the distribution (very non scientific :p).

1 Like