Covers evaluating a noise function at points, scaling the input by a roughness, and layering several noise settings into mountainous terrain. Watch it for the picture of layers; build the noise itself here.
COURSE / REAL PRACTICE
Procedural worlds
Generate worlds from code in NumPy: gradient noise, terrain meshes, hydraulic erosion, even object placement, isosurfaces, planets and a ray-marched scene. Lessons pair with public videos by Sebastian Lague and Acerola. Unofficial practice material, not affiliated with the videos’ authors.
Read the explanation and diagrams, then work through the practice. Your browser profile supplies your saved progress.
What you’ll work toward
Generate repeatable terrain, meshes and planets from a seed, check them with exact geometric tests, and render a distance-field scene without a graphics API.
Read an explanation, inspect the diagrams and work through the available checks, debugging exercises and builds. Feedback and prerequisite links guide the next step.
Before you start
This course builds on these skills:
Individual lessons can add prerequisites. Your lesson progress shows your actual readiness.
A look inside the first lesson
def fade(t):
return t * t * t * (t * (t * 6 - 15) + 10)
print([round(fade(t), 6) for t in (0.0, 0.25, 0.5, 0.75, 1.0)])
h = 1e-6
print(abs(round((fade(h) - fade(0)) / h, 4)), abs(round((fade(1) - fade(1 - h)) / h, 4)))Your lesson sequence
Follow the same units and lessons in either view. Prerequisite links and your practice progress stay with each lesson.
Noise and terrain
- LESSON 01.01
Gradient noise and octaves
Hash a lattice into gradients, blend them with the quintic fade so the surface stays smooth, then stack octaves into fractal terrain noise.
Open lesson - LESSON 01.02
From heightmap to mesh
Turn a grid of heights into vertices, consistently wound triangles, area-weighted normals and a lower-detail index list, then read the ground height back off the triangles.
Open lesson - LESSON 01.03
Hydraulic erosion
Roll droplets over a height map: sample it bilinearly, spread erosion with a brush, carry and deposit sediment, and prove the total height is conserved.
Open lesson
Placement and surfaces
- LESSON 02.01
Even placement with Poisson discs
Scatter points that are never closer than a radius yet leave no big gaps: a background grid, annulus candidates, and a 5 by 5 neighbour check, tested by brute force.
Open lesson - LESSON 02.02
Surfaces from a scalar field
Turn a grid of field values into a watertight triangle mesh with marching tetrahedra, then check it by edge counts, Euler characteristic and enclosed volume.
Open lesson
Planets and rays
- LESSON 03.01
Planets from a cube
Build a closed planet mesh from six cube faces: merge seam vertices, keep the winding outward, even out cell sizes and carve a crater.
Open lesson - LESSON 03.02
Capstone: ray march a world
Build distance functions, sphere tracing, normals, soft shadows and a camera, then render a small signed-distance world and check it against analytic hits.
Open lesson
WATCH ALONG
Videos for these lessons
One hand-picked talk, lecture or tutorial per lesson, in course order. They play here when you press play; nothing loads from the video provider before that.
6 videos· 1 h 8 min
-
-
Covers building a mesh from a vertex list and triangle indices, one face of a surface at a time. The shape is a sphere, not a heightmap, but the vertices, the triangle order and the mesh bookkeeping carry over to this lesson.
-
A short video on simulating hydraulic erosion on generated terrain. Watch it first for the look of the result, then build the droplet model here and check it against independent oracles.
04Even placement with Poisson discs
A walk through Poisson disc sampling for placing objects: the background grid, candidate points around an existing one, and the validation step. Watch it first, then write the same algorithm here and test it against brute force.
05Surfaces from a scalar field
A short video on marching cubes: how a grid of density values becomes a mesh, then editable and procedural terrain and an underwater scene. Watch it for the picture; here you build the tetrahedron variant of the same idea.
-
A short tour of signed distances, ray marching, combining shapes and lighting effects. Watch it before you build: it covers the same topics as this lesson's distance functions, march loop and unions.