The Terrain from Noise article on Red Blob Games is a good place to see some common techniques for shaping noise. You can tweak the aesthetics of a noise functional by manipulating its values with math. Most of the time you don’t need to create your own noise function to get a particular look. Other noise functions-like Worely and Value Noise-offer different aesthetic qualities, and it is quite possible to create your own noise function that looks the way you want. These characteristics make it a useful basis for many applications that require natural-feeling variation. The variation is also visually isotropic: it looks the same at different rotations. ![]() The variation in Perlin Noise is band-limited: the frequency of values is predictable and even, without flat or noisy areas. Perlin Noise provides random values with a particular aesthetic arrangement. The p5 noise(x) function returns values sampled from Perlin Noise. You can freeze the circle line without changing the behavior of the big circle. You have to freeze the big circle and the circle line together.Īchieving repeatable results with noise() is more flexible. Repeatable results can be achieved with randomSeed(), but the effect is global and fragile. The frequency of size changes can be controlled and smooth transitions are natural. The values provided by noise() are arranged spatially. The circles change size at high frequency and with no transition. The values provided by random() are independent and unrelated. It’s easy to control the range of values provided by random(). Variation is created with the random() function, which allows control over the amount of variation, and global (and fragile) repeatability via the random seed.Ĭompare the code and results of the two examples above. This example draws a big circle, and a line of smaller circles. If our samples are far apart the variation will be be drastic, unpredictable and look a lot like random(). If we sample a small area of the noise function the variation will be subtle and gradual. With noise() we can control how quickly the size changes horizontally, vertically, and over time. The values from random() the sizes of the boxes won’t be related at all. You want random-but controlled-variation.īoth random() and noise() provide a source of variation, but noise() provides much more control. You want to be able to control the value from a larger context. You always want the same, specific value. Where do those values come from? They could come from a few places. ![]() ![]() You would need to provide several values for each square: horizontal position, vertical position, width, height, and color. From voplib.Consider the code you would write to draw the blue squares above. Is there another noise generator that might be better suited? thanks! A quick look on the www turns up Wavelet noise and newer variants of Perlin noise. If not, is there a good way to handle this? There are a variety of other VOPs available, but i've focussed on Perlin because it seems to be suitable for a variety of tasks. Is there a good way to get the undulation? The Turbulence VOP doesn't seem to anti-alias the noise. I notice that Worley and Voronoi generate 4D noise, but it doesn't look like the 4th dimension is time. The Perlin Noise wikipedia entry states that there is a 4D variant which takes time as a parameter. The fluid surface should undulate over time. The Turbulence VOP, with type set to 3D Perlin Noise, has additional parameters which are not described in the VOP help: - offset: ? - roughness: ? - attenuation: ? - turbulence: ? If someone can explain what these do, or point me to a reference it would be appreciated. As i understand it, the 3D Perlin noise function takes 3 floats as input and outputs a float based on the following settings: - a first “octave” or “band” with parameters: - amplitude: the maximum absolute value the noise can attain - frequency: the number of cycles per unit length - optionally additional octaves, each derived from its predecessor by: - lacunarity or persistence: frequency multiplier between octaves - gain: amplitude multiplier between octaves I think this means that i pipe the position into, say, the Turbulence VOP and output the noise through a Displace Along Normal VOP. I'm trying to determine how to use the Noise VOPs to simulate a 3D fluid surface which undulates over time.
0 Comments
Leave a Reply. |