CMSC 635: Advanced Computer Graphics

Procedural Texturing

Spring 1999

David S. Ebert
Computer Science and Electrical Engineering Department
University of Maryland, Baltimore County



Marble Vase by Ken Perlin, 1985



Traditional Texture Mapping (Ed Catmull 1974) :

Use of scanned in photograph or pre-computed information
to "wrap" around an object to simulate greater complexity.

Advantages:

Less complex models
Easy to acquire photos ??

Disadvantages:

Storage
Aliase prone
Photos already have illumination calculations done
Mapping complex

Example



Procedural Texturing (Gardner 1984, Peachey, Perlin 1985)


 
 
  • Procedural Techniques:
  •     Sample_Procedure(x,y,color)
        {
            static int first=1;
                         color.r=color.g=color.b=0;
            if(first)
            { first=0;
              for (i=0; i < 20; i++)
              {
                center[i].x = drand48()*10;
                center[i].y = drand48()*10;
                radius[i] = drand48*.5; radius[i] *=radius[i];
                color[i].r = drand48(); color[i].g=drand48();
                color[i].b=drand48();
               }
            }
            for (i=0; i < 20; i++)
              {
                dist_sq = (center[i].x-x)*(center[i].x-x) +
                  (center[i].y-y)*(center[i].y-y)
                if (dist_sq < radius[i])
                    color=color[i];
                    break;
               }
        }
     

    Solid Texturing
     

    Trigonometric Functions

    Stochastic Procedures


    Noise

     
     
     
     
     
     

    Turbulence Examples



    Can Apply To Other Attributes

        Bump Mapping - Texture Map the Normal to the Surface
            


    Return to CMSC 635 Notes Page