4 ms·
Hmm... Perlin noise is a lot more complex to generate than I was expecting.
by drcode 10y ago
Hmm... Perlin noise is a lot more complex to generate than I was expecting.
- mrspeaker 10y agoYou don't win an Academy Award for Technical Achievement for Math.random()!
- chipsy 10y agoMany folks looking for a Perlin-like effect end up using the diamond-square(or "midpoint displacement") algorithm, which has a similar look but a somewhat simpler implementation: For each segment take the midpoint of the linear interpolation and add noise at a smaller magnitude. Recurse in until you are at the desired scale. In 2D, flip the sample points between a "square" pattern and a "diamond" pattern each time to avoid a boxy tiled look. The biggest downside of this method is that it's much less flexible about scaling: to get more resolution you have to double each dimension.