Terrain Generation with Heightmaps - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Terrain Generation with Heightmaps

Description:

http://collective.valve-erc.com/index.php?doc=1040644009-23694100 ... Terrain rendering brute force: http://www.two-kings.de/tutorials/terrain/terrain01.html ... – PowerPoint PPT presentation

Number of Views:65
Avg rating:3.0/5.0
Slides: 15
Provided by: mauricioca
Category:

less

Transcript and Presenter's Notes

Title: Terrain Generation with Heightmaps


1
Terrain Generation with Heightmaps
  • CS 536
  • By Mauricio Castellanos

2
Terrains should
  • appear continuous to the player.
  • Appear realistic to the setting of the game
  • Appear static, even if a level-of-detail(LOD)
    algorithm is used.

3
What will I cover
  • Heightmaps
  • Terrain generation

4
Heightmaps
  • A standard way of creating 3d terrains is through
    the use of heightmaps
  • A heightmap is simply a 2d array of values

5
Terrain Generation
  • Steps to create a heightmap
  • Initial Creation
  • Midpoint Displacement
  • Fault lines
  • Hill Algorithm
  • Smoothing
  • Scaling
  • Adjusting

6
Midpoint Displacement
  • Also known as the diamond square method.
  • Midpoint displacement is a subdivision algorithm
    that starts out adding larger details to the
    terrain and creates smaller more intricate detail
    as it subdivides the heightmap.
  • There are 2 steps
  • The diamond step
  • The square step.

7
Midpoint displacement example
Figure 2
Figure 3
8
Fault lines method
Figure 3
Figure 1
Figure 2
9
Hill Algorithm
  • The hill algorithm is a simple iterated algorithm
    with a few parameters that can be varied to
    change the characteristics of the terrain
  • 1. Start with a flat terrain (initialize all
    height values to zero).
  • 2. Pick a random point on or near the terrain,
    and a random radius between some predetermined
    minimum and maximum. Carefully choosing this min
    and max will make a terrain rough and rocky or
    smooth and rolling.
  • 3. Raise a hill on the terrain centered at the
    point, having the given radius.
  • 4. Go back to step 2, and repeat as many times
    as necessary. The number of iterations chosen
    will affect the appearance of the terrain.
  • 5. Normalize the terrain.
  • 6. Flatten out the valleys

10
One hill
11
Multiple Hills
12
Terrain Generation
  • Steps to creating a heightmap
  • Initial Creation
  • Midpoint Displacement
  • Fault lines
  • Hill Algorithm
  • Smoothing
  • Scaling
  • Adjusting

13
DEMO
14
Sources
  • http//collective.valve-erc.com/index.php?doc1040
    644009-23694100
  • http//www.gameprogrammer.com/fractal.htmldiamond
  • http//www.robot-frog.com/3d/hills/hill.html
  • Terrain rendering brute force http//www.two-king
    s.de/tutorials/terrain/terrain01.html
  • http//tulrich.com/geekstuff/chunklod.html
  • http//tulrich.com/geekstuff/siggraph02-slides/img
    0.html
Write a Comment
User Comments (0)
About PowerShow.com