Watch a resting character in a good game or film and they are never truly still: the chest lifts and falls, the weight drifts subtly from one foot to the other, a stray lock of hair sways, the eyes make tiny wandering saccades. None of that is hand-keyed frame by frame — it would take forever and still look mechanical. It is procedural motion, and the engine that quietly drives almost all of it is coherent noise: Ken Perlin's 1983 invention (he won an Academy Award for it) that turns a clock into a natural, living wobble.
This page is about one deceptively simple move: sample a smooth noise function along time and feed the result into a parameter — a camera offset, a flicker, a sway angle. The trick is entirely in which random function you sample. Reach for the obvious one and you get garbage; reach for Perlin (or its faster cousin, simplex) and you get life.
random() is useless for motion
The naive idea is to jitter a value with a fresh random number every frame:
random() is
uncorrelated: the value at frame 100 knows nothing about frame 99, so every frame
teleports to a brand-new spot. The eye reads that as static — buzzing, epileptic
noise, not motion. Real things have momentum; where they are now is close to where they were a
moment ago.
Those three properties are exactly what hand-keyed "organic wobble" tries to fake. Perlin noise gives them for free, as a pure function you can evaluate anywhere.
The construction is neat. Lay down a regular grid of integer points. At each grid point,
deterministically hash its coordinates into a fixed pseudo-random gradient vector (in
1D just a slope, positive or negative). To evaluate the noise at some point
Because the value is pinned to
Here is the whole idea in one line. Instead of a fresh random number per frame, evaluate 1D noise at the current time and use that as your parameter:
The amplitude
| Effect | What noise drives | Rough settings |
|---|---|---|
| Idle sway | root-bone rotation / lean angle | low |
| Breathing | chest scale / spine pitch | very low |
| Candle flicker | light intensity + colour | higher |
| Handheld camera shake | camera position + rotation offset | mid |
| Lazy flag wave | vertex phase along the cloth | low |
| Wandering eyes | gaze target x, y | low |
Every one of these used to be tedious hand-keyed wobble. As procedural motion, it is a single call per frame, and it never loops or repeats.
Suppose we want a handheld feel: a small, restless offset added to the camera each frame. We drive it
with
Two things to notice. Raising the frequency random() beside it and you would see a solid band
of vertical static instead — that is the whole difference between noise and randomness. Because the
underlying noise here is fully deterministic (a fixed seed), replaying the shot gives byte-for-byte the
same shake: reproducible for review, unlike a per-frame RNG.
A single noise call gives one scale of motion — either a slow drift or a fast buzz, not both. Real motion has structure at many scales at once: a big lazy sway with tiny quick tremors riding on top. You get that by summing several noise samples at doubling frequencies and halving amplitudes — octaves — a sum called fractional Brownian motion (fBm):
The first octave gives the broad, slow shape; each further octave adds finer, faster detail at
progressively smaller amplitude. Two extra parameters control the mix: lacunarity (how fast
frequency grows per octave, usually
To make something drift around a 2D area — a firefly, a bird, a hovering drone — you need two
smoothly-varying numbers, one for
Because the two samples come from unrelated stretches of the noise,
Ken Perlin invented his noise function while working on Tron (1982), frustrated that computer-generated surfaces looked too clean and machined — that unmistakable "made by a computer" plasticness. Coherent noise let artists smear controllable, natural-looking irregularity over everything: marble veins, rolling terrain, cloud cover, wobbling flames, rusted metal. It became so fundamental to computer graphics that the Academy of Motion Picture Arts and Sciences gave him a Technical Achievement Award in 1997. The same function that roughens a marble column is the one nudging a resting character's breath — texture in space, motion in time, one idea.
The single most common procedural-motion bug: driving both
The fix is to give each channel its own slice of noise: sample at a different offset
(
Sampling noise along time is one tool in the procedural-motion kit. It pairs naturally with