[comp.graphics] looking for marble/wood functions

srneely@watcgl.waterloo.edu (Shawn Neely) (09/28/88)

In article <361300003@uicsl.csl.uiuc.edu> sauer@uicsl.csl.uiuc.edu writes:
>
>Does anyone have, or have references to functions/formulas to model
>a 3D mass of marbel (sic) or wood?  My goal is to be able to extract the
>shades within the mass at the surface points of an object.
>

Two papers you want to read appeared at SIGGRAPH '85:

Ken Perlin. An Image Synthesizer.
Proc. ACM SIGGRAPH '85 (San Francisco, July 22-26 1985)
Computer Graphics, 19(3):287--296, July 1985.

Darwyn Peachey. Solid Texturing of Complex Surfaces.
Proc. ACM SIGGRAPH '85 (San Francisco, July 22-26 1985)
Computer Graphics, 19(3):279--286, July 1985.

Perlin's paper is particularly inspirational by virtue of its
pretty pictures.

The basic idea is to model the textures you want as regular patterns
of color in 3-space (eg. alternate light and dark layers for marble,
concentric cylinders of light and dark material for wood growth rings).
You give the function your 3D coordinates; it gives you back a color.
To obtain the required variation and visual complexity, you first modify
the domain parameters a little. That is, when coloring point (x,y,z)
you call the function with (x2,y2,z2) where the new coordinates are
"randomly near" (x,y,z).

That's the cheap explanation. The papers address the issues of designing
the "right" random functions for certain classes of textures.
And that's the non-trivial part...

Good luck!
shawn.
-- 
(.I.)   "The road of excess leads
 ).(       to the palace of wisdom."
( Y )              -William Blake