home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 1
/
crawlyvol1.bin
/
tt
/
raysh402
/
guide.tex
/
node34_mn.html
< prev
next >
Wrap
Text File
|
1992-02-09
|
8KB
|
169 lines
<H1><A ID="SECTION00910000000000000000">
Texturing Functions</A>
</H1>
<P>
<DL>
<DT><STRONG><#4982#><#4982#></STRONG></DT>
<DD><#1477#><TT>blotch</TT><#1477#> <#1478#><EM>BlendFactor surface</EM><#1478#>
<BR>Produces a mildly interesting blotchy-looking surface.
<#673#><EM>BlendFactor</EM><#673#> 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.
</DD>
</DL>
<P>
<DL>
<DT><STRONG><#4983#><#4983#></STRONG></DT>
<DD><#1481#><TT>bump</TT><#1481#> <#1482#><EM>scale</EM><#1482#>
<BR>Apply a random bump map. The point of intersection is passed to
<#678#><EM>DNoise()</EM><#678#>.
The returned normalized vector is weighted by <#679#><EM>scale</EM><#679#>
and the result is added to the normal vector at the point of intersection.
</DD>
</DL>Using an image texture applied to the ``bump'' component offers a more
direct way to control the modification of surface normals (see below).
<P>
<DL>
<DT><STRONG><#4984#><#4984#></STRONG></DT>
<DD><#1485#><TT>checker</TT><#1485#> ;SPMlt;<#1486#><EM>Surface</EM><#1486#>;SPMgt;
<BR>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., <I>z</I> = 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., <#684#><TT>translate 0 0 0.1</TT><#684#>).
</DD>
</DL>
<P>
<DL>
<DT><STRONG><#4988#><#4988#></STRONG></DT>
<DD><#1489#><TT>cloud</TT><#1489#> <#1490#><EM>scale H <I>λ</I> octaves cthresh lthresh tscale</EM><#1490#>
<BR> 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.
<P>
A sample of normalized <#689#><EM>fBm</EM><#689#> (see the <#690#><EM>fbm</EM><#690#> 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 <#691#><EM>limb</EM><#691#> function,
which varies from 0 on the limb to 1 at the center of the sphere.
<P><tex2html_verbatim_mark>#math149#</P><DIV ALIGN="CENTER">
<I>transp</I> = 1. - <tex2html_image_mark>#tex2html_wrap_indisplay4991#⇧
</DIV><P></P>
</DD>
</DL>
<P>
<DL>
<DT><STRONG><#4992#><#4992#></STRONG></DT>
<DD><#1493#><TT>fbm</TT><#1493#> <#1494#><EM>offset scale H <I>λ</I> octaves thresh</EM><#1494#>
[<#1495#><EM>colormap</EM><#1495#>]
<BR>Generate a sample of discretized fractional Brownian motion (fBm) and
uses it to scale the diffuse and ambient component of an object's surface.
<#699#><EM>Scale</EM><#699#> is used to scale the value
returned by the fBm function. <#700#><EM>Offset</EM><#700#> allows one to control the minimum
value of the fBm function. <#701#><EM>H</EM><#701#> is the <#702#><EM>Holder exponent</EM><#702#>
used in the fBm function (a value of 0.5 works well). <I>λ</I> is
used to control <#703#><EM>lacunarity</EM><#703#>, and specifies the the frequency
difference between successive samples of the fBm basis function (a
value of 2.0 will suffice). <#704#><EM>Octaves</EM><#704#> 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. <#705#><EM>Thresh</EM><#705#> is used
to specify a lower bound onthe output of the fBm function. Any
value lower than <#706#><EM>thresh</EM><#706#> is set to zero.
<P>
If a <#707#><EM>colormap</EM><#707#> 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.
</DD>
</DL>
<P>
<DL>
<DT><STRONG><#4995#><#4995#></STRONG></DT>
<DD><#1498#><TT>fbmbump</TT><#1498#> <#1499#><EM>offset scale H <I>λ</I> octaves</EM><#1499#>
<BR>Similar to the <#712#><EM>fbm</EM><#712#> texture. Rather than modifying the color of
a surface, this texture acts as a bump map.
</DD>
</DL>
<P>
<DL>
<DT><STRONG><#4997#><#4997#></STRONG></DT>
<DD><#1502#><TT>gloss</TT><#1502#> <#1503#><EM>glossiness</EM><#1503#>
<BR>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 <tex2html_verbatim_mark>#math150#1. - <I>glossiness</I>. 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.
</DD>
</DL>
<P>
<DL>
<DT><STRONG><#4999#><#4999#></STRONG></DT>
<DD><#1506#><TT>marble</TT><#1506#> [<#1507#><EM>colormap</EM><#1507#>]
<BR>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.
</DD>
</DL>
<P>
<DL>
<DT><STRONG><#5000#><#5000#></STRONG></DT>
<DD><#1510#><TT>sky</TT><#1510#> <#1511#><EM>scale H <I>λ</I> octaves cthresh ltresh</EM><#1511#>
<BR> Similar to the <#725#><EM>fbm</EM><#725#> texture. Rather than modifying the
color of a surface, this texture modulates its transparency.
<#726#><EM>cthresh</EM><#726#> is the value of the <#727#><EM>fBm</EM><#727#> function above
which the surface is totally opaque. Below <#728#><EM>lthresh</EM><#728#>,
the surface is totally transparent.
</DD>
</DL>
<P>
<DL>
<DT><STRONG><#5002#><#5002#></STRONG></DT>
<DD><#1514#><TT>stripe</TT><#1514#> ;SPMlt;<#1515#><EM>Surface</EM><#1515#>;SPMgt; <#1516#><EM>size bump</EM><#1516#> ;SPMlt;Mapping;SPMgt;
<BR> 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 <#734#><EM>size</EM><#734#>. The magnitude
of <#735#><EM>bump</EM><#735#> 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.
</DD>
</DL>Mapping functions are described below.
<P>
<DL>
<DT><STRONG><#5007#><#5007#></STRONG></DT>
<DD><#1519#><TT>wood</TT><#1519#>
<BR>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.
</DD>
</DL>
<P>