Given F(u,v) function, ep = 1 /
(TextureMapResolution)
Fu = (F(u+ep, v) - F(u - ep, v)) /
(2*ep)
Fv = (F(u, v+ep) - F(u, v - ep)) /
(2*ep)
How do we calculate Pu,
Pv?
- Displace world space point in +u, -u direction and +v, -v
direction by small amount and calculate approximated partial derivative as :
- Pu = (P(p+uepsilon) -
P(p-uepsilon)) / (2 * epsilon)
- Pv = (P(p+vepsilon) -
P(p-vepsilon)) / (2 * epsilon)
- If smooth shading, need to adjust this because of interpolated
normals:
- PVtemp = Pu X N
- Pu = N X PVtemp
- PUtemp = Pv X N
- Pv = N X PUtemp
Dependence on scale:
If scale object, need to adjust displacement map accordingly
D' = alpha * D * |N|/|D| ,
alpha = sqrt ( Fu2 +
Fv2)
N'' = N + D'
Displacement Mapping [Cook 84]
- Use texture map to displace actual surface
geometry. (vertices, control vertices)
- Done as a pre-process to geometry before the actual rendering
- Requires fine resolution in geometry or will get unexpected
holes.
- Alternative is for program to add geometry when displacement
variation can't smoothly be represented in geometry.
- Example of Bump Mapping vs. Displacement Mapping
- How do you tell the difference between the two?
Environment Mapping (Reflection
Mapping) [Newell 76]
- Used to simulate ray traced reflections.
- Use reflection vector as index into texture map.
- Texture map is either hand drawn or precomputed rendering
of scene viewed from that location (often times 6 directional
rendering ).
- Normally use box projection or spherical.
- Examples of box projection:
- Notice the differences in the ray traced vs. environmental mapped
images:
- Key to tell which is which? Look for object reflecting itself.
Return to Main Page