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.
Table 1. Table 1
|Noise Value||Object Color|
|nv < thresh1||color 1|
|nv < thresh1 and nv < thresh2||color 2|
|nv > thresh2||color 3|
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.
Table 2. Table 2
|Shader Specific Parameters|
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.
The number of times the noise grid will be scaled and recombined to produce the final noise function
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.
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.