real-time relief mapping on arbitrary polygonal surfaces fabio policarpo manuel m. oliveira joao l....

28
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Upload: myles-simpson

Post on 21-Jan-2016

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Real-Time Relief Mapping on Arbitrary Polygonal

Surfaces

Fabio Policarpo Manuel M. Oliveira

Joao L. D. Comba

Page 2: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

OverviewOverview

IntroductionIntroduction Related WorkRelated Work Review of Relief Texture MappingReview of Relief Texture Mapping MethodsMethods ResultsResults DiscussionDiscussion

Page 3: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

IntroductionIntroduction

Represent surface Represent surface detail using texturesdetail using textures

Apply to polygonal Apply to polygonal surfaces, allowing surfaces, allowing for deformationfor deformation

Allow self-Allow self-occlusions, occlusions, interpenetrations, interpenetrations, shadows and per-shadows and per-pixel lighting effectspixel lighting effects

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Goals

Page 4: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Related WorkRelated Work

Bump mappingBump mapping Self-occlusions, shadows and silhouettes are Self-occlusions, shadows and silhouettes are

not accounted fornot accounted for Horizon mapping Horizon mapping

Provides shadowing for bumped surfacesProvides shadowing for bumped surfaces Implemented on graphics hardware for Implemented on graphics hardware for

improved performanceimproved performance

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 5: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Related WorkRelated Work

Displacement mappingDisplacement mapping Requires large amount of micro-polygonsRequires large amount of micro-polygons Extensions added to avoid explicit rendering Extensions added to avoid explicit rendering

of micro-polygonsof micro-polygons Ray tracing methods - too slowRay tracing methods - too slow 3D inverse image warping – too slow3D inverse image warping – too slow 3D texture mapping – produces artifacts for some3D texture mapping – produces artifacts for some

viewing anglesviewing angles

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 6: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Related WorkRelated Work

View-dependent displacement View-dependent displacement mapsmaps Pre-computes distances to a Pre-computes distances to a

reference surfacereference surface Sampled along several view Sampled along several view

directionsdirections Does not handle close up viewing Does not handle close up viewing

wellwell Parallax MappingParallax Mapping

Uses per-texel depth Texture coordinates along view

direction are shifted based on depth

Only good for irregular/noisy bumps No support for shadows

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 7: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba
Page 8: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Relief Texture MappingRelief Texture Mapping

Uses image warping techniques and Uses image warping techniques and per-texel depth to create the illusion of per-texel depth to create the illusion of geometric detailgeometric detail

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 9: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Relief Texture MappingRelief Texture Mapping

Rendering of a height field requires a Rendering of a height field requires a search for the closest polygon along search for the closest polygon along the viewing raythe viewing ray

Overcome through a two-pass method:Overcome through a two-pass method: Convert height field to conventional 2D Convert height field to conventional 2D

texture using forward projectiontexture using forward projection Render texture as normalRender texture as normal

Texels move horizontal and vertical in Texels move horizontal and vertical in texture space based on their texture space based on their orthogonal displacements and the orthogonal displacements and the viewing directionviewing direction

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 10: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Representing 3D objectsRepresenting 3D objects Represent 3D geometry by relief texture Represent 3D geometry by relief texture

mapping parallelpipedsmapping parallelpipeds Cannot be extended to arbitrary surfacesCannot be extended to arbitrary surfaces

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 11: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Relief Mapping Polygonal Relief Mapping Polygonal SurfacesSurfaces

Uses modern graphics hardwareUses modern graphics hardware Because of fragment shaders, lighting is Because of fragment shaders, lighting is

computed real-timecomputed real-time Shaded color map is replaced by normal mapShaded color map is replaced by normal map

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 12: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Mapping relief dataMapping relief data

Compute viewing direction, VDCompute viewing direction, VD Transform VD to tangent space of Transform VD to tangent space of

fragmentfragment Use VD’ and texture coords (s,t) to Use VD’ and texture coords (s,t) to

compute the texture coords where VD’ compute the texture coords where VD’ hits depth of 1hits depth of 1

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 13: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Mapping relief dataMapping relief data

