Title: Texturing
1Texturing
- Surfaces texture its look feel
- Graphics a process that takes a surface and
modifies its appearance using - An image
- A function
- Other dataset
- Gained importance in 80s enhance Phong shaded
scenes - Environment mapping Reflect the surrounding
environments into shiny animated objects
2Mapping Techniques Texture and Environment
Mapping
- Texture A 2D image or pattern
- Goal Map the texture or detail onto a 3D object
- Mapping Finding two u,v values from three values
from one of the 3-D coordinate spaces - R3 -gt R2
3Main Issues in Texture Mapping
- Anti-aliasing
- What attribute or parameter of the model is to be
modulated? - How is texture mapping carried out? Define a
mapping between the 2D domain of texture maps and
3D object domain
4Modulating Different Parameters
- Surface color Modulating the diffuse
coefficient. Most common Catmull1974 - Specular Diffuse Reflection (Environment
mapping) Blinn 1976 - Normal Vector Perturbation Perturbs the surface
normal Blinn 1978. Extended to frame mapping
(tangent, normal, binormal) Kajiya1985
5Modulating Different Parameters
- Heckbert1986 Review Paper, IEEE CG A
- Specularity Surface roughness function in the
Cook-Torrance reflection model (variable
shininess) Blinn1978 - Transparency Doesnt apply texture to an object,
but generates a complete object a cloud using a
mathematical texture function to modulate the
transparency of an ellipsoid
6Main Approaches and Categories
-
- General texture mapping a 2D texture domain is
pasted onto the object - View-dependent mapping techniques e.g. chrome,
environment, reflection and refraction - Bump mapping techniques Alters the geometry of
the surface
7Texture Mapping and Object Representation
-
- Polygonal models The mapping or the projection
function needs to be computed - Pasting Cannot paste a 2D pattern onto a
polygonal object of arbitrary topology without
cutting the pattern - Parametric analytic models computing the mapping
function is relatively simple (e.g. rational
parametric surfaces)
8Texture Mapping Pipeline
- Compute object space location (x,y,z)
- Use mapping function to find (u,v)
- Use corresponder function(s) to compute texel
- Apply value transform function
- Modify illumination equation value
9Practical Approach for Polygonal Models
- Associate a texture map coordinate (u,v) with
each vertex of the polygonal mesh - Derive a mapping or projection function F() such
that - (u,v) F(x,y,z)
- Develop algorithms for associating texture values
internal to the polygon, as it gets clipped and
rendered.
10Standard mapping or projection functions
-
- Cylindrical mapping function
- Spherical mapping function
- Box mapping function
- Planar projections
11Mapping during Modeling
-
- Object is approximately cylindrical or spherical
(e.g. bananas) - Bend the objects without changing the mapping
function to the vertices
12Texture Mapping Pipeline
- Compute object space location (x,y,z)
- Use mapping function to find (u,v)
- Use corresponder function(s) to compute texel
- Apply value transform function
- Modify illumination equation value
13Corresponder Functions
- Transform the parameter space values (u,v) into
a texture space value (texels) - Examples
- array indices into an image texture (sampling,
anti-aliasing, mipmapping) - Optional matrix transformation (OpenGL) rotate,
scale - Image application warp, repeat, mirror
- Can apply multiple corresponder functions
14Texture Application
- RGB or RGB\alpha, where \alpha is the opacity
value - Change surface attribute using texture blending
functions - Replace Replace the original color with texture
color - Modulate Multiply the surface color by texture
color
15Other Mappings or Visual Representations
- Volume textures Evaluated on any point in space
- Hypertexture volumetric modeling technique
- Texel-mapping Maps an entire surface description
onto the surface of an object - Displacement Maps Moves the surface by a given
amount in a given direction
16Reverse Mapping Techniques
- Active area of research
- Optimization methods
- Harmonic maps
- Divide-and-conquer approaches
- Multi-resolution approaches
- A huge literature on surface parameterization
over last 10 years
17Mapping Polygon Interior Points
- Associate (u,v) values with the interior of the
polygon - Simple solution Include the (u,v) coordinates
with the screen coordinates and normals. Use
Phong interpolation approach.
18Mapping Polygon Interior Points Known Projection
Function
- Compute the function as the polygon is clipped
and rendered - Transform the vertices of the clipped polygon to
the object space - Apply the projection function to the transformed
vertices to compute the texture coordinates
19Environment Mapping
- Approximation to ray tracing
- Object is surrounded by a closed 3D surface onto
which the environment is projected - Used for seeing recognizable detail in the
reflected information
20Location in the Environment
- Mapping the environment to inside of a large
sphere - Trace a ray from the eye-point to the surface of
the rendered object - Reflect the ray about the normal and trace the
ray to the sphere - Greater distortion The farther an object is from
the eye-point or larger the object
21Mapping to a Large Cube Greene86
- Explicit representation by 6 raster images
- Take six separate, appropriately oriented
photographs of the scene, using a 900 flat field
lens - Project the photographs onto the six inside faces
of the cube - Can combine Lambertian diffuse and specular
reflection in the environment map - Mapping function is not spherical and has less
distortion
22Rough Appearance
- Texture Mapping Adding texture patterns to
smooth surfaces. - Rough Appearance Adding rough-texture pattern to
a smooth surface?
23Bump Mapping
- Perturb the surface normal Blinn76
- Given Q(u,v), let the surface normal be n,
- where n Qu X Qv, and let n be the normalized
unit vector - For any point on Q(u,v), the position vector is
- Q(u,v) Q(u,v) P(u,v) n,
- where P(u,v) is a perturbation function.
- The normal of the perturbed surface is
- n Pu (n X Qv) Pv (Qu X n)
24Choice of Perturbation Function
- Any first order continuous function
- Examples grid pattern, character bit maps,
Z-buffer patterns, random hand-drawn patterns - Nonmathematical patterns The perturbation
function is a 2D lookup table. Derivatives are
computed by table lookup.
25Procedural Textures (Solid Textures)
- Define a texture function throughout a 3D volume
- Object is embedded in the 3D texture volume
- Textured surface intersection of the object and
3D texture volume - Coherent appearance with no texture
discontinuities - Independent of surface geometry or coordinate
system
26Procedural Textures (Wood Grain Examples)
- Coaxial alternating light and dark cylinders
- Lack of distortion or aliasing
27Other Issues in Texture Mapping
- Magnification (use of bilinear interpolation)
- Minification
- Sampling and filtering (aliasing problems)
- Use of mipmapping for anti-aliasing
- Texture caching and compression (limited texture
memory) - Multitexturing (and multi-pass rendering) two or
more textures are accessed during the same pass
28Texture Antialiasing
- Aliasing is a constant aspect of texture mapping
- Frequency domain analysis silhouette edges and
perspective can cause high frequency patterns in
image space - Point sampling (mapping the center of image pixel
to texture space and use the nearest texture
pixel) a texture pattern can generate lots of
aliasing problems - Wide literature on different filters to
circumvent the problem
29Mip-mapping
-
- Generates many images of decreasing resolution by
averaging multiple pixels - Original image and the averaged lower resolution
images are stored in multiple tables - Equivalent to convolution with a square box
filter - Stacking the mipmaps in 3 space forms a pyramid
- Memory 4/3 times the original texture image
- Widely used texture filtering method fast and
little memory
30Summed Area Tables
-
- Extension of mipmaps to rectangular texture
regions - Reduce the table to one using summed area table
- Each entry represents the sum of the intensities
of all texture pixels in a rectangle defined by
lower left corner and the pixel of interest - Average intensity Divide this by number of
pixels - Used summed areas to technique to compute the
intensity of each pixel - Prefilter the texture image, using a box filter
function prior to summing