Camouflage shader

The "camo" shader creates a pseudo-random tri-color camouflage pattern on the object using a fractal noise pattern. This is a procedural shader based upon a fractal noise function known as fractional brownian motion or fBm.

The fractal noise function produces a pseudo- random number in the range [-1.0 ... 1.0] from the 3-space coordinates of a point in the bounding volume of the region. This noise value is used to determine the color of the object at the given location.

Noise valueObject Color
nv < thresh1color1
nv < thresh1
and
nv < thresh2
color2
nv > thresh2color3

The fractal pattern has infinite resolution. As a result, the borders of the color splashes never become pixelated, no mater how close the eyepoint is to the surface.

ParameterAbbreviationDefault Value
Noise Parameters
lacunarityl2.1753974
HH1.0
octaveso4.0
sizes1.0
vscalev1.0/1.0/1.0
deltad1000/1000/1000
Shader Specific Parameters
thresh1t1-0.25
thresh2t20.25
color1c197/74/41
color2c226/77/10
color3c338/38/38
Lacunarity
The grid on which the noise function is built is scaled by this value for each successive octave of noise which will be combined to produce the final result.
H
Octaves
The number of times the noise grid will be scaled and recombined to produce the final noise function
Size, Vscale
If size is set it is used as a scalar which defines the size of the noise grid on the object. So if t2=0.5 and size=5mm then splotches of color3 would tend to be no larger than 5-10mm. If non-uniform scaling is required, Vscale can specify the grid size in X, Y and Z.
Delta
This specifies a translation in noise space for the origin of region space. Since the origin of noise space is reflected 8 ways, it is undesirable to have that portion of noise space overlap with region space.

Limitations

Because of the continuous nature of the fractal noise space, it is impossible to get a splash of color1 directly adjacent to a splash of color3.