Sign in to follow this  
lawrencemann

Terrain Generation with Plate Tectonics

Recommended Posts

[quote name='lawrencemann' timestamp='1333978893' post='4929549']
It seems to me like even the most naïve model of plate tectonics is able to produce more convincing heightmaps than conventional fractal based methods. That's why I'm really wondering why it's not used in more projects?
[/quote]

Fractal-based methods are often used because it is fast enough to be computed on the fly for procedural terrain (see Minecraft). For extremely large scale terrain you simply can't have all of the terrain in memory (see [url="http://www.inovaestudios.com/"]I-Novae[/url]). This is the main reason why fractal-based methods will continue to be very popular.

Your work looks awesome. I don't have time to read your thesis though. Do you have any rough numbers on how long it takes to simulate and what resolution height-maps it can run in reasonable time?

Share this post


Link to post
Share on other sites
The main issue with conventional fractal heightmaps is that they are isotropic and self-similar, i.e. they look similar at any scale and in any direction, which makes them rather dull. There are ways to remedy to this but they are rather non-standard and not obvious to implement, and also reduce performance.

Hopefully more realistic terraforming algorithms perhaps based on plate tectonics will become standard soon, but as Colinhect says it is not immediately obvious how to put this to use in the context of a "infinite world" kind of game. That said it should still be useful when it comes to pregenerating very high quality maps for, say, an MMO or a flight simulator.

Share this post


Link to post
Share on other sites
Colinhect,

The thesis contains a table of measured running times and (horribly unoptimized) memory usage per map size (chapter 8.2 or page 55). The running times are[list]
[*]8-15 s for 128*128 map,
[*]25-37 s for 256*256 map,
[*]70-140 s for 512*512 map and
[*]300-480 s for 1024*1024 map
[/list]
on a Pentium 4 CPU. So, adding even more size and detail would mean hours of running time per map. That forces the map generation to go offline. However, I was thinking that the output from tectonic generator could be used as a template for fractal generator. E.g. take a 128*128 map, scale it by 4 and fill 75% of the map with such fractals that they preserve the original 25% of the heightmap data ("corner points"). This might result in very detailed maps that have quite realistic landforms very fast. But, i haven't tried it out yet. :) Should'nt be too difficult to do. If there's interest, I might try to find time to do it and tell you how it turned out.

The a "infinite world" kind of game mentioned by Bacterius never crossed my mind when I was thinking about where to apply plate tectonics based terrain generating. Unless someone comes up with a way to segment the world into separate tectonical entities that can somehow be vowen together when its needed (FYI I think it's not possible), then the only option is to generate an entire "infinite world" at once using "infinite amount of memory".

Maybe there's a way around this, but like I said, the project never aimed there. IMHO fractals are for those who desire infinity.

Share this post


Link to post
Share on other sites
Interesting idea!

I can see this technique being useful at a high level for producing the general shape and positioning of continents in a finite world, and then using some sort of fractal approach to fill in the local details as required.

Share this post


Link to post
Share on other sites
[quote name='lawrencemann' timestamp='1334047266' post='4929816']
However, I was thinking that the output from tectonic generator could be used as a template for fractal generator. E.g. take a 128*128 map, scale it by 4 and fill 75% of the map with such fractals that they preserve the original 25% of the heightmap data ("corner points"). This might result in very detailed maps that have quite realistic landforms very fast. But, i haven't tried it out yet. Should'nt be too difficult to do. If there's interest, I might try to find time to do it and tell you how it turned out.
[/quote]

[url="http://www.outerra.com/"]Outerra[/url] renders an entire planet using real-world elevation data for low-resolution and fills in details using fractal algorithms. I believe they are interested in eventually supporting completely procedural planets as well. The low-resolution data could easily be generated using an algorithm similar to yours to provide more realistic continent-level terrain while still providing details via fractals.

In fact, I'm sure this would generate some interest by the Outera devs and community if you were to post this in their forums.

Share this post


Link to post
Share on other sites
[quote name='colinhect' timestamp='1334174088' post='4930349']
In fact, I'm sure this would generate some interest by the Outera devs and community if you were to post this in their forums.
[/quote]

I wonder if they would warm up for a redirection here. I mean it doesn't feel good idea to spread this topic all over the internet, especially when the discussion has calmed here, so maybe it wouldn't be such a big etiquette blunder to go to their forums and tell them to come here?

Share this post


Link to post
Share on other sites
This is actually pretty cool, with simple rules and quite nice results. Of course, technically it's still just a concept, and I guess the devil will show up in the details. Mapping it onto a sphere, getting a better set of rules that respect the energies needed (occasionally there's a sudden large-scale unrealistic shift).

