Submitted by , posted on 29 April 2003



Image Description, by


These are some images from a landscape generator I and a friend (Anders Larsson) have been working on. It's basically an erosion simulator.

The top image shows two landscapes, an initial landscape in the back and the final simulation product in front. Light brown is sand, blue is water, darker brown/red is water with mud in it and intermediate shades are mixes.

The image at the bottom is a screenshot from the demo Tranquility by Medieval (released at Hype 2003). The demo has a scene with a generated landscape (actually a short animation of the landscape eroding). Some details have been added postsimulation with the help of pixel shaders. The demo can be found at http://www.scene.org/file.php?file=/parties/2003/hype03/demo/mdl_-_tranquility.zip&fileinfo

It requires directx 9 and a Radeon 9500 graphics card or better (sorry about that).

Here's how it works: The landscape is made of a number of cells laid out on a 2-dimensional triangular grid. (Each cell has 6 neighbours) Each cell stores a ground height, water height, an amount of suspended mud and an amount of agitation.

The simulation is prepared by setting a number of physical and environmental parameters such as rock hardness, rain intensity, water viscosity and so on, and supplying an initial landscape.

The simulation cycle goes something like this:
  • Rain is added randomly to the cells (random increase of water height and agitation)
  • The water flows downwards. The speed is greater with greater slope and greater water height. An amount of agitation is generated proportional to the amount of potential energy that is lost by the water.
  • In areas with lots of agitation more mud is suspended. In areas with little agitation the mud slowly settles. Also some phenomena like evaporation and collapsing of too steep slopes are modeled.
  • About the landscapes: The top initial landscape was made by adding som random low frequency sine waves together and modulating with a gauss curve. Finally some high frequency noise was added. Apart from the gauss curve, this is the basic recipe for pretty much all initial landscapes. (The high frequency noise is probably not that important)

    In the bottom landscape, I've been experimenting with modeling both solid rock (dark) and sand (light). The materials have different properties (hardness, maximal supported slope and so on). Rock becomes sand once it has been eroded.

    All the landscapes above are made of 512x512 cells. The top landscape took about 11 hours and the animation in the demo took about 42 hours to generate on my Pentium III 800 MHz though useful results could be obtained in as little as 4 hours (optimization was not a primary concern :) )



    [prev]
    Image of the Day Gallery
    www.flipcode.com

    [next]


     


    Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
    Please read our Terms, Conditions, and Privacy information.