real-time rendering polygonal techniques lecture 05 marina gavrilova

27
Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Upload: lynne-austin

Post on 17-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Real-Time Rendering

POLYGONAL TECHNIQUES

Lecture 05Marina Gavrilova

Page 2: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Brief Outline

Surface Geometry Tessellation Shading Problem Edge Crack Consolidation Mesh Simplification

Page 3: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Geometric Representation 3D 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

Page 4: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Object representation 3D

Page 5: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Tessellation The process of splitting a polygon into

smaller pieces (usually triangles) Types:

Regular tessellation Convex tessallation Triangle fan tessalation Regular triangle tessallation

Page 6: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

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

Incorrect

Visual

Artifact Correct

Page 7: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Solution to Smooth Shading Problem Carefully choose diagonal

Choose shortest diagonal Lit-quads: choose shortest color difference

diagonal Terrain models: Maximize minimum angle

Texture problem: Further tessellate the object Use different Texture Coordinate

interpolation

Page 8: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Edge Cracking and Repair Occurs in NURBS, Multiple LOD When SPLINE surfaces meet, border mismatch and

cracks are apparent ROAM and PM with multiple LOD:

Occurs between primitives of different LOD T-vertices creates cracks

Solution: Edge-stitching add aditional edges Potential side-effect: Thin triangles (visual artifact)

Solution: Use more sophisticated split and crack repair scheme

Repairing cracks

Page 9: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Consolidation 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

Page 10: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

General Approach to Consolidation 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

Page 11: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Mesh Simplification Use less number of triangles to render an

object Mesh simplification Multiple LOD Progressive meshes:

Error metric or Energy function Two operations: vertex split or edge collapse Apply refinements to minimize energy function

Page 12: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

View-Dependent Refinementof Progressive Meshes

Hugues HoppeMicrosoft Research

SIGGRAPH 97

Page 13: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

View-dependent LOD

29,400 faces29,400 faces different LOD’s coexistdifferent LOD’s coexistover surfaceover surface

Page 14: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

base meshbase mesh original meshoriginal mesh

150150

MM00 MM11

152152

Review of progressive meshes

… … MM175 175 ……

500500 13,54613,546

MMnn

vvll vvrr

vvuu

vvtt

vvssvvll vvrr

edge collapseedge collapse

vertex splitvertex split

Page 15: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

150150

MM00 MM11

vsplvspl00

152152The PM representation

MM175175

500500

… … vsplvsplii … …

13,54613,546

vsplvspln-1n-1

MMnn

progressive mesh (PM)progressive mesh (PM) representation representation

vsplvspl00 … … vsplvsplii … … vsplvspln-1n-1

MM00

MM00 MMnnMMii

MMnn

Page 16: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

vv22

Vertex hierarchy

vsplvspl00MM00 vsplvspl11 vsplvspl22 vsplvspl33 vsplvspl44 vsplvspl55

vv11 vv33MM00

vv1010 vv1111

vsplvspl33

vv11 vv22

vv44 vv55

vsplvspl00

vv88 vv99

vsplvspl22

vv33

vv66 vv77

vsplvspl11

vv55

vv1212 vv1313

vsplvspl44

vv1010

vsplvspl55

vv1414 vv1515

vv66

PM:PM:

MMnn

[Xia & Varshney 96]

MM00

Page 17: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

ICCSA 2004ICCSA 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

Page 18: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Understanding Height FieldsDEM: Digital Elevation Model

• Contains only relative Height

• Regular interval

• Pixel color determine height

•Discrete resolution

Page 19: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

ROAM: Real-time Optimally Adapting Mesh

Quad Tree

Triangle BIN Tree

•No cracks

•Reversible

•Efficient

•Adaptive

Developed by Mark Duchaineau, Lawrence Livermore National Laboratory

Page 20: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Improvements over Original ROAM Scheme

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

Page 21: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Proposed Priority Function for Split Queue

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

UfLev

CfCenterPfCenterDETDCfAngularityFCfiority

)(1

)())((),(),(Pr

Page 22: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Speeding up the processAmortizing refinement 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

Page 23: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Maintaining Degenerated S-Queue

Page 24: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Understanding Geo-Morph Smooth interpolation of vertex

over subdivision

Requires maintenance of one additional queue (G-queue)

Page 25: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Smoothing 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)

Page 26: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

Result with Texturing

Page 27: Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova

End of Lecture 05

Questions?