voxel_world.exe — 3D ENGINE DEMO_ □ ×

VOXEL WORLD ENGINE
tech demo · WebGL · 0 third-party libraries · Perlin noise


NEW! Procedural voxel terrain, 2–48 height levels, water, clouds, free camera.
3D VIEWPORT640×480 MODE
Your browser does not support canvas.
INITIALIZING...

Click the viewport to capture the mouse (press Esc to release). Or just drag with a mouse button held down.

WORLD GENERATOR_ □ ×

Seed
Map size
Pixel scale
Voxel size 1.00 units
Height levels 6
Vertical scale 5.0
Water level 0.12
Speed
Layers
CONTROLS_ □ ×
KeysAction
W Sforward / back
A Dstrafe
R Fup / down
← →turn camera
↑ ↓tilt camera
Shift×4 speed
Mouselook around
Homereset camera
LEVEL PALETTE_ □ ×

The strip shows every level from the lowlands (left) to the peaks (right). Blue ones are underwater. More levels = smaller steps = smoother slopes.

TECHNICAL DATA_ □ ×

Under the hood

  • classic 2D Perlin noise (5 octaves, fBm), deterministic from the seed
  • the height field is normalized to the full range, then quantized into 2…48 steps
  • noise is sampled in world units, so the voxel size (0.5…4 units) only changes the sampling density: the landscape stays the same
  • the mesh buffer is allocated exactly: the first pass counts faces, the second writes vertices
  • noise is cached: changing the levels rebuilds only the mesh, without recomputing Perlin
  • the mesh is built by hand: a top face plus side walls down to the lower neighbor
  • lighting is baked into vertex colors (5 shades by face direction)
  • water is a separate grid with waves in the vertex shader plus alpha
  • the sky is a gradient along the view ray; clouds are translucent noise quads

Best viewed at 800×600 · HiColor · visitors: 00000
© 1997–2026 · handmade, no libraries · guestbook · my links