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
INITIALIZING...
Click the viewport to capture the mouse (press Esc to release).
Or just drag with a mouse button held down.
CONTROLS_ □ ×
| Keys | Action |
| W S | forward / back |
| A D | strafe |
| R F | up / down |
| ← → | turn camera |
| ↑ ↓ | tilt camera |
| Shift | ×4 speed |
| Mouse | look around |
| Home | reset 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