Texturing Functions

blotch BlendFactor surface
Produces a mildly interesting blotchy-looking surface. BlendFactor is used to control the interpolation between the default surface characteristics and the characteristics of the given surface. A value of 0 results in a roughly 50-50 mix of the two surfaces. Higher values result in a great portion of the default surface characteristics.

bump scale
Apply a random bump map. The point of intersection is passed to DNoise(). The returned normalized vector is weighted by scale and the result is added to the normal vector at the point of intersection.
Using an image texture applied to the ``bump'' component offers a more direct way to control the modification of surface normals (see below).

checker <Surface>
Applies a 3D checkerboard texture. Every point that falls within an ``even'' unit cube will be assigned the characteristics of the named surface applied to it, while points that fall within ``odd'' cubes will have its usual surface characteristics. Be wary of strange effects due to roundoff error that occur when a planar checkered surface lies in a plane of constant integral value (e.g., z = 0) in texture space. In such cases, simply translate the texture to ensure that the planar surface is not coincident with an integral plane in texture space (e.g., translate 0 0 0.1).

cloud scale H λ octaves cthresh lthresh tscale
This texture is a variant on Geoff Gardner's ellipsoid-texturing algorithm. It should be applied to unit spheres centered at the origin. These spheres may, of course, be transformed at will to form the appropriately-shaped cloud or tree.

A sample of normalized fBm (see the fbm texture) is generated at the point of intersection. This sample is used to modulate the surface transparency. The final transparency if a function of the sample value, the the proximity of the point of intersection to the edge of the sphere (as seen from the ray origin), and three parameters to control the overall ``density.'' The proximity of the point to the sphere edge is determined by evaluating a limb function, which varies from 0 on the limb to 1 at the center of the sphere.

transp = 1. - $\displaystyle {\frac{{fBm - cthresh - (lthresh - cthresh)(1 - limb)}}{{tscale}}}$

fbm offset scale H λ octaves thresh [colormap]
Generate a sample of discretized fractional Brownian motion (fBm) and uses it to scale the diffuse and ambient component of an object's surface. Scale is used to scale the value returned by the fBm function. Offset allows one to control the minimum value of the fBm function. H is the Holder exponent used in the fBm function (a value of 0.5 works well). λ is used to control lacunarity, and specifies the the frequency difference between successive samples of the fBm basis function (a value of 2.0 will suffice). Octaves specifies the number of octaves (samples) to take of the fBm basis function (in this case, Noise()). Between five and seven octaves usually works well. Thresh is used to specify a lower bound onthe output of the fBm function. Any value lower than thresh is set to zero.

If a colormap is named, a 256-entry colormap is read from the named file, and the sample of fBm is scaled by 255 and is used as an index into the colormap. The resulting colormap entry is used to scale the ambient and diffuse components of the object's surface.

fbmbump offset scale H λ octaves
Similar to the fbm texture. Rather than modifying the color of a surface, this texture acts as a bump map.

gloss glossiness
Gives reflective surfaces a glossy appearance. This texture perturbs the object's surface normal such that the normal ``samples'' a cone of unit height with radius 1. - glossiness. A value of 1 results in perfect mirror-like reflections, while a value of 0 results in extremely fuzzy reflections. For best results, jittered sampling should be used to render scenes that make use of this texture.

marble [colormap]
Gives a surface a marble-like appearance. The texture is implemented as roughly parallel alternating veins of marble, each of which is separated by 1/7 of a unit and runs perpendicular to the Z axis. If a colormap is named, the surface's ambient and diffuse colors will be scaled using the RGB values in the colormap. If no colormap is given, the diffuse and ambient components are simply scaled by the value of the marble function. One may transform the texture to control the density and orientation of the marble veins.

sky scale H λ octaves cthresh ltresh
Similar to the fbm texture. Rather than modifying the color of a surface, this texture modulates its transparency. cthresh is the value of the fBm function above which the surface is totally opaque. Below lthresh, the surface is totally transparent.

stripe <Surface> size bump <Mapping>
Apply a ``raised'' stripe pattern to the surface. The surface properties used to color the stripe are those of the given surface. The width of the stripe, as compared to the unit interval, is given by size. The magnitude of bump controls the extent to which the bump appears to be displaced from the rest of the surface. If negative, the stripe will appear to sink into the surface; if positive, it will appear to stand out of the surface.
Mapping functions are described below.

wood
Gives a surface a wood-like appearance. The feature size of this texture is approximately 0.01 of a unit, making it often necessary to scale the texture in order to achieve the desired appearance.