Icon Processor

by Forum_account
An easy way to generate and process icons.
I am interested in your Perlin noise generator. I have it working for map generation, I am just wondering if you could explain the PerlinNoise datum a little more. Specifically what each of the variables and constants modify.

The ones I am curious about are:
var
const
SIZE
LINEAR
COSINE
interpolation
levels
scale
Perlin noise uses a matrix of random vectors and interpolates between those vectors to generate the noise values. The SIZE var tells it how large that matrix of vectors will be. You shouldn't need to worry about that too much but if you are making a 100x100 map you'd want the SIZE and scale to be set such that the noise values don't repeat.

The interpolation var determines what method is used to interpolate between vectors when generating noise values. It can be set to LINEAR or COSINE.

The scale var is a multiplier applied to all coordinates. If you're making a 32x32 icon and the size of the matrix you're using is 5x5x5. If you use each pixel's coordinates to get noise values the function will repeat (noise(1, 1, 1) is the same as noise(6, 1, 1) because the size is 5). You can set the scale to 0.1 so that calling noise(32, 32, 1) will actually sample the noise function at the coordinates 3.2, 3.2, 0.1.

The levels var determines how many times the noise function is sampled.

This web page has some good pictures to show how it works and what these variables are used for: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm
In response to Forum_account
Thanks for the rundown and the link. Perlin noise seems like it can be very useful in creating games.
Page: 1 2