Enum FractalType
Specifies the fractal layering method used to combine multiple octaves of noise into a single richer output value. Each method sums octaves at progressively higher frequencies and lower amplitudes, but transforms each octave's contribution differently to produce a distinct visual character.
Namespace: Scylla.Core.Util.Noise
Assembly: ScyllaCore.dll
Syntax
public enum FractalType
Remarks
Fractal layering is controlled by the octave count, lacunarity (frequency growth per octave, typically 2.0), and persistence (amplitude decay per octave, typically 0.5). The specific formula applied to combine those octaves is selected by this enum.
Output ranges vary by method:
- None: single-octave range, approximately [-1, 1] for gradient noise.
- FBM: approximately [-1, 1] (normalized by total amplitude).
- Turbulence: [0, 1] (absolute values, always non-negative).
- Ridged: approximately [0, 2] (unnormalized, always non-negative).
- PingPong: approximately [-1, 1] (normalized by total amplitude).
This enum is consumed by Fractal and Fractal, and drives the dispatch inside Fractal2D(float, float, NoiseSettings), Fractal3D(float, float, float, NoiseSettings), FractalCellular2D(float, float, CellularSettings), and FractalCellular3D(float, float, float, CellularSettings).
Fields
| Name | Description |
|---|---|
| FBM | Fractional Brownian Motion (fBm). The classic fractal noise formula: sums octaves with geometrically decreasing amplitude (controlled by persistence) and geometrically increasing frequency (controlled by lacunarity). The sum is then divided by the total accumulated amplitude to normalize the result to approximately [-1, 1]. |
| None | No fractal layering. Evaluates a single octave of noise at the base frequency. The Octaves, Lacunarity, and Persistence parameters are ignored when this value is selected. Use this when maximum performance is required or when layered detail is not needed. |
| PingPong | PingPong fractal. Applies a triangle wave (ping-pong) to each octave's noise value before accumulation, remapping the noise to oscillate back and forth in a sawtooth-like fashion. The accumulated result is normalized to approximately [-1, 1]. |
| Ridged | Ridged multifractal. At each octave, the noise is folded with
|
| Turbulence | Turbulence. Identical to FBM but takes the absolute value of each octave before accumulation. The absolute-value fold creates sharp creases at the zero-crossings of the underlying noise, producing a characteristic billowy appearance. Output is always in [0, 1]. |