RealTime Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

  • Slides: 27
Download presentation
Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Brief Outline n n n Surface Geometry Tessellation Shading Problem Edge Crack Consolidation Mesh

Brief Outline n n n Surface Geometry Tessellation Shading Problem Edge Crack Consolidation Mesh Simplification

Geometric Representation n n n n 3 D objects are usually represented as geometric

Geometric Representation n n n n 3 D objects are usually represented as geometric simplices (i. e. Triangles) Set of vertices (0 -simplices) Set of Edges (1 -simplices) Set of Triangles (2 -simplices) Surface normal for each triangle Texture component and associated UV coordinate Shading and lighting parameters Object surface properties

Object representation 3 D

Object representation 3 D

Tessellation n n The process of splitting a polygon into smaller pieces (usually triangles)

Tessellation n n The process of splitting a polygon into smaller pieces (usually triangles) Types: n n Regular tessellation Convex tessallation Triangle fan tessalation Regular triangle tessallation

n n Smooth Shading Problem Occur during triangulation Choice of diagonal can effect shading

n n Smooth Shading Problem Occur during triangulation Choice of diagonal can effect shading Fixed diagonal division creates visual artifact Triangulation may create incorrect texture Quad Correct Visual Artifact Correct Incorrect

Solution to Smooth Shading Problem n Carefully choose diagonal n n Choose shortest diagonal

Solution to Smooth Shading Problem n Carefully choose diagonal n n Choose shortest diagonal Lit-quads: choose shortest color difference diagonal Terrain models: Maximize minimum angle Texture problem: n n Further tessellate the object Use different Texture Coordinate interpolation

Edge Cracking and Repair n n n Occurs in NURBS, Multiple LOD When SPLINE

Edge Cracking and Repair n n n Occurs in NURBS, Multiple LOD When SPLINE surfaces meet, border mismatch and cracks are apparent ROAM and PM with multiple LOD: n n Occurs between primitives of different LOD T-vertices creates cracks Solution: Edge-stitching add aditional edges Potential side-effect: Thin triangles (visual artifact) n Solution: Use more sophisticated split and crack repair scheme Repairing cracks

Consolidation n n n Processed after the tessellation phase Consolidation: Finding and adjusting links

Consolidation n n n Processed after the tessellation phase Consolidation: Finding and adjusting links between tessellated objects Form a polygonal mesh (i. e. triangle mesh) Perform triangle stripping Solid objects or manifolds can facilitate culling techniques Face Orientation and normal adjust all face-vertex order to either of CW or CCW, Normal in the right direction

General Approach to Consolidation n n n Form Vertex-edge-face for all polygons and sort

General Approach to Consolidation n n n Form Vertex-edge-face for all polygons and sort them Compute intersection and seam and determine solidity Correct orientation (direction of normal) of each face Normal must point Outward direction for a solid object Find smoothing groups and compute vertex normal Find boundaries Create Polygonal meshes

Mesh Simplification n n Use less number of triangles to render an object Mesh

Mesh Simplification n n Use less number of triangles to render an object Mesh simplification Multiple LOD Progressive meshes: n n n Error metric or Energy function Two operations: vertex split or edge collapse Apply refinements to minimize energy function

View-Dependent Refinement of Progressive Meshes Hugues Hoppe Microsoft Research SIGGRAPH 97

View-Dependent Refinement of Progressive Meshes Hugues Hoppe Microsoft Research SIGGRAPH 97

View-dependent LOD 29, 400 faces different LOD’s coexist over surface

View-dependent LOD 29, 400 faces different LOD’s coexist over surface

Review of progressive meshes 150 152 M 0 500 M 1 base mesh 13,

Review of progressive meshes 150 152 M 0 500 M 1 base mesh 13, 546 … M 175 … vertex split vl vs vr Mn original mesh vu vl edge collapse vt vr

The PM representation 152 150 M 0 vspl 0 500 M 175 … …

The PM representation 152 150 M 0 vspl 0 500 M 175 … … vspli i … … 13, 546 vspln-1 n-1 vspl Mn progressive mesh (PM) representation M 0 Mi Mn

Vertex hierarchy PM: M 0 vspl 2 v 1 M 0 v 10 Mn

Vertex hierarchy PM: M 0 vspl 2 v 1 M 0 v 10 Mn v 12 vspl 1 vspl 3 vspl 4 v 2 v 11 v 4 v 13 [Xia & Varshney 96] v 3 v 5 v 6 v 14 vspl 5 v 8 v 7 v 15 v 9

ICCSA 2004 GTVIS: Fast and Efficient Rendering System for Real. Time Terrain Visualization Russel

ICCSA 2004 GTVIS: Fast and Efficient Rendering System for Real. Time Terrain Visualization Russel A. Apu, Marina L. Gavrilova Department of Computer Science University of Calgary

Understanding Height Fields DEM: Digital Elevation Model • Contains only relative Height • Regular

Understanding Height Fields DEM: Digital Elevation Model • Contains only relative Height • Regular interval • Pixel color determine height • Discrete resolution

ROAM: Real-time Optimally by Mark Duchaineau, Adapting Mesh. Developed Lawrence Livermore National Laboratory Quad

ROAM: Real-time Optimally by Mark Duchaineau, Adapting Mesh. Developed Lawrence Livermore National Laboratory Quad Tree Triangle BIN Tree • No cracks • Reversible • Efficient • Adaptive

Improvements over Original ROAM Scheme n n n n Preprocessing DEM image Smoothing Techniques

Improvements over Original ROAM Scheme n n n n Preprocessing DEM image Smoothing Techniques Texturing Amortized refinement Very efficient Higher Frame Rate (45 FPS) Continuity: Geo-morph sequence Less variation in frame rate

Proposed Priority Function for Split Queue n n n n n Determines Refinement Distribute

Proposed Priority Function for Split Queue n n n n n Determines Refinement Distribute LOD to preferred area Can be changed f=face, C=Camera U=Uniformity F=Frustum priority D=Curvature priority P=Distance priority DET=Curvature (preprocessed) Lev(f)=Subdivision level of face f

Speeding up the process Amortizing refinement n n n Updating the Split queue over

Speeding up the process Amortizing refinement n n n Updating the Split queue over multiple frames Allow split queue (heap) to degenerate Refine integrity using error threshold test Re-generate queue after constant number of frames Dramatic gain in speed

Maintaining Degenerated S-Queue

Maintaining Degenerated S-Queue

Understanding Geo-Morph n n Smooth interpolation of vertex over subdivision Requires maintenance of one

Understanding Geo-Morph n n Smooth interpolation of vertex over subdivision Requires maintenance of one additional queue (G-queue)

Smoothing n n n Compute face normal Compute vertex normal Local computation of normal

Smoothing n n n Compute face normal Compute vertex normal Local computation of normal during refinement (Geo-Morph) Apply vertex normal when rendering Advanced shading: Linear combination of face and vertex normal (Hybrid)

Result with Texturing

Result with Texturing

End of Lecture 05 Questions?

End of Lecture 05 Questions?