Skip to content

roughness

Fine roughness from octaves of noise, scaled to a given RMS slope over a baseline.

Key Type Default Range Unit Description
rms_slope number 0.15 (0, inf) RMS slope, as rise over run, over the baseline when every octave is resolved; higher values give rougher ground.
baseline number 0.25 (0, inf) m Baseline the RMS slope is given over, in metres.
hurst number 0.8 (0, 1] Hurst exponent, in (0, 1]: octave amplitudes grow as wavelength^hurst, so lower values put relatively more roughness at short wavelengths.
max_wavelength number 4.0 (0, inf) m Wavelength of the longest octave, in metres.
min_wavelength number 0.01 (0, inf) m Wavelength of the shortest octave, in metres; octaves halve from the longest down to it, spanning at most 40 octaves.
seed integer 1 Seed of the noise; changing it gives a different pattern of the same roughness.
fade: How octaves too fine to resolve at the sample spacing fade out, by samples per wavelength.
Key Type Default Range Unit Description
start_samples number 2.0 [0, inf) Samples across a feature's diameter up to which it is left out entirely.
end_samples number 4.0 (0, inf) Samples across a feature's diameter from which it is applied in full; it fades in between the two counts.
shape one of linear, smoothstep, smootherstep, gaussian "smoothstep" Curve of the fade between the start and end sample counts.
Every key with its default
{
    "type": "roughness",
    "rms_slope": 0.15,
    "baseline": 0.25,
    "hurst": 0.8,
    "max_wavelength": 4.0,
    "min_wavelength": 0.01,
    "seed": 1,
    "fade": {
        "start_samples": 2.0,
        "end_samples": 4.0,
        "shape": "smoothstep"
    }
}

Used in: example_albedo_fresh_crater, example_boulders_buried, example_boulders_fragments, example_craters_texture, example_layers_roughness