Automatically exported from code.google.com/p/webgl-nature-scene
The Cloudy-Mountains lie,
See the Chille-River pass by,
Like a big dome is the sky,
Covering the prairie nigh.
The lofty sky is deeply blue,
The vast wildness not seen through.
The wind lowering grass in green,
Sheep and cattle are easily seen.
---- A folk song from the North-Dynasty, China, by poet unknown
This is a tech demo based on NVIDIA's Nature demo project. It experiments some interesting shader based rendering techniques to present realistic-looking nature scene on web using Javascript and WebGL, which include:
- Terrain: Multi-layered terrain with tiles
- Vegetation: Waving grass with almost countless blades
- Waterbody: Realistic water simulation with reflection and refraction
- Environment: Dynamic cloudy sky dome
- Boids: Flying birds with flocking behaviour
A detailed talk on most of these graphic techniques can be found in GPU Gems I and II.
The bird flock simulation is based on Boids algorithm that was introduced by Craig Reynolds.
This project is powered by SpiderGL, an excellent graphic library for WebGL real-time rendering. SpiderGL is created by Dr. Marco Di Benedetto.
Controls:
- Use the arrow keys or W, A, S, D to move around.
- Drag the mouse pointer to change the orientation of the camera.
- Press B to toggle display of the bounding boxes of the terrain tiles.
- Press T to toggle display of the statistic panel.
More screenshots can be found here.