Procedural texture
Encyclopedia
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.
as their basis function, but some simple functions may use more trivial methods such as the sum of sinusoidal functions for instance.
Solid textures are an alternative to the traditional 2D texture images which are applied to the surfaces of a model. It is a difficult and tedious task to get multiple 2D textures to form a consistent visual appearance on a model without it looking obviously tiled. Solid textures were created to specifically solve this problem.
Instead of editing images to fit a model, a function is used to evaluate the colour of the point being textured. Points are evaluated based on their 3D position, not their 2D surface position. Consequently, solid textures are unaffected by distortions of the surface parameter space, such as you might see near the poles of a sphere. Also, continuity between the surface parameterization of adjacent patches isn’t a concern either. Solid textures will remain consistent and have features of constant size regardless of distortions in the surface coordinate systems.
. The process continues until a suitable texture for the user is generated.
This isn't a commonly used method of generating textures as it’s very difficult to control and direct the eventual outcome. Because of this, it is typically used for experimentation or abstract textures only.
, self-organization
processes lead to structured patterns - still with a part of randomness. Reaction-diffusion systems are a good example to generate such kind of textures.
This article was taken from The Photoshop Roadmap with written authorization
Algorithm
In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning...
intended to create a realistic representation of natural elements such as wood
Wood
Wood is a hard, fibrous tissue found in many trees. It has been used for hundreds of thousands of years for both fuel and as a construction material. It is an organic material, a natural composite of cellulose fibers embedded in a matrix of lignin which resists compression...
, marble
Marble
Marble is a metamorphic rock composed of recrystallized carbonate minerals, most commonly calcite or dolomite.Geologists use the term "marble" to refer to metamorphosed limestone; however stonemasons use the term more broadly to encompass unmetamorphosed limestone.Marble is commonly used for...
, granite
Granite
Granite is a common and widely occurring type of intrusive, felsic, igneous rock. Granite usually has a medium- to coarse-grained texture. Occasionally some individual crystals are larger than the groundmass, in which case the texture is known as porphyritic. A granitic rock with a porphyritic...
, metal
Metal
A metal , is an element, compound, or alloy that is a good conductor of both electricity and heat. Metals are usually malleable and shiny, that is they reflect most of incident light...
, stone
Rock (geology)
In geology, rock or stone is a naturally occurring solid aggregate of minerals and/or mineraloids.The Earth's outer solid layer, the lithosphere, is made of rock. In general rocks are of three types, namely, igneous, sedimentary, and metamorphic...
, and others.
Usually, the natural look of the rendered result is achieved by the usage of fractal
Fractal
A fractal has been defined as "a rough or fragmented geometric shape that can be split into parts, each of which is a reduced-size copy of the whole," a property called self-similarity...
noise
Noise
In common use, the word noise means any unwanted sound. In both analog and digital electronics, noise is random unwanted perturbation to a wanted signal; it is called noise as a generalisation of the acoustic noise heard when listening to a weak radio transmission with significant electrical noise...
and turbulence
Turbulence
In fluid dynamics, turbulence or turbulent flow is a flow regime characterized by chaotic and stochastic property changes. This includes low momentum diffusion, high momentum convection, and rapid variation of pressure and velocity in space and time...
functions
Function (mathematics)
In mathematics, a function associates one quantity, the argument of the function, also known as the input, with another quantity, the value of the function, also known as the output. A function assigns exactly one output to each input. The argument and the value may be real numbers, but they can...
. These functions are used as a numerical representation of the “randomness
Randomness
Randomness has somewhat differing meanings as used in various fields. It also has common meanings which are connected to the notion of predictability of events....
” found in nature.
Solid texturing
Solid texturing is a process where the texture generating function is evaluated over at each visible surface point of the model. Traditionally these functions use Perlin noisePerlin noise
Perlin noise is a computer-generated visual effect developed by Ken Perlin, who won an Academy Award for its use in the motion picture Tron...
as their basis function, but some simple functions may use more trivial methods such as the sum of sinusoidal functions for instance.
Solid textures are an alternative to the traditional 2D texture images which are applied to the surfaces of a model. It is a difficult and tedious task to get multiple 2D textures to form a consistent visual appearance on a model without it looking obviously tiled. Solid textures were created to specifically solve this problem.
Instead of editing images to fit a model, a function is used to evaluate the colour of the point being textured. Points are evaluated based on their 3D position, not their 2D surface position. Consequently, solid textures are unaffected by distortions of the surface parameter space, such as you might see near the poles of a sphere. Also, continuity between the surface parameterization of adjacent patches isn’t a concern either. Solid textures will remain consistent and have features of constant size regardless of distortions in the surface coordinate systems.
Cellular texturing
Cellular texturing differs from the majority of other procedural texture generating techniques as it does not depend on noise functions as its basis, although it is often used to complement the technique. Cellular textures are based on feature points which are scattered over a three dimensional space. These points are then used to split up the space into small, randomly tiled regions called cells. These cells often look like “lizard scales,” “pebbles,” or “flagstones”. Even though these regions are discrete, the cellular basis function itself is continuous and can be evaluated anywhere in space.Genetic textures
Genetic texture generation is highly experimental approach for generating textures. It is a highly automated process that uses a human to completely moderate the eventual outcome. The flow of control usually has a computer generate a set of texture candidates. From these, a user picks a selection. The computer then generates another set of textures by mutating and crossing over elements of the user selected textures. For more information on exactly how this mutation and cross over generation method is achieved, see Genetic algorithmGenetic algorithm
A genetic algorithm is a search heuristic that mimics the process of natural evolution. This heuristic is routinely used to generate useful solutions to optimization and search problems...
. The process continues until a suitable texture for the user is generated.
This isn't a commonly used method of generating textures as it’s very difficult to control and direct the eventual outcome. Because of this, it is typically used for experimentation or abstract textures only.
Self-organizing textures
Starting from a simple white noiseWhite noise
White noise is a random signal with a flat power spectral density. In other words, the signal contains equal power within a fixed bandwidth at any center frequency...
, self-organization
Self-organization
Self-organization is the process where a structure or pattern appears in a system without a central authority or external element imposing it through planning...
processes lead to structured patterns - still with a part of randomness. Reaction-diffusion systems are a good example to generate such kind of textures.
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
See also
- Texture synthesisTexture synthesisTexture synthesis is the process of algorithmically constructing a large digital image from a small digital sample image by taking advantage of its structural content...
- Texture artistTexture artistA texture artist is an individual who develops textures for digital media, usually for video games, movies, web sites and television shows. These textures can be in the form of 2d or 3d art that may be overlaid onto a polygon mesh to create a realistic 3D model.Texture artists often take advantage...
- Procedural generationProcedural generationProcedural generation is a widely used term in the production of media; it refers to content generated algorithmically rather than manually. Often, this means creating content on the fly rather than prior to distribution...
- Perlin noisePerlin noisePerlin noise is a computer-generated visual effect developed by Ken Perlin, who won an Academy Award for its use in the motion picture Tron...
- Self-organizationSelf-organizationSelf-organization is the process where a structure or pattern appears in a system without a central authority or external element imposing it through planning...
Some programs for creating textures using Procedural texturing
- Allegorithmic Substance
- Filter ForgeFilter ForgeFilter Forge is a standalone application and plugin for Adobe Photoshop and compatible 8bf plugin hosts that allows users to apply programmable image processing filters and to define them with a visual node-based filter editor...
- Genetica (program) http://www.spiralgraphics.biz/genetica.htm
- DarkTree http://www.darksim.com/html/dt25_description.html
- Context Free Art http://www.contextfreeart.org/index.html
- TexRDTexRDTexRD is a small but singular software which generates animated random texturesbased on reaction-diffusion.-Principles:Complex chemical reactions between several fluids...
http://www.texrd.com (based on reaction-diffusion: self-organizing textures) - Texture Garden http://texturegarden.com
- Enhance Textures http://www.shaders.co.uk