We’re not even limited to frequencies chosen this way we can choose frequencies separately in the X and Y dimensions. Why? I think it’s related to the Nyquist Limit: the very high frequencies produce features that are too fine to be seen in the 128x128 bitmap. Why is that? I think it’s because the low frequency spike is spread out over space so it’s harder to see, but I’m not sure. Notice how high frequency spikes have a stronger effect than low frequency spikes. Try spikes on the left or right to see what those frequencies look like.
Low everywhere except a small spike in the middle.Reset the frequency spectrum to use an exponent, then draw on the chart on the left (log-log scale) to generate 2D noise: In this section, we’ll start with exponent-shaped frequencies, but then you can change it to anything you want. 2 Sculpting the frequency spectrum #Īs explained on the main page, we’re not limited to using exponents. Higher exponents are used for non-landscape uses of noise like textures or object placement. Interpreting the noise as a landscape only works well when using negative exponents. Low freq range, exponent near -1, try different freq ranges to see how adding higher frequencies makes the output “grainier”.You can see what a narrow band of frequencies can produce. Low freq range, exponent near 0, start raising freq start to see how it increases frequencies.Move the exponent slider to see how the same sine waves mixed together differently produce different outputs.
In the next section it’ll be more free form. Similarly, you can limit to high frequencies in two ways. If you only want low frequencies, you could either do that by limiting the frequency range, or by setting the exponent to be low. The TL DR is that negative exponents are used to generate height map landscapes and positive exponents are useful for placing map features. See the introductory article for an exploration of the exponent. freq start: the lowest frequency \(f_\text\)) to be \(f^e\).So instead, I have three frequency controls: In 2D there’s an amplitude for every combination of X-frequency and Y-frequency.
By setting the amplitude to \(0\) we don’t mix that frequency in at all by setting it to \(1\) we mix it with full force. For each frequency we need to choose an amplitude.
On the introductory article, I do that step by step, with sample code and diagrams for 1D noise. 1 Generating noise #īackground: I wanted to generate maps by mixing together sine waves, using the Inverse Fourier Transform. If you just want map generation with noise and don’t care about Fourier Transforms take a look at my newer article. This page is rough, and originally was only for me I haven’t polished it like most of my articles, but decided to share it anyway. The main article describes 1D noise but the same principles apply here. These are some quick & dirty experiments I did with 2D noise.