Surface Attributes
Shape from shading
Two spheres, one light, two shading models

With directional light sources, the degree to which a
light source contributes to the color of a surface is dependent upon the
angle formed between the light vector and the surface normal for the surface
in question
Flat shading using face normals
Color values are uniform across the face of each polygon,
based on the orientation of the polygon relative to the light source.
Smooth shading using vertex normals
Linear (Gouraud) Shading: using the colors at each vertex
normal as bounding values, color is linearly interpolated across the face
each polygon.
Bilinear interpolation: linear interpolation across two
dimensions
Linear shading often is supported in hardware and therefore
can be very fast.
Shading Models and Interpolation of Normals
More sophisticated shading models perform more refined
interpolations on surface normals in order to derive more localized shading
and reflection distinctions across the surface as it is rendered. This
can add significantly to the computations required for rendering.
But what about surface models?
The renderer will decompose continuous surfaces into polygonal
representations of those surfaces prior to rendering.
-
Ambient (Ka) - rendered color of the surface considers only
the ambient color component and the color (but not the position) of the
light source
-
Diffuse (Kd) - rendered color of surface considers the diffuse
color component, the color of the light source, and the position of the
light source relative to the surface, but not the viewer
-
Specular (Ks) - "highlight color" - color of surface considers
the color of the specular component, color of the light source, position
of the light source, and the position of the viewer
Vector notation
* Lighting models and associated vector notation are discussed
further in Watt

-
Mirror, diffuse and specular reflection distributions

-
Specular exponent controls the tightness or focus of the
reflection distribution about the reflection vector
Image texture mapping

Texture coordinates are mapped into surface coordinates
to position texture image colors on geometry.
Color Texture Map
Color texture mapping- replace color components (i.e.
Kd, Ka, Ks) with colors derived from an image map
Color Texture
Decal
Texture
-
Scalar ``decal'' maps can be used to restrict the region
or degree of a surface mapping effect
Color Texture
Transparency
-
Scalar transparency mapping - transparency values on a surface
are varied according to values derived from an image map

-
Bump mapping uses the color (usually grayscale) values from
an image map to perturb surface normals to create variations in the shading
of the surface to which the map is applied.

-
Bump mapping
-
perturbs normals according to value range in image map
-
alters shading calculations to give the illusion of variations
in surface geometry

-
Displacement mapping
-
displaces and retessellates geometry along normal (perpendicular
to surface) according to value range in image map
-
bump and displacement maps can be animated to portray undulating
surfaces


-
Reflection/environment mapping
-
an image map is projected onto a simple geometric representation
of an environment (usually a sphere or cube)
-
the image environment is projected onto affected surfaces
during rendering
-
works best with geometry which offers some variation in normals
across surfaces, as opposed to flat surfaces with no variation in normals
-
careful selection or design of reflection or environment
maps can offer good results without the expense of ray tracing
-
maps can be animated - e.g. use the previous frame in animation
as the current frame's reflection map to simulate action reflected in objects
in the scene

-
Object reflections versus mapped reflections
-
true inter-object reflections are usually ray traced
-
the degree of recursion in tracing reflections can be controlled
by a ``trace depth'' value

-
Transparency and Refraction
-
refraction index determines the degree of bending of the
light that passes through the refractive surfaces
-
Air = 1.0
-
Water = 1. 2 approx.
-
Glass = 1.6 approx.
-
refraction computations can be limited by a ``refraction
depth'' which operates similarly to ``trace depth'' for reflections
-
Shaders - collections of surface attributes that describe
the rendering properties of a surface
-
Procedural shaders - surface characteristics are derived
from algorithms or expressions, rather than from explicit numerical or
surface map values
-
Renderman - shading language that allows shader definition
of complex shaders of arbitrary complexity

Back to 3D Color outline
This file was last modified on September 23, 2002.