Ocean wave normals from a directional wave spectrum
In your harnessProcedural textureMIT
Generate tileable maps of a water surface: a sum of directional sine waves with whole-number wave vectors drawn from a wind-sea spectrum, Gerstner-style crest sharpening and whitecap foam where crests compress. The normal map is the main output for water shaders; calm swell to storm presets.

What it takes and gives
- Entry point
- generate
- Maps
- albedo, normal, roughness, height, ao
- Parameters
- peak_waves, components, wind_angle, spread, detail, choppiness, foam, relief and 3 more
- Presets
- default, calm_swell, choppy_wind, stormy, lake_ripples
- Tileable
- yes
- Command line
- python ocean_wave_normals.py --size 1024 --seed 7 --preset NAME --out DIR [--width W --height H] [--set NAME=VALUE] [--directx-normal] [--orm]
- Godot material
- material.tres
- Blender builder
- blender_material.build_material(folder)
Limits. One still frame of a stylized spectrum, not an ocean simulation: there is no dispersion relation, time animation or FFT, and the spectrum shape is a log-normal band with cosine spreading rather than a measured model such as JONSWAP. Choppiness resamples the height once at the displaced position, an approximation of Gerstner waves that holds while crests do not fold. Every wave repeats across the tile, so long views show the repeat; blend two scales of the tile in the shader to hide it. Foam is placed from crest compression and noise, not from breaking physics, and the occlusion map is a mild stand-in.
Details
- Kind
- Procedural texture
- Engine
- Python 3.10 or later
- Files
- 12 files, 205.9 KB
- Licence
- MIT
- Declared effects
- runs commands, writes files
- Checked with
- Godot 4.7.2, gl_compatibility
- Checks
- command line generates declared maps, maps decode, maps have declared size and channels, maps tile without a seam, normal vectors unit length facing out, maps carry detail, godot imports the maps, godot material template loads every map, godot compatibility render, capture shows the textured surface, blender builds the material
- Techniques
- Sum of sine waves with integer wave vectors for exact tiling, Directional spectrum: log-normal band times cosine-power spreading, Gumbel top-k weighted sampling of wave components, Separable evaluation by the sine addition formula, Gerstner horizontal displacement and its Jacobian for crest sharpening and foam, Height to tangent-space normal by central differences
- Tags
- texture, pbr, tileable, water, ocean, waves, normal map, foam
- Identity
library.supply.creative_originals.b4612006c540717ec6943885.c03403c25078f690- Version
c03403c25078f69082a27dbfe7ff8c8381f4ce4fede82241c0a5588a5bf7b00f
The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.
Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.