Compute the intersection Compute the intersection between VD’ and the height-between VD’ and the height-field surface using a binary field surface using a binary search starting with A and Bsearch starting with A and B

Perform the shading of the Perform the shading of the fragment using the fragment using the attributes associated with attributes associated with the texture coordinates of the texture coordinates of the computed intersection the computed intersection point.point.

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 14: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Binary SearchBinary Search Start with A-B lineStart with A-B line At each step (8 steps):At each step (8 steps):

Compute middle of the intervalCompute middle of the interval Assign averaged endpoint texture Assign averaged endpoint texture

coordinates and depthcoordinates and depth Use averaged tex coords to Use averaged tex coords to

access depth mapaccess depth map If stored depth value is less than If stored depth value is less than

computed depth value, the point computed depth value, the point is inside the surfaceis inside the surface

Proceed with one endpoint in and Proceed with one endpoint in and one outone out

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 15: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Linear SearchLinear Search To find first point under surface, start at A, advance ray To find first point under surface, start at A, advance ray

by by δδABAB δδ is a function of the angle between VD’ and is a function of the angle between VD’ and

interpolated fragment normal interpolated fragment normal No more than 32 steps are taken in their No more than 32 steps are taken in their

implementationimplementation Proceed with binary search (with less iterations) Proceed with binary search (with less iterations)

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 16: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

ShadowingShadowing Visibility problemVisibility problem Determine if light ray intersects surfaceDetermine if light ray intersects surface Do not need to know the exact point Do not need to know the exact point

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 17: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Dual Depth Relief TexturesDual Depth Relief Textures Represent opaque, closed surfaces Represent opaque, closed surfaces

with only one texturewith only one texture Second “back” layer is not used for Second “back” layer is not used for

rendering, but as a constraint for ray-rendering, but as a constraint for ray-height-field intersection height-field intersection

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 18: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Dual Depth Relief TexturesDual Depth Relief Textures

Introduction > Related Work > Relief Texture Mapping > Methods > Results

ResultsResults

Page 19: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Dual Depth Relief TexturesDual Depth Relief Textures

Introduction > Related Work > Relief Texture Mapping > Methods > Results

StorageStorage Two depthmaps and a normal map can be stored in one Two depthmaps and a normal map can be stored in one

texturetexture Since normals are unit length, you can store just x and y Since normals are unit length, you can store just x and y

and use the other two components for depth valuesand use the other two components for depth values Compute z @ run-time Compute z @ run-time Rendering is the same as described, except a point is in the Rendering is the same as described, except a point is in the

represented object if front_depth <= point depth <= represented object if front_depth <= point depth <= back_depth back_depth

Page 20: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

ResultsResults

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Most objects rendered with 512x512 relief Most objects rendered with 512x512 relief texturetexture

800x600 resolution at 85 fps800x600 resolution at 85 fps Written in CgWritten in Cg 3GHz PC w/ 512 MB memory on NVIDIA 3GHz PC w/ 512 MB memory on NVIDIA

GeForce 6800GT w/ 256 MB memory GeForce 6800GT w/ 256 MB memory

Page 21: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

ResultsResults

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 22: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

ResultsResults

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 23: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

ResultsResults

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 24: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

ResultsResults

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 25: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

ResultsResults

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 26: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

ResultsResults

Introduction > Related Work > Relief Texture Mapping > Methods > Results

Page 27: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

Doom 3 VideoDoom 3 Video

video demonstrationvideo demonstration

Page 28: Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba

ConclusionConclusion

Provided method for mapping relief Provided method for mapping relief textures to arbitrary surfaces in texture textures to arbitrary surfaces in texture space, allowing deformationspace, allowing deformation

Provides correct shadowing, self-occlusion, Provides correct shadowing, self-occlusion, and interpenetration with correct lightingand interpenetration with correct lighting

Presented an efficient ray-heightfield Presented an efficient ray-heightfield intersection algorithmintersection algorithm

Extended relief maps with dual-depth Extended relief maps with dual-depth texturestextures