Mapgeneration

Laurimann

New Member
Contributor
World
Firstly, i checked out DF geological layers here. I must admit that the guys have done marvelous job and that it's not TOO difficult to get things rolling - although i haven't looked at any other "more into depth" documentation on it. Basically, as far as i've understood, they've split the heightmap into five layers, e.g. top 20% is soil, next 20% is sedimentary layer etc. Then they use some noise function to distribute the minerals to appropriate layers and a fractal function to form mineral veins. No geological data or complex physics simulations involved what so ever - but, the chances are that i'm greatly wrong here. Please educate me on this topic! :)

While researching i also gave a few thoughts on how to utilize the history of the crust generated by the plate tectonic process. I found a really nice picture of North America that shows the age and type of rocks in the continent. PlaTec simulator currently tracks the age of the crust (only on the x,y plane) and this value could be used to determine 1) where volcanically active plate edges (have) reside(d) 2) where volcanoes (have) reside(d) 3) the amount of volcanic activity that a point (x, y) on the map has experienced during its existence. This data could help tremendously in deciding what kind of stone/minerals a point (x,y) on the map most probably might contain. :)
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Ooohh, pretty picture!

Your notes on DF geology are already beyond mine, I just looked at the layers with one of the "hacky" game tools and studied the wiki over time. Just knew about the layers and that they varied from spot to spot :)

If that crust age bit in PlaTec alone can help place minerals already, then neat! I know that as much as I want to geek out on science it helps to simplify when it comes to building a game meant to actually run well enough to be fun rather than just be an expression of uber-geekiness.

Laurimann - do you think it would be worth going further in defining layers better, and if so can you think of other areas / more data that PlaTec could track without too much effort that would help add utility like that?

I'll admit my naivety on the subject just makes me want to go "OOO WANT MOAR HEIGHT MAPS OM NOM NOM" :pinkiehappy:
 

Laurimann

New Member
Contributor
World
Laurimann - do you think it would be worth going further in defining layers better, and if so can you think of other areas / more data that PlaTec could track without too much effort that would help add utility like that?
Well.. We could try tracking crust age in three dimensions instead of just two: it'd take about a month to implement, at least triple the memory usage and probably do the same timewise. All ideas are more than welcome! :)

But to get some visible progress quickly, i'd like to suggest that i provide you guys with a heightmap (512*512*4 bytes (float)) so you can start implementing the visualization aspect of the generated heighmap immediately. What do you think? :)
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Sounds reasonable to me, especially if the 3D crust age can be an option - run either with or without, for those that are impatient :)

I'll leave the exact details for what we could use right away to Nym Traveel since that's more his thing than my thing :D

Thanks!
 

Nym Traveel

Active Member
Contributor
Art
World
A sample heigthmap would be awesome!
either 512 or 1024, doesn't matter ;)

Then I could try my climate simulations (that sounds so wrong, "cheap way of setting temperature/humidity values for a heigthmap" is probably more fitting :D) on a real test subject :D
Also we could start going into the mapgeneration level.

Well, 3D crust age would be the easiest and best way to steer the distribution of the materials, period. :)
 

Laurimann

New Member
Contributor
World
Attached is a 512*512 heightmap of floats and a picture of what the map is supposed to look like. It has some really high mountains, flat plains and really steep "cliffs" so it's a perfect test subject for developing a rendering algorithm that can turn all those "artifacts" into playable Terasology terrain. :)

Well, 3D crust age would be the easiest and best way to steer the distribution of the materials, period. :)
Alright! I'll keep it in mind and try to think of the best (most efficient) way to implement it. All suggestions are welcome. ;)

Edit: changed heightmap data file into zipped text file!
 

Attachments

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
I'm excited to see an ingame view of this map... Looks promising ;)
 

Nym Traveel

Active Member
Contributor
Art
World
Greetings,
I just wanted to give a little update about what I'm doing right now:
I managed to import the Heighvalues from the txtfile and get it into an array (well, thats a huge accomplishment :D ) (also rotated it on purpose to have a mountain belt going parallel to equator)
heigthmap.jpg


