4 10 DISPLACEMENTMAPPING Exploration of bump parallax relief
4. 10. DISPLACEMENTMAPPING Exploration of bump, parallax, relief and displacement mapping
TANGENT SPACE Overview of Tangent Space
firstly necessary to understand tangent space. Tangent Space Common coordinate spaces (and transforms) are as shown opposite. The view matrix converts from world space to view space, with the projection matrix converting view eye space into clip space. After clip space, coordinates undergo perspective divide and a viewport transformation, ultimately resulting in “window coordinates”. Tangent Space TBN Matrix Object Space Model Matrix World Space View Matrix Eye Space Projection Matrix Clip Space
Tangent space is the coordinate space local to the surface of the model. Tangent Space For a single quad, tangent space is the coordinate space formed by the two tangent vectors along the S and T axis, and the surface normal.
A TBN matrix converts from object space to tangent space. It is build as: Tangent Space (where S and T are the tangents and N the normal). Aside: TBN is for: Tangent, short Binormal, No where Binormrmal, another nam al is the tangent e for (sometimes k arguably mornown, senisbly, as a e bitangent).
DISPLACEMENT MAPPING Different forms of Displacement Mapping
Video not available in on-line slides
Introduction to Bump Mapping A bump map is a form of texture that holds bump information. Bump mapping is a technique which Commonly , a bump map stores a adds surface ‘roughness’, improving the visual minute surface height fieldfidelity (e. g. Aof greyscale image detail which would otherwise require a largethe number of polygons model. where brightness of eachtopixel holds the intended surface height) Bump mapping techniques operate by changing how a particular pixel is lit or textured based on the view angle and the stored height information.
surface normal is calculated for each pixel to be rendered. This normal controls how light interacts with the object (e. g. within Phong shading). Introduction to Bump Mapping A bump map can be used to calculate the surface normal of the height map, modifying the calculated normal and effecting how the pixel is lit. The height map may also be used to control which part of a diffuse texture is used to texture the pixel.
A range of different types of bump mapping algorithm exist. Introduction to Bump Mapping Normal mapping offers the most simple form of bump mapping • technique. • Parallax mapping offers a slightly more complex approach. • Relief mapping (or parallax occlusion mapping) is a more complex form of parallax mapping using simple ray tracing. • Displacement mapping is a more true form of bump mapping that modifies the position of vertices. Simple forms of bump mapping only perturb the surface normals. The more complex forms of bump mapping provide bumpy silhouettes and realistic shadows.
A normal map holds (in the RGB channels) the X, Y and Z coordinate tangent space normals. Normal Mapping The normal map is used to provide a more accurate per -pixel normal when calculating the intensity of the light on that surface. This provides the illusion of considerably more fine surface detail.
types of parallax mapping, including: • Offset and Offset with Limiting • Iterative parallax • Parallax occlusion • Relief • Cone step • Steep parallax Parallax Mapping Basic parallax mapping (offset and iterative) is a single step process which does not take into account occlusion. Later extensions incorporate iterative approaches which permit occlusion and accurate silhouette rendering. However, it is only now that such approaches are becoming feasible on current hardware.
Parallax Mapping Parallax mapping changes the texture lookup coordinates by introducing a displacement based on the tangent space viewing angle and the height space value. At steeper view-angles, the texture coordinates are displaced more, givingparallax the illusion of depth due to parallax effects as the view changes. Basic mapping looks good on any relatively large surface viewed from non-oblique angles (e. g. walls and floors). It's not good for steep edges, because of the distortion
Relief mapping is one name (also including steep parallax mapping and parallax occlusion mapping) for a class of algorithms that trace rays against a height field. Relief Mapping / Parallax Occlusion Mapping The basic approach is to walk along a ray which has entered the height field's volume and find the first point of intersection with the height field.
Relief Mapping / Parallax Occlusion Mapping Various techniques have been proposed to speed up the ray trace by taking variable step sizes. Relief mapping is capable of providing surface selfocclusion, self-shadowing, view-motion parallax and silhouettes.
Video not available in on-line slides
Video not available in on-line slides
Parallax Occlusion Mapping
Displacement Mapping It provides self-occlusion, selfshadowing andmapping silhouettes. Displacement modifies the actual geometric position of points However, it is also a costly mapping over a textured surface (typically along the surface normal). process as additional geometry must be introduced as part of an adaptive tessellation (increasing the number of rendered polygons) to produce a more highly detailed mesh.
ed ect r i g D din a e r DIRECTED READING Directed reading regarding bump mapping
different displacement mapping techniques (bump, parallax, displacement, etc. ). Directed reading: Bump Mapping • Read Detailed Shape Representation with Parallax Mapping – for the initial formulation of parallax mapping • Read Shader. X 3 - Parallax Occlusion Mapping – for the initial formulation of parallax occlusion mapping • Read Displacement Mapping – for coverage of true displacement mapping ed ect r i g D din rea
• Prism Parallax Occlusion Mapping with Accurate Silhouette Generation Directed reading: Bump Mapping • Real-Time Relief Mapping on Arbitrary Polygonal Surfaces • Relief Mapping of Non-Height-Field Surface Details • Dynamic Parallax Occlusion Mapping with Approximate Soft Shadows • GPU Gems 2 - Per-Pixel Displacement Mapping with Distance Functions • GPU Gems 3 - Relaxed Cone Stepping for Relief Mapping ed ect r i g D din rea
Summary Today we explored: ü Different types of bump/ displacement mapping. : o d o T cted e r i d e h t d a e üR reading like d l u o w u o y f üThink i / p m u b e d i v o r to p g n i p p a m t n e displacem your n i h t i w s e u q i techn project
- Slides: 24