Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / [dgdk.net] Help Needed: Procedural Terrain Generation

Author
Message
Mighty Batsonator
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Atmosoft Ltd. World Headquarters
Posted: 8th Dec 2008 17:26
I'm developing a kind of enhanced Matrix class that supports multitexturing, LOD and "playable" randomisation, as in readily-usable terrain shapes. The basis for the class is a 2-dimensional array of Square objects, each created from two instances of DarkGDK.Basic3D.Triangle. My class arranges these squares in a grid, and I'm in the process of writing functions to alter the height of any given point on any given square, as well as the obviously necessary ability to get ground height. What I'm looking for help with is a workable algorithm that procedurally generates a pattern where a variety of hills, valleys, mountains, pits and flat areas are dispersed across the surface of the grid. Ideally, such an algorithm will output a series of floating point values representing Y coordinates for each vertex, which can then be applied to the squares.

-- Coding your worst nightmare --
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Dec 2008 03:59
You could try grabbing some satelite data - its all float data type (if you download gridfloat) and use that real terrain data - in whole or in part to feed your system... then you get authentic terrain "bits" to make up your completely dynamic one.... its an idea anyway.. procedural ground isn't nearly as "cool" looking (usually) as some real terrain... Shoot.. If I was making a space game I'd grab some of those mars and moon scans too.. especially moon - better detail LOL.

--Jason

Login to post a reply

Server time is: 2024-09-30 13:25:24
Your offset time is: 2024-09-30 13:25:24