fractal_turbulenceReturns a fractal turbulence vector for an input 3D position. This compound sums multiple frequencies of curl noise to create a turbulence that has both fine scale and large scale perturbations. When used as a velocity field the result is an incompressible turbulent flow.
positionThe input position to sample the turbulence at.
magnitudeThis scales the output noise. Before being multiplied by magnitude the range of the noise is normally between -1.0 and 1.0, but may be greater if the ratio value is larger.
num_frequenciesThis is the total number of curl noise frequencies to sum. Generally as this number increases there will be more detail or small scale noise. The value does not need to be an integer. If one slowly animates the num_frequencies the finest scale noise will gradually fade in, rather than popping on at integer values.
frequencyThis is the base frequency of the fractal turbulence. Higher values have finer detail.
ratioThis is the ratio of magnitude of each curl noise frequency to the previous. If it is the same as frequency_ratio then the magnitude of each noise will be the same relative to its scale. When this value is higher the small details are stronger.
frequency_ratioThis is the ratio of each curl noise frequency to the previous. At a value of 0.5 each additional frequency is double the previous (twice the detail). Lower values can provide a greater range of noise frequencies while needing a lower num_frequencies.
timeBy connecting a varying output like time to this allows one to animate the turbulence smoothly over time.
smoothIf enabled the curl noise will use a higher order smooth interpolation which looks better, but is a little slower to compute.
seedThis is a seed for the random values used.
noiseThis is the output float3 turbulence value computed by the fractal_turbulence compound. The general range is around -1.0 to 1.0 but may differ based on magnitude, ratio, and num_frequencies settings.