Some of what that produced was awesome. exactly the types of layouts I would like to see. But it also looks like its building in large chunks, not so much pixel by pixel. (as in a function/pattern will adjust many pixels at a time, so if you didn't preprocess that, how much work would it take to implement something like that per pixel for checking.
Every single pattern in the image I posted was the result of a mathematical function composed of noise layers plus various transforms and modifiers. Every single one was callable on the single-pixel level, and not generated as a chunk, and thus would be suitable for a streaming infinite world generated on-the-fly.
For further clarification, here
is an old journal post detailing the beginnings of the generator I use for generating islands in Goblinson Crusoe. A sample:
The island is constructed from pure math functions:
1) A sphere forms the basic island shape
2) 2 layers of Perlin noise distort the sphere to give the sphere a cool island-y shape
3) Various layers of noise are blended together to delineate areas of mountain or lowland
4) Various layers of noise are blended together to delineate areas of forest or open
5) Various layers of noise are blended together to delineate areas of wet or dry
6) Additional layers are used to composite all the selected types together.
The actual chain used is posted as a snippet of Lua code at the end of that article. Every building block of the function is either a) Some form of signal generator (noise, pattern, etc...), b) Some sort of combiner that combines the results of a number of functions (add, multiply, select, blend, etc...) c) Some sort of modifier that modifies the output of a function (like pow, sin, curve, etc...) or d) Some sort of transformation that modifies the input coordinates of functions above it in the chain. By combining these basic, simple blocks some pretty complex patterns are formed.
The result is a function that you can call at any point in the domain -1<x<1 and -1<y<1 to obtain the type of terrain at that location. In a similar fashion, you could construct such a layered system to build your large streaming world. (To make it truly infinite, you would probably eliminate the sphere and just use another fractal layer to select between land and ocean instead.) Give the function chain a different seed and an entirely different world is generated, with near-infinite possibilities. (Near infinite due to the seed being unsigned int type, and thus limited to a huge number of variations).
To generate the greyscale images I posted earlier, I constructed a Lua script that would recursively construct a function tree using randomly selected function pieces, then map a segment of it to an image and save the image to a folder. I turned the script loose when I went to work and when I returned home, I had a whole folder full of cool patterns (and a veritable mass of not-so-cool ones) to select from. In later variations of the theme, I also stored a Lua table describing the structure of the function so that I could have the patterns in a library to choose from. In the absence of any sort of visual exploration tool, this is really the only way to generate cool patterns without spending hours trying different combinations, but it really does pay off if you need a lot of different and cool patterns.
Edited by JTippetts, 18 April 2013 - 06:19 PM.