Share on Facebook Share on Twitter Email
Answers.com

Procedural texture

 
Computer Desktop Encyclopedia: procedural texture

An algorithmic way of describing a texture. Unlike a bitmapped texture, in which the texture is represented as a bitmap, a procedural texture describes the texture mathematically. Although not widely used, this method is resolution independent and can create more precise textures, especially if there is great and varying depth to the objects being textured. Procedural textures may be 2D or 3D. See texture mapping and volumetric texture.

Download Computer Desktop Encyclopedia to your iPhone/iTouch

Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
Wikipedia: Procedural texture
Top
A procedural floor grate texture generated with the texture editor Genetica.

A procedural texture is a computer generated image created using an algorithm intended to create a realistic representation of natural elements such as wood, marble, granite, metal, stone, and others.

Usually, the natural look of the rendered result is achieved by the usage of fractal noise and turbulence functions. These functions are used as a numerical representation of the “randomness” found in nature.

Contents

Solid texturing

An example of a procedural texture with various zoom levels and Perlin noise as a basis function

Solid texturing is a process where the texture generating function is evaluated over R3 at each visible surface point of the model. Traditionally these functions use Perlin noise as their basis function, but some more simple functions do not use basis function at all.

Cellular texturing

Cellular texturing differs from majority of other procedural texture generating functions in the way that it does not use traditional gradient noise functions as its basis function. Instead, it is based on a feature points scattered over three dimensional base. Value of this function is evaluated from the distance between one or more feature points and the point in the space.

Genetic textures

Genetic texture generation uses a human for quality control of the texture. The computer generates a set of texture candidates from which the user picks the best and computer then generates another set by mutating and crossing over the old ones.

Example of a procedural marble texture

(Taken from The Renderman Companion Book, by Steve Upstill)

/* Copyrighted Pixar 1988 */
/* From the RenderMan Companion p.355 */
/* Listing 16.19  Blue marble surface shader*/

/*
 * blue_marble(): a marble stone texture in shades of blue
 * surface
 */

blue_marble(
         float   Ks    = .4, 
                 Kd    = .6, 
                 Ka    = .1,
                 roughness = .1,
                 txtscale = 1;
         color   specularcolor = 1)
{
   point PP;            /* scaled point in shader space */
   float csp;           /* color spline parameter */
   point Nf;            /* forward-facing normal */
   point V;             /* for specular() */
   float pixelsize, twice, scale, weight, turbulence;

   /* Obtain a forward-facing normal for lighting calculations. */
   Nf = faceforward( normalize(N), I);
   V = normalize(-I);

   /*
    * Compute "turbulence" a la [PERLIN85]. Turbulence is a sum of 
    * "noise" components with a "fractal" 1/f power spectrum. It gives the
    * visual impression of turbulent fluid flow (for example, as in the 
    * formation of blue_marble from molten color splines!). Use the 
    * surface element area in texture space to control the number of 
    * noise components so that the frequency content is appropriate 
    * to the scale. This prevents aliasing of the texture.
    */
   PP = transform("shader", P) * txtscale;
   pixelsize = sqrt(area(PP));
   twice = 2 * pixelsize;
   turbulence = 0;
   for (scale = 1; scale > twice; scale /= 2) 
       turbulence += scale * noise(PP/scale);

   /* Gradual fade out of highest-frequency component near limit */
   if (scale > pixelsize) {
       weight = (scale / pixelsize) - 1;
       weight = clamp(weight, 0, 1);
       turbulence += weight * scale * noise(PP/scale);
   }

   /*
    * Magnify the upper part of the turbulence range 0.75:1
    * to fill the range 0:1 and use it as the parameter of
    * a color spline through various shades of blue.
    */
   csp = clamp(4 * turbulence - 3, 0, 1);
   Ci = color spline(csp,
   color (0.25, 0.25, 0.35),      /* pale blue        */
       color (0.25, 0.25, 0.35),  /* pale blue        */
       color (0.20, 0.20, 0.30),  /* medium blue      */
       color (0.20, 0.20, 0.30),  /* medium blue      */
       color (0.20, 0.20, 0.30),  /* medium blue      */
       color (0.25, 0.25, 0.35),  /* pale blue        */
       color (0.25, 0.25, 0.35),  /* pale blue        */
       color (0.15, 0.15, 0.26),  /* medium dark blue */
       color (0.15, 0.15, 0.26),  /* medium dark blue */
       color (0.10, 0.10, 0.20),  /* dark blue        */
       color (0.10, 0.10, 0.20),  /* dark blue        */
       color (0.25, 0.25, 0.35),  /* pale blue        */
       color (0.10, 0.10, 0.20)   /* dark blue        */
       );

   /* Multiply this color by the diffusely reflected light. */
   Ci *= Ka*ambient() + Kd*diffuse(Nf);

   /* Adjust for opacity. */
   Oi = Os;
   Ci = Ci * Oi;

   /* Add in specular highlights. */
   Ci += specularcolor * Ks * specular(Nf,V,roughness);
}

This article was taken from The Photoshop Roadmap with written authorization

References


See also


 
 

 

Copyrights:

Computer Desktop Encyclopedia. THIS DEFINITION IS FOR PERSONAL USE ONLY.
All other reproduction is strictly prohibited without permission from the publisher.
© 1981-2010 The Computer Language Company Inc.  All rights reserved.  Read more
Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Procedural texture" Read more