well perlin normally return a number from -1 to 1.. if yours returns from 0 to 1, then maybe some conversions have been applied to it.
something like (0.5 + 0.5 * perlin value.)
and that line means set a variable with the perlin height number
normaly in this step you would also the above transformation and a height amplification
like (0.5 + 0.5 * perlin value.)* max height value.
Then make a look from 0 to the pelin value, assuming that your height array starts at 0. where 0 value = bottom of the world, some number in between lets say 64 = water level and 128 would be something like the highest mountain value.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement