Talk:Perlin Noise

From Unify Community Wiki
Jump to: navigation, search

Great implementation of Perlin. Very useful! Is there a way to have a different "seed" for noise on each instance of a prefab that shares the same noise script?

You could just add a random number to the input value.

Yeah was trying the same, but haven't figured where to put it. I'd tried setting a hi & low max with a Random.Range every Update and that just resulted in 'over excited' noise with all instances being the same. I tried putting a random value in the Start but that also resulted in all the instances appearing the same (same as without it).

Store the random offset in a private member variable. Initialize the variable in start and don't change it every frame in update.

Yeah I tried that before, but wasn't getting the results I'm looking for; was adding a little randomness to scale and to speed but it is not desirable. I guess the question is more of 'how to change the 'seed' value so that objects with the same noise don't appear in sync'?

There is no random seed in this perlin noise implementation. But what i suggested really works. You have to make sure that what your random seed value gets added to what you pass into the perlin noise lookup function. If you are using one of the utility function, then you will have to modify those functions to support the random seed, so they can add the see just before lookup up the perlin noise value.

I redefined speed to include a random var (on Start) and that worked! Scale wasn't giving the results I was looking for (even on Start). Thanks!

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox