Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 4 5 [6] 7

Author Topic: The World is Just Awesome - Advanced Terrain Generation Thread  (Read 21405 times)

Normandy

  • Bay Watcher
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #75 on: December 12, 2011, 05:05:09 pm »

Well, I've learned multivariable calculus now, and I'm taking a class on solid-state chemistry next semester, so I'll be ready to start again maybe later in the spring. As far as musings on the project go, I haven't changed my basic plans, but I haven't looked over them carefully either, so there's not much news on that front.
Logged

laurimann

  • Escaped Lunatic
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #76 on: April 05, 2012, 07:04:52 am »

Greetings everyone! :)

This thread has been extremely interesting to follow! Thanks to the OP and all participants for that! *applauds* As stated in the very first post,

Quote
The world is just awesome. Perlin noise heightmaps just don't cut it justice.

I completely and fully agree! However, this thread has not been able to produce any tangible results since the first week dispite much desire to see something useful due to OP's ambition to achieve perfection:

Quote
Well, the issue I have with a simplistic model is that there is no slider bar between "realistic" and "simplistic". You either model a solid as a rigid body or you don't. You either have fluid pressure or you don't. You can skip minutiae, but you can't skip the big picture.

However, as stated by Erior,

Quote
simulating density, elasticity and everything would be great, but maybe too complicated. Could you not simplify things a little? something like assigning to each pixel a certain amount of "crust" on it. This amount would be moved around by the movement vector of the plate and eventually reach a plate boundary

and

Quote
You have to find a compromise between your lust of recreating the processes to the best, or search for a simpler, but better doable, model.

I fully on completely agree with this view WHILE agreeing with the OP that the entire impressiveness of the world around us simply cannot be compressed into simplistic models. To contribute to the entire hobbyist game programmer community some inspiring preliminary results and to fill in the lack of any decent work to be used as reference point, I chose plate tectonic inspired terrain generation as the topic of my Bachelor's Thesis. I started with an overly simplified model of plate tectonics where a fractal generated terrain is split into plates that are moved linearly until they grind to halt due to friction. When two continents overlap too much, they're merged together. When oceanic crust collides with another plate, it "subducts", meaning that the subducting crust is moved from the denser plate onto the overlying plate. Edit: After the rate of action on the "lithosphere" drops too much, the terrain is split into new set of plates and the process described above is repeated.

This is very simple model of plate tectonics and the implemetation is just naïve, but the results are best that i've seen in the hobbyist programmer scene:


http://sourceforge.net/projects/platec/screenshots/tectonics_ultim3.png

and


http://sourceforge.net/projects/platec/screenshots/tectonics_ultim6.png

Pretty neat, huh?  8)

The thesis is freely downloadable from http://urn.fi/URN:NBN:fi:amk-201204023993 . A Youtube video showing the simulator in action is available at http://www.youtube.com/watch?v=bi4b45tMEPE . Lastly, the source code is distributed under GPLv3 in SourceForge: http://sourceforge.net/projects/platec/

You must check the "Earlier works" part, because there's really useful projects that have not been mentioned in this thread earlier. For example the approach Erior suggested has been implemented as early as 1991! Also the "Future Work" chapter should be most interesting to the OP.

Finally i wish to share my motivation for sharing my work in this thread. It is by no means to depress anyone here, but quite the opposite! The OP has undertaken a very exciting and useful project that we all wish to see in its glorious conclusion! If you observe the results that I have been able to achieve with this child's play model of plate tectonics, just imagine what we could have if OP or anybody else manages to make a simulation with the accuracy that the OP desires! In short, i just want to encourage all of you to continue on the path you've chosen and to share my simple piece of work as an inspiring foretaste of future things to come!
« Last Edit: May 20, 2012, 12:26:48 pm by laurimann »
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #77 on: April 05, 2012, 07:14:02 am »

ooohhh way cool.
Logged

Kogut

  • Bay Watcher
  • Next account: Bulwersator
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #78 on: April 05, 2012, 07:27:30 am »

"The result is" - is it an end state of simulation without further changes and nothing new will happen?
Logged
The worst bug - 34.11 poll
Tired of going decades without goblin sieges? Try The Fortress Defense Mod
Kogut, the Bugfixes apostle of Bay12forum. Every posts he makes he preaches about the evil of Bugs.

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #79 on: April 06, 2012, 01:05:45 pm »

Fascinating work! I've taken a very different track by defining a set of characteristics for terrain of some specific type- mountains, plains, coasts, islands... and then using an overarching perlin noise to blend these together.
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

Normandy

  • Bay Watcher
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #80 on: April 06, 2012, 11:58:48 pm »

Ah wow! I'm really glad you shared your work with us.

I've been really busy with college, so I haven't had much of a chance to follow up on this project, so we'll see about this summer. Unfortunately I'm not majoring in Geophysics or anything like that so any of my progress proceeds purely in my free time.

I think I'm repurposing this thread for people to just show off what they've been doing in terrain generation, since I won't be doing anything interesting anytime soon, heh.

So feel free to continue sharing any interesting developments with us!
Logged

laurimann

  • Escaped Lunatic
    • View Profile
Re: The World is Just Awesome - Advanced Terrain Generation Thread
« Reply #81 on: April 07, 2012, 02:36:34 am »

Hello everyone! :)

Thank you all for your comments! I'm especially happy to hear that the OP, Normandy, feels like my work has been useful! :)

I personally think that simulating plate tectonics might not become very popular in the game industry until it's able to offer significant amount of interaction for the artists and/or becomes much more efficient in terms of computing time. The approach briefly described by PTTG might be more useful when making games (instead of simulations). It'd be interesting to see what such method is capable of catering. :)
Logged

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: The World is Just Awesome - Advanced Terrain Generation Thread
« Reply #82 on: April 07, 2012, 03:25:38 am »

laurimann I really like how your terrain looks like it was created violently. Certainly more realistic in a lot of ways than what is usually seen.
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

finka

  • Bay Watcher
    • View Profile
Re: The World is Just Awesome - Advanced Terrain Generation Thread
« Reply #83 on: April 14, 2012, 09:07:20 pm »

Indeed, beautiful work, laurimann! 

I don't know if you intend to keep working on the project, but a couple changes which might be improvements occur to me.  (Perhaps they did to you also.)

(1) Instead of making a whole bunch of plate splits in a separate phase, why not do plate splits in the main simulation?  Whenever a single plate becomes sufficiently large, break it in two: pick two points at opposite ends and do your boundary-accretion process on them.  Then add to each half a little velocity away from the other half (or maybe modify that to model friction against the mantle or whatnot, so that possible velocities are bounded).  Of course, for style you could then go on to simulate rifting and stretch out any extant continental crust, here. 

(2) Make plate mergers less abrupt.  Instead of letting plates slide under one another completely unchecked unless the amount of continental overlap is greater than a threshold, do an amount of energy transfer proportional to the number of pixels of overlap, and then only merge the plates when the difference of their velocities is tiny enough. 
It'd also be nice if the plate heights didn't just stack pixel by pixel but instead some of the crust mass was pushed to adjacent pixels in the direction of the velocity difference: that is, the upper plate should get deformed up and over the lower in a bunchy fashion rather than just lifting straight up all of a piece.  You'd get fewer unnaturally steep cliffs. 

It's also weird that (if I'm interpreting it correctly) island chains like to stack up when another plate pushes into them, yielding pencil-thin mountainous peninsulas without AFAIK a real-world analogue which then persist throughout the rest of the evolution.  But I don't know what I'd adjust to avoid that.  Erosion?  The same land-bunching as in (2)?
« Last Edit: April 14, 2012, 09:15:04 pm by finka »
Logged

laurimann

  • Escaped Lunatic
    • View Profile
Re: The World is Just Awesome - Advanced Terrain Generation Thread
« Reply #84 on: April 17, 2012, 04:36:30 pm »

Thank you. :) Ideas and suggestions are very much hoped for and welcomed, even though I tried to think things as thoroughly as possible while making the thesis. So, as a reply to your two points:

(1) Instead of making a whole bunch of plate splits in a separate phase, why not do plate splits in the main simulation?

That very same mechanism was implemented exactly as you just described in the Cdrift demo in 1991. The project and its results are discussed in the thesis in chapter 6.2 "Cdrift", p. 34. I decided to drop that approach for two reasons:
  • first, the determination of the point of divergence and the way plates are split would have required more logic than what would've been worth it then. Now things are much different and it doesn't seem like much work anymore. However the second reason weights the cup a lot more.
  • As you can see from the pictures I uploaded, the mountain areas are pretty much everywhere. Now imagine if that happened 10x more often: there would be mountains everywhere making the continents look like they had some wave like texture! This is what I perceive happened with Cdrift. Yes, an efficient erosion algorithm will get rid of old mountain ranges nullifying the problem, but implementation of the erosion algorithm itself is a huge task. See thesis chapter 9 "Future work", p. 57. Finally you might argue that if plates are split only when they get too big then the total amount of new plate edges is far less per iteration than when they're all split simultaneously.
Summa summarum, this approach might not be hard to implement, but I doubt it would really affect the end result in ay meaningful way.

(2) Make plate mergers less abrupt. Instead of letting plates slide under one another completely unchecked unless the amount of continental overlap is greater than a threshold, do an amount of energy transfer proportional to the number of pixels of overlap, and then only merge the plates when the difference of their velocities is tiny enough.

This again is something that was implemented in the Cdrift exacly as you described it! Briefly put, i doubt it would have any effect on the end result, because when two plates start to overlap, their movement vectors start to converge and thus the growth of the area of overlap diminishes resulting in thinner mountain ranges (and shorter iterations, of cource because the system freezes faster - unless bigger plates are split from time to time).

It'd also be nice if the plate heights didn't just stack pixel by pixel but instead some of the crust mass was pushed to adjacent pixels in the direction of the velocity difference. 

Yes, that's exactly what I dreamed of for weeks while sketching few ways to do it. The thing is that the simulation will simply stall because things like that are computationally very intense when compared to just stacking the stuff. As far as i remember there weren't any other reasons for dropping this feature out: just lack of (programming and computing) time. At any rate the result would be less cliffs and smoother mountain slopes. That's great and cool, but a proper erosion algorithm can probably redeem even serious glitches like these and frankly there's a lot more serious problems in the simulation (see thesis chapters 8 and 9), e.g. the pencil like islands:

island chains like to stack up when another plate pushes into them, yielding pencil-thin mountainous peninsulas

It's an unavoidable artifact resulting most probably from unrealistic modelling of subduction zones. In real life they're quite complex. A hotfix would be to distribute the subducting material more evenly and to wider area on the overlying plate near the subduction zone. I tried to hack this many times and the current method that's used in the simulation is least prone to produce artifacts.  :-\

P.S. if ANYONE feels like they want to start hacking the code, PM me here or on youtube or on sourceforge and I'll see what we can do.   ;D
« Last Edit: April 17, 2012, 04:41:55 pm by laurimann »
Logged

dreadmullet

  • Bay Watcher
  • Inadequate Comedian
    • View Profile
Re: The World is Just Awesome - Advanced Terrain Generation Thread
« Reply #85 on: April 18, 2012, 04:20:16 pm »

Awesome thread!

I've always been interested in procedural terrain. When I was a newbie programmer, I thought terrain generated with perlin noise was the best thing ever. I played around with it a lot, and I had no idea what I was doing.

Later, as I was becoming better at programming, one part of a project I did was procedurally generated planets. I tried to make something that looked like the Earth, and I think I did a pretty good job in some respects:
Spoiler (click to show/hide)
That's all 3D perlin noise. The hardest part was figuring out how to get the 3D position of a texel.

Yeah yeah it's not that great. However, this thread has inspired me to make something that's not just boring old perlin noise. It will definitely be the next project I work on.
Logged

Thief^

  • Bay Watcher
  • Official crazy person
    • View Profile
Re: The World is Just Awesome - Advanced Terrain Generation Thread
« Reply #86 on: April 19, 2012, 03:58:22 am »

Later, as I was becoming better at programming, one part of a project I did was procedurally generated planets. I tried to make something that looked like the Earth, and I think I did a pretty good job in some respects:
Spoiler (click to show/hide)
That's all 3D perlin noise. The hardest part was figuring out how to get the 3D position of a texel.

I've tried procedural planets too, have you seen? http://www.bay12forums.com/smf/index.php?topic=66702.msg1600426#msg1600426
I used an adaptation of mid-point displacement to work on triangles, and combined it with a sphere subdivision algorithm. Warning the colours are a bit bright!
Logged
Dwarven blood types are not A, B, AB, O but Ale, Wine, Beer, Rum, Whisky and so forth.
It's not an embark so much as seven dwarves having a simultaneous strange mood and going off to build an artifact fortress that menaces with spikes of awesome and hanging rings of death.

CR055H41RZ

  • Bay Watcher
    • View Profile
Re: The World is Just Awesome - Advanced Terrain Generation Thread
« Reply #87 on: May 13, 2012, 09:54:21 am »

i would love to see my fortress ripped in two or shook into submission!
*real talk
Logged

laurimann

  • Escaped Lunatic
    • View Profile
Re: The World is Just Awesome - Advanced Terrain Generation Thread
« Reply #88 on: May 14, 2012, 11:20:38 am »

one part of a project I did was procedurally generated planets. I tried to make something that looked like the Earth, and I think I did a pretty good job in some respects ...

Yeah yeah it's not that great. However, this thread has inspired me to make something that's not just boring old perlin noise. It will definitely be the next project I work on.

I have to comment on this - late, sure, but anyway: Your planet looks absolutely great! It has the same kind of flat continents with really natural looking shores as in my generator, so if you could could get them split to pieces and moving around...

Oh my, that would be simply amazing: global plate tectonics on a sphere! I wonder how much of a work it'd be...
« Last Edit: May 14, 2012, 11:22:11 am by laurimann »
Logged

Thief^

  • Bay Watcher
  • Official crazy person
    • View Profile
Re: The World is Just Awesome - Advanced Terrain Generation Thread
« Reply #89 on: May 15, 2012, 04:16:44 am »

Quite difficult, I'd imagine...
Logged
Dwarven blood types are not A, B, AB, O but Ale, Wine, Beer, Rum, Whisky and so forth.
It's not an embark so much as seven dwarves having a simultaneous strange mood and going off to build an artifact fortress that menaces with spikes of awesome and hanging rings of death.
Pages: 1 ... 4 5 [6] 7