It would be best to move this process to the GPU. With a kilometer resolution on an earth-sized planet it would need simulating a 40000x20000 region. That would take quite a long time with that algo on the CPU, but optimized on the GPU it could run quite fast. On the other hand, even 1km resolution is too detailed for this anyway (without simulating erosion), so maybe a much coarser set would be sufficient as well. However, the fractal algorithms in Outerra are currently tuned for below 100m detail, so it would not look as good as it could. It would be best to augment it with some erosion simulation later.

Btw no need to be shy about it [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
I only found it by a chance, you should have gone to our forum without hesitation. Yet another forum can't be considered "all over internet" anyway [img]http://public.gamedev.net//public/style_emoticons/default/wink.png[/img]

Share this post


Link to post
Share on other sites
Hey, I found this thread by googling for "procedural tectonics" [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img] I read through your thesis a bit and found it really interesting! It was cool that you distilled all of the information on Earth science I've been trying to absorb the last few days.

I would have liked to see a lot more examples like Fig. 24. Maybe you could post more in this thread? Your results are pretty fascinating.

Thanks for sharing your work, it's very helpful!

Share this post


Link to post
Share on other sites
[quote name='deadhopeful' timestamp='1335013462' post='4933503']I would have liked to see a lot more examples like Fig. 24. Maybe you could post more in this thread? Your results are pretty fascinating.[/quote]

Thank you so much for the positive feedback! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] I'm especially joyful to hear that you enjoyed the theoretical portion of my thesis - I put a lot of effort in it because I wanted to produce a comprehensive yet easy-to-read introdution to the theory of plate tectonics. I hope it helps you and many other people interested in this topic!

What comes to new screenshots I must disappoint you for a moment. The pictures visible here and especially in sourceforge.net pretty much cover the most interesting aspects of the simulation/terrain generator. I am currently making some adjustments to the code - addings super simple river erosion simulation, improving subduction, making the output more rough to improve the natural look and feel of it... But I've been super busy, far more than I'd like, thus I haven't been, and in few weeks still won't be, able to share anything with you. But just wait... ! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Share this post


Link to post
Share on other sites
[quote name='deadhopeful' timestamp='1335013462' post='4933503']
I would have liked to see a lot more examples like Fig. 24. Maybe you could post more in this thread? Your results are pretty fascinating.
[/quote]

Finally! I pushed my timetable this weekend and managed to implement all the improvements I desired - erosion caused by rivers, more rugged texturing, fixed "long finger-like islands" subduction bug and added some curvedness to plate trajectories. The results are not incredibly good but significantly better than earlier!

[attachment=8948:platec-new01.png]
Pay attention to much rougher yet far less abrupt mountain slopes. The whire pixelated ring is there to hide the not-yet-fixed subduction bug.

[attachment=8949:platec-new02.png][attachment=8950:platec-new05.png]
In the last two pictures you can see long and island chains and islands too. However, none of them looks like a "long finger". Quite the opposite - there's cool looking archs and angles here and there, much like in the real world. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Share this post


Link to post
Share on other sites
Hello lawrencemann

Nice job! That's what I was looking for for a while now, to make more realistic worldbuilding. I've downloaded the sources but, as I don't know any programming in C++, I wonder if you could give me some indications about how to make you program work under windows.
Thanks in advance.

Clotaire

Share this post


Link to post
Share on other sites
[quote name='Clotaire' timestamp='1344334348' post='4966962']
Nice job! That's what I was looking for for a while now, to make more realistic worldbuilding.
[/quote]

Thanks! I'm always happy to hear that someone enjoys my work or finds my effort helpful. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] I agree with you: by simulation of physical processes produces much more realistic terrain than fractal based methods!

[quote name='Clotaire' timestamp='1344334348' post='4966962']
I don't know any programming in C++ ... how to make you program work under windows.
[/quote]

I did my work on Linux for Linux. I have absolutely no intentions to port the code to any other platform. For those who want to do it themselves, I suggest the following:[list=1]
[*]Learn some C/C++ (if you don't know it already).
[*]Get make & gcc for Windows (optional).
[*]Fix the Linux specific parts of code (like include paths) to match your system.
[/list]
If somebody does any porting and feels like they want to share it with others, please contact me and we'll commit your code to the SourceForge repository. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] Edited by lawrencemann

Share this post


Link to post
Share on other sites
Very cool. I too like the idea of using real physical processes because of the improved results. Sadly the fractal methods I've seen yield a certain predictablity, and (as it says on the box) suffer from scale invariance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this