PDA

View Full Version : Instance Info node, Fixed Random: changing seed at Surface level



raw-m
04-29-2018, 02:08 PM
Struggling to find a way round this, can anyone help? I'm using Instances in LW2018 and happy with placements. In the Surface Editor, I'm using 3 images and Fixed Random to randomise the look. Trouble is, I'm not keen on the distribution and also think I'd like to swop them all around every few frames. Anyone know how/if I can change the seed of the Fixed Random? I've tried multiplying/adding with other variables but each attempt I've tried seems to move the base 0-1 output range defined within Fixed Random.

MonroePoteet
04-29-2018, 02:44 PM
I almost always use the Tools=>Random Scalar with the Instance ID as the Seed:

141460

Then, you can use anything for the seed - a constant, Null location (e.g. Y Position) or some math on the Instance ID.

BTW, if that setup looks familiar, it's my remake of your "Contrain Instances Inside Lettering" tutorial using the 8-BIT lettering. Wonderful tutorial! Thanks!

mTp

raw-m
04-29-2018, 03:03 PM
Ah, thanks mTp :D

So using the ID Index (which isn't 0-1) is still creating random number between the min/max range? I tried using Fixed Random as the seed input but it didn't work, presumably because the seed is an integer. Sometimes you think you get it, then.....

MonroePoteet
04-29-2018, 03:24 PM
Yes, the Seed is any integer in the valid range of Integers, and any given Seed will always produce the same "pseudo-random number". I'd guess that the Fixed Random output of the Instance Info node is just doing what I describe: feed the Instance ID into the Random Scalar Node. I don't think there's any value in trying to use the Fixed Random as the Seed.

BTW, I've sometimes been successful using a Scalar as an Integer input by running it through the Floor node. Even though the Floor output is Scalar, it seems to be interpreted more readily by Nodes as an Integer.

As always - have fun!

mTp