I have ability to specify seed nuber when I'm starting but I'm not sure if it would alow me making infinite Perlin Noise textures.
Not infinite, in chunks. The trick is to have x/y offset variables and to waste first x/y random numbers and create actual bitmap.
I.e. if you want to generate chunk you set x offset (for simplifying, let's assume that chunks are going in straight line) to chunksize*number of chunks already generated. Then, based of value of xoffset you "waste" first several columns. In pseudocode (for simplicity chunks are white noise):
Code:
function generate_chunk(rndseed,xoffset, yoffset,chunksize:Integer)
{
x,y,dump:Integer
Seed=rndseed
for x=0 to xoffset+chunksize
{
if x<=xoffset {dump = random(256); continue}
for y=0 to yoffset+chunksize
{
dump=random(256)
if y<=yoffset { continue}
Bitmap[x-xoffset,y-yoffset]=RGB(dump,dump,dump)
}
}
}
I know that much, just don't know how to apply it into real perlin noise app .
And yes, if you can I'd appreciate if you could make it work. All I need is simple Perlin noise.
The biggest problem is that code which is used for combining seperate octave textures into one tends to exeds its limits sometime
Simple
Code:
if value>255 then value:=255;
at the end of combining code, but before putting it into byte array should help with that.
Bookmarks