Controls

  • w - Fly forward
  • s - Fly backwards
  • a - Fly left
  • d - Fly right
  • space - Fly up
  • shift - Fly down
  • mouse - Control camera and Heading
  • f - Move point light source to camera location
  • esc - Pause/Resume and yield mouse control

Overview

Terrain is generated via Simplex Noise, automatically, on startup. The seed is always the same, in order to produce a reliable test environment. As the simplex noise samples for the blocks are calculated, any filled blocks directly under air are replaced with grass. Any filled blocks directly under grass are replaced with dir. All other filled blocks are replaced with stone. Below y = 0, empty blocks are replaced with water. All other empty blocks are replaced with air (ie, left alone).

After terrain generation, reduced level-of-detail vertex arrays are generated for each chunk. The LOD algorithm first considers only "surface" blocks (those with a face exposed to air), in order to avoid exposing hidden terrain from a distance. If this yields no surface blocks, internal blocks are counted too. This avoids artifacts at the interface between two levels of detail.

In total, 5 separate levels of detail for a chunk are available: 16x16x16 (full), 8x8x8, 4x4x4, 2x2x2, and 1x1x1.

Lighting and specular highlights computed by interpolated normals, per-pixel, although they don't look very good for voxel terrain. This could be improved.

Samples

Screenshots

Video

Voxelish on YouTube (file too big to include in submission)

Resources Used