AWS Thinkbox Discussion Forums

Psuedo Random

I’m using the tried and true method of getting the psudeo random in magma–pID / .1234 into a Noise op. With normalize on, the values are -.611/.67. Why is this? Why don’t the numbers range from -1/1?

The noise value is calculated using multiple Octaves, by default 4. This means that several “layers” of noise are blended together, and depending on how their values combine, they can approach the value of 1.0 or -1.0. However, in most cases this value is not reached, and as the highs and lowes of the individual layers merge, they push each-other down more and more.

For example, let’s say I use a Noise with default Octaves 4, Lacunarity 0.5, Normalize on, InputChannel Index -> ToFloat -> Divide (0.1234) and output to Density. If I look in the Magma Debugger, the Min and Max are indded -0.613247 to 0.671681 for a teapot PRT Volume I applied this to.

But if I change the Num Octaves to 1 without changing anything else, the Min is -0.99787 and Max is 0.999542, so they approach the -1.0 to 1.0 range without reaching the limits. However, particles with close Indices might produce very similar values because one Octave does not generate enough variety.

As I increase the Octaves, the noise gets more detailed, but also more blurry and the minimums and maximums go down.

I have already logged a wishlist item against an actual PsudoRandom Magma operator, so we can stop using high-frequency Noise some day :slight_smile:

Privacy | Site terms | Cookie preferences