Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terrain generation example (low poly mountains)

This program was part of my school presentation on procedural terrain generation. It shows a variety of methods for generating terrain and explores how they work.

Controls

  • Click/Space/Enter/Right Arrow - to switch between terrain types (this is used as part of a presentation)
  • O - explore the current terrain type
  • When exploring:
    • WASD to move
    • Hold click and drag to look around
    • Scroll - zoom in/out from target point
    • R - regenerate terrain with new random seed

Brief Explaination

This program takes a heightmap and displays it on a triangle mesh. y = sin x + sin z creates a 2D sine wave. Squaring it makes higher areas steeper and lower areas flatter. Multipling this by a random value means the magnitude of randomness is increased at larger heights, making higher up areas more jagged. Taking the random values from before and interpolating between them (pictured visually with a blur effect) gives us perlin(like) noise, creating much more interesting looking terrain.

About

Terrain gen presentation using three.js

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages