@NeuralKernel
That's still a bottom up approach, generating terrain from noise which I'd like us to move away from.
Although interestingly he has done some cool looking galaxy rendering stuff too!
Terrain
-
- Posts: 1344
- Joined: Tue Jul 02, 2013 1:49 pm
- Location: Beeston, Nottinghamshire, GB
- Contact:
-
- Posts: 1344
- Joined: Tue Jul 02, 2013 1:49 pm
- Location: Beeston, Nottinghamshire, GB
- Contact:
Re: Terrain
Right, 30 mins of lunch handwavium explanation engaged!robn wrote:I think that's a good idea, if you feel so inclined :)Do you want me to elaborate a bit more?
Would a sort of story describing the top-down generation of a world help explain better what I'm thinking?
There are a bunch of things that we "want" a particular type of planet to have.
Taking an inhabited Earth-like world as an example, probably the most complex example, we want land & sea, mountains, rivers, deserts, icecaps, biomes, vegetation (trees, grass, shrubs etc) in varying density, basic weather and weather systems, clouds and seasons. Since the planet is inhabited we also want cities, towns, villages, spaceports, etc in logical places like along the coastlines or riverbanks and not stuck in the middle of dense rainforest in a mountain valley where no-one can reach it and the weather is terrible or under the sea. Then we'd like those cities connected by roads / rail or whatever the future equivalent is.
I wouldn't use Amit's method for us because I'd want to have a different basis to build upon, a Voronoi graph describing the planets surface masses (like plates but not really, land or sea "chunks").
Pseudo random noise generated direction, speed and age parameters to define the movement of those masses. I'd also use noise to decide which masses are continental and which are oceanic.
Then from those I'd then have an idea where mountains must go, because masses press against each other (direction), and the height and size of the mountain range areas will depend on how fast the masses move (speed) and for how long (age).
Similarly we can place volcanoes along the edges where oceanic crust is subducting beneath continental masses.
The locations of chains of volcanic islands in the seas are generated from the edge, direction, speed and age information with pseudo random noise to define which ones actually get used.
Now we have logical plates, islands, mountains, volcanoes etc. These are not rendered into a 2D texture but defined as points, edges, direction, speed, age and the connectivity between them. So we can build up connection information between them now. At this stage we could put down preliminary places where major countries or named regions might go (if we wanted them) but it's still very low density information at this point so...
Now we might move onto doing something like Amit's where we go to a higher density Voronoi, hex, square or other arrangement to better define the landscape.
We'd put down the higher resolution data and base it on the low density graph we've already generated only now we use noise to stretch the edge so we allow land/sea to move outside of the bounds set by the low density graph based on noise to soften hard edges and blur detail. We'd also use noise at this scale to change those potential heights we identified earlier to give the future mountains more variety, but also to make the rest of the country more interesting.
Now we build a new set of graphs from this scale map, we'll use these as AmitP does to create rivers, flood fill for inland lakes, but then we'll set the locations of major cities along the coasts and riders, and define the route that roads will take between those cities through this graph using path finding algorithms (A*).
Baked into this layer of graphs is the information about which part of the original low-density graph we started from so we can always go back up and look across at the highest level neighbouring nodes too.
From here we probably have enough density of information to generate the rough heat, moisture, roughness / friction and other maps which we can use to define the planets Biomes - desert, jungle, grassland, ice fields etc.
Now we have enough information to begin building the initial low-resolution heightmap itself - I say low-resolution but what I mean is low in comparison to rendering the whole planet at very high detail.
We can do this a number of ways, one interesting method might be texture splatting, or rendering images that represent the heights of things we want repeatedly into the texture. Or since we have the height information we could just render the Voronoi cell into the texture with yet more noise applied in a shader using render-to-texture (which we already support).
Taking that heightmap, plus the information from earlier about moisture, surface roughness and heat we can generate crude weather cycles and maps of the planets winds from which we can base our cloud cover. The clouds can be baked to a series textures for viewing over time from atmosphere, or generated at runtime but actual volumetric clouds will be based on this high-level texture.
The local geometry we see when landing on the ground will still need to be generated with yet-more-noise but it will be based on the low-resolution heightmap we've generated above (like the Earth/Moon/Mars currently are), the biome and other maps will be factored into that noise though as it's just to provide local detail and not to create massive terrain at all scales which means we won't need as much of it (less complexity for a start). Whether we stick with using geometry or output it to local per-patch heightmaps doesn't matter as that's just a rendering/implementation detail :)
That's pretty much it for my lunch break so gotta go, but that's the idea so far.
Placement of cities and modifying the terrain for them, generating the night-time illumination maps based on the road graph etc will also have to wait :)
Any questions?
Re: Terrain
This paper on procedural city modeling be an interesting read:
http://graphics.ethz.ch/Downloads/Publi ... _Par01.pdf
http://graphics.ethz.ch/Downloads/Publi ... _Par01.pdf
-
- Posts: 1344
- Joined: Tue Jul 02, 2013 1:49 pm
- Location: Beeston, Nottinghamshire, GB
- Contact:
Re: Terrain
Yep, I've spoken to Pascal Müller about it once when the company I was working for were hoping to do some city based MMO stuff.
Sadly I failed to convince them to use the CityEngine tech' that he worked on :( At least I did get to play with the tools and tech' though :) He was pretty cool about answering questions over email.
It's since been bought by ESRI and I haven't really looked into it since then. I have a work-in-progress program for generating streets/roadmaps and cities based on terrain and other factors in a separate program but it's not something I'm looking at right now.
Just trying to get back up to speed on the docking stuff today actually.
Sadly I failed to convince them to use the CityEngine tech' that he worked on :( At least I did get to play with the tools and tech' though :) He was pretty cool about answering questions over email.
It's since been bought by ESRI and I haven't really looked into it since then. I have a work-in-progress program for generating streets/roadmaps and cities based on terrain and other factors in a separate program but it's not something I'm looking at right now.
Just trying to get back up to speed on the docking stuff today actually.