Archive forJune, 2010

Fun With Perlin Noise

Here’s an experiment with Perlin noise. You might have to click in the window to get the keyboard controls to work:

To get a full range of pixel values out of the noise, I ended up implementing a histogram and with a value-stretch algorithm. I also implemented something like Photoshop’s Gradient Map function so I could map the greyscale values to a 2-color gradient. Finally, I used Flixel to visualize the bitmap as 3D terrain. Each floating square gets its color, size, opacity, and depth from a single pixel from the small image in the upper right corner. If you want to see a little more of whats under the hood, hit spacebar to toggle the detailed information display.

Comments (1)