Water is one of the hardest things to fake in movies and games. It flows, splashes, bends light, and glitters in the sun. Making it look real takes powerful math and millions of computer calculations every single second.
CGI water combines fluid simulation, wave physics, and optics into a single renderer. Studios solve fluid dynamics and light transport simultaneously — each frame of a feature-film ocean can take hours to compute on a render farm.
Water is one of the hardest things to fake in computer graphics. It flows, splashes, refracts light, reflects the sky, and forms foam on crests. Every major film studio has spent decades building custom simulators to solve this problem. The math behind those simulators is real physics.
Why Water Is So Hard to Fake
When you look at a glass of water, several physical systems are happening simultaneously. Any CGI system that tries to look real must solve all of them at once.
🌊
Fluid dynamics
Water is incompressible — it can't be squeezed. Pressure waves and turbulence must follow the Navier-Stokes equations exactly, or it looks wrong.
💡
Optics
Water refracts (bends) light, reflects like a mirror at steep angles, absorbs certain wavelengths, and scatters light internally. Each effect is a separate computation.
🫧
Surface phenomena
Surface tension creates capillary waves. Crashing waves entrain air to form foam. Droplets detach from jets. Each requires its own physical model.
📏
Scale
A movie ocean scene may simulate a volume of water millions of cubic meters. Even with a 5 cm grid resolution, that's billions of grid cells.
⏱️
Time stepping
Fluid simulation can become unstable if the time step is too large. The CFL condition limits how far information can travel per frame.
🎨
Art direction
Physics alone isn't enough. Artists need to control the simulation — making a wave hit at the right moment, on cue, every take.
The Physics: Navier-Stokes Equations
Every serious fluid simulation is built on two equations derived in the 1840s by Claude-Louis Navier and George Gabriel Stokes. Together they describe how any viscous fluid moves.
ρ(∂u/∂t + u·∇u) = −∇p + μ∇²u + fρ = density · u = velocity field · p = pressure · μ = viscosity · f = external forces (gravity, wind)
The second equation is even simpler for liquid water, because water barely compresses:
∇·u = 0The divergence-free condition: fluid must flow out of any volume at exactly the same rate it flows in. No voids, no piling up.
The hard part: The left side of the momentum equation has u·∇u — velocity advecting itself. This non-linear term makes the equations extremely hard to solve analytically. Turbulence arises here. Every simulation method is essentially a different strategy for taming this term on a computer.
The Wave Equation — Height-Field Approximation
For surfaces (not full 3D volumes), a simpler model called the height-field approximation works well. We track only the vertical displacement of the water surface and propagate it with the discrete wave equation. The formula below also drives the real-time GPU ocean shader you can see in the 3D simulator.
hnew = (Σneighbors / 2 − hold) × dEach cell's new height is an average of its four neighbors, minus its old value. The damping factor d (close to 1.0) controls energy loss over time.
Interactive 3D Ocean Simulator
This is a real 3D ocean simulation running on your GPU using the same wave and lighting techniques used in video games. Drag to look around, scroll to zoom.
A GPU-rendered ocean using Gerstner waves and a Fresnel shader. The water surface reacts to the sun angle — try dragging the Sun Elevation slider in the panel and watch the reflection change. Drag to orbit, scroll to zoom.
A Three.js scene using the Water shader: a tiled normal map drives the surface perturbation, a Schlick Fresnel approximation blends reflection and refraction, and a physically-based sky (Preetham model) provides the environment. Use the panel sliders to explore how each parameter shapes the render. Drag to orbit, scroll to zoom.
WebGL is not available in this browser. Try Chrome, Firefox, or Safari to see the 3D ocean.
The shimmery glare on the water's surface is called the Fresnel effect — it's stronger when you look at the water at a low angle.Overhead view shows the normal map tiling clearly. Horizon view reveals the Fresnel effect — light reflects more strongly at grazing angles (Schlick approximation).Overhead view: normal-map tiling visible. Horizon view: Fresnel grazing-angle reflection. Panel: distortionScale → normal map strength, sun elevation → sky PMREM re-bake, speed → time uniform rate.
Two Approaches: Particles vs Grids
Production studios choose between two fundamental philosophies for fluid simulation. Each has situations where it excels.
SPH — Smoothed Particle Hydrodynamics
Lagrangian: track individual particles of fluid as they move through space
Each particle carries mass, velocity, pressure, and density
Forces computed from neighboring particles within a radius
Naturally handles splashing, droplets, and thin sheets
Used in: Finding Nemo, Houdini flip sims, game physics engines
Challenge: slow for large calm bodies of water
Grid (Eulerian) Method
Eulerian: fixed grid in space; fluid flows through cells
Each cell stores velocity, pressure, and density
Pressure projection enforces incompressibility each step
Efficient for large ocean volumes and contained fluid
Used in: Titanic, Life of Pi, most big ocean sims
Challenge: loses fine surface detail without sub-grid tracking
FLIP (Fluid-Implicit-Particles) — the method used in most modern film production — is a hybrid: particles carry momentum while a grid enforces incompressibility. You get the sharp detail of SPH and the large-scale behavior of Eulerian grids.
Synthesizing the Open Ocean
Simulating a full 3D ocean with a fluid solver would require a planetary-scale computer. Instead, visual effects artists use statistical wave models that reproduce how real ocean surfaces look without solving Navier-Stokes at all.
Gerstner Waves
Derived in 1802, Gerstner waves are analytic: each point on the surface traces a circle as a wave passes. Particles orbit rather than just moving up and down. Summing many Gerstner waves produces the characteristic peaked crests and broad troughs of ocean swell.
FFT Ocean Models
Phillips spectrum + an inverse Fast Fourier Transform gives a statistically correct random sea state at any scale in milliseconds. Pirates of the Caribbean and most real-time game oceans use this technique. The entire ocean is a single textured mesh updated each frame.
JONSWAP Spectrum
A real oceanographic energy spectrum (Joint North Sea Wave Project) defines how much energy different wave frequencies carry in a given wind condition. CGI ocean tools let artists dial in wind speed and fetch to match actual recorded ocean conditions.
P = (x − A·(kₓ/k)·sin(k·x − ωt), A·cos(k·x − ωt))A = amplitude · k = wave vector (direction & spatial frequency) · ω = angular frequency · Points orbit in circles of radius A
How Water Gets Its Look
Simulating the motion is only half the job. Making water look convincing requires accurate light transport through a surface that both transmits and reflects.
🔆
Fresnel Equations
At a shallow grazing angle, water looks like a mirror (100% reflection). Looking straight down, most light passes through. The Fresnel equations (Schlick's approximation in real-time engines) compute the exact ratio for every view angle. This single formula is responsible for the characteristic glare you see across a lake at sunset.
🔭
Refraction (Snell's Law)
Light bends when it enters water (n ≈ 1.33) from air (n = 1.0). Objects beneath the surface appear displaced and distorted. In CGI, the renderer samples a slightly offset point on an environment map or sub-surface texture to reproduce this bending: n₁ sin θ₁ = n₂ sin θ₂.
🌀
Caustics
Rippling water focuses and defocuses light on the sea floor, creating the bright shifting patterns known as caustics. Computing them physically requires tracing millions of photons through the curved surface. Most real-time engines fake them with animated light-map textures.
🟦
Scattering & Absorption
Pure water absorbs red wavelengths more than blue — that's why deep water looks blue. Dissolved particles scatter light. Together these effects are modeled as participating media with extinction and scattering coefficients. Shallow tropical water and murky river water have very different coefficients.
🫧
Foam & Whitecaps
When wave speed exceeds the shallow-water limit, crests break and entrain air. The resulting foam is rendered as a separate particle system or a whitecap texture painted onto high-curvature regions of the wave surface. Houdini's foam solver tracks bubble lifetime and density.
🗺️
Normal Mapping
High-frequency surface ripples would require a prohibitively fine mesh. Instead, a normal map encodes small-scale surface normals in an RGB texture. The renderer perturbs the reflection/refraction direction at each pixel using the map, giving the illusion of micro-ripples at zero polygon cost.
Breakthrough Moments in Film
The Abyss — first digital water creature
ILM created a pseudopod of water that could mimic human faces. It was the first time a fluid surface existed as a photorealistic CG object in a live-action film. No simulation — the shape was hand-animated by artists.
Titanic — first production ocean simulation
Digital Domain built a custom particle simulator for the sinking sequence. Over 1 million SPH particles represented the flooding interior water. The exterior ocean used tileable wave meshes with a real FFT ocean shader — a technique still in use today.
Pirates of the Caribbean: The Curse of the Black Pearl
Industrial Light & Magic's ocean shots popularized the FFT deep-water model for real-time and near-real-time ocean rendering. The "maelstrom" in At World's End (2007) remains one of the largest fluid simulations ever rendered for a feature film.
Poseidon — full-CG wave interior
A 90-foot rogue wave overturning an ocean liner required close-up shots of solid walls of water. Industrial Light & Magic ran a grid-based Eulerian sim for the massive wave body and SPH particles for the breaking surface and spray.
Life of Pi — photoreal open ocean
Rhythm & Hues simulated an entire open ocean for weeks of render time. The challenge was not just the water surface but the interaction of light — the film won the Academy Award for Visual Effects partly on the strength of its water rendering.
Real-time ocean in games (Sea of Thieves, Uncharted 4)
FFT ocean simulation and physically based rendering now run in real-time on consumer GPUs. Sea of Thieves uses a layered wave model with interactive displacement, buoyancy, and foam that reacts to ships — computed entirely on the GPU every frame at 60 fps.
Practice Problems
Easy1. A CGI ocean wave has wavelength λ = 20 m and period T = 4 s. Using the wave speed formula v = λ / T, what is the wave speed in m/s?
Hint: v = λ / T = 20 m ÷ 4 s = 5 m/s
Medium2. Light travels from air (n₁ = 1.00) into water (n₂ = 1.33) at an incident angle of 45°. Using Snell's law — n₁ sin θ₁ = n₂ sin θ₂ — find the refraction angle θ₂ to the nearest whole degree. (sin 45° ≈ 0.707)
Challenge3. The CFL stability condition limits the simulation time step: Δt ≤ (CFL × Δx) / c, where CFL = 0.5, grid spacing Δx = 0.10 m, and wave speed c = 5 m/s. What is the maximum stable time step in milliseconds?
Hint: Δt = (0.5 × 0.10) / 5 = 0.05 / 5 = 0.01 s = 10 ms
Switch to 6–8 or 9–12 above to unlock more challenging problems.
Switch to 9–12 above to unlock the CFL stability challenge.