Climate:
I try to follow the following rules with the "simulation"
  • poles have temperature -1, equator has 1
  • cold air tries to reach equator, hot air tries to reach poles
  • temperature decays with distance and spread is delayed by mountains
  • watertemperature is linear and not as much rising and falling
  • higher places are colder
Result this far (red: 1, blue: -1, white: <-2):
climate.jpg

funny, failed attempts in attatchments: funnyClimate_2,3 ;)
Humidity:
Humidity follows this rule:
humidity= distance to Water - elevation
This actually works really nice so far:
humidity.jpg

The only problem:
the little lakes in the north west act like full seas and make the surrounding very humid. I tried to decimate them with a preblur but didn't get lucky so far :/
The whole simulation with file import runs in approximately 0.9 seconds.
I'm currently working on getting the humidity-system working for the temperature and also making it all parameterized for easy tweaking. (currently it looks like funnyClimate_4)
Also on the todo:
A sample implementation of the plain heigthmap in terasology.
Feedback on the climate/humidity rules is as always welcome.
I try to push it to my git this afternoon (I'm still having a hard time with the whole git thingy)
 

Attachments

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
That looks great so far! It seems to me that some temperature zone edges are quite sharp (see file attached), but I look forward to an in-game view of the map :omg:
About one second processing time should be fine for world/biome/climate creation I think. Keep goind, I like it! ;)
 

Attachments

Esereja

Active Member
Contributor
Now I realy start liking this idea. and they look awesome. (can't wait to get working whit that code)(no worry Ai and schoolworks will keep me busy :notworthy: )
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Nice! Moar maps om nom nom! :omg:
 

Nym Traveel

Active Member
Contributor
Art
World
YYYYYYEEEEEAAAAHHHHH.jpg


What you see here, my dear friends is Laurie's heigthmap in terasology (at least a very tiny part of maybe 10x10 px in the corner)

The github thingy isn't working for me atm, so code must wait till tomorrow or the WE

Greetings,
Nym


ps: WWWWWWWWEEEEEEEEEEEEEEEEEEEE, FINALYYYYYYYYYYYYYY
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Awwwwesome! Wasn't expecting to see that so soon :D

Now we need to start throwing rivers, cities, and fun stuff like that on the map soon :omg:
 

Laurimann

New Member
Contributor
World
:thumbsup: Splendid work, Sir!

You might also be aware that Immortius has been able to run the (native) PlaTec simulation on Windows through JNI from Java. Did you use it already or you rendered just the "dumped" heightmap?
 

Nym Traveel

Active Member
Contributor
Art
World
I used the dumped heightmap.txt file and used one pixel per chunk with bilinear interpolation to make it all smooth.
Be aware that this is a proof of concept - the map is in terasology but I dumped it directly on the ground so we have 1/20 of chunkheigth is water and seabed is one block on most parts.
I didn't optimize in this direction because i hope that we have vertical chunks soon so we can go deeper.

Todo:
- overlay a (selective? :) )noise to make higher regions more bumpy and generate more interesting terrain.
- overlay river generators
- make an city placer algorithm
- make the map really finite. As of now it's just tiled but you don't warp around the edges. I'd have to go deeper into the chunk managing system to understand what's necessary to do so.

Oh, and the first todo: get this freaking thing onto github so you can play with it :D


Edit:
Ok, changes are now live on
https://github.com/nymtraveel/Terasology
and i made a pull request.
At least I hope so...
me and github is still like

Yeah, maybe working on some of the upper todo's now
 

Esereja

Active Member
Contributor
we can use that as base terain, and the run noise generators on top of it depending on biome.how about that. It would give almoust endless variations. And if biomes could be set in mods. I think we would have achieved needed modability.
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Heya, its a little off topic, but the ones who are interested might want to have a look at this (german) articel about procedural generation on golem.de
 

Nym Traveel

Active Member
Contributor
Art
World
Yeah, that was my intention ;)
I made a google doc to summarize the current plan. So to achieve the real big map we're actually one step behind but we need more planning in this section before implementing.

To be honest, I really want to distance from the "biomes" thing. It'd be much cooler just to have temperature, humidity and height steering the refinement of the mapgeneration and flora.
Hence we would have more natural transistions between different zones.
All this in combination with this would be my preferred direction to go :)
 
Top