Post on 17-Dec-2015
transcript
Real-Time Rendering
POLYGONAL TECHNIQUES
Lecture 05Marina Gavrilova
Brief Outline
Surface Geometry Tessellation Shading Problem Edge Crack Consolidation Mesh Simplification
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
Object representation 3D
Tessellation The process of splitting a polygon into
smaller pieces (usually triangles) Types:
Regular tessellation Convex tessallation Triangle fan tessalation Regular triangle tessallation
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
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
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
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
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
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
View-Dependent Refinementof Progressive Meshes
Hugues HoppeMicrosoft Research
SIGGRAPH 97
View-dependent LOD
29,400 faces29,400 faces different LOD’s coexistdifferent LOD’s coexistover surfaceover surface
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
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
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
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
Understanding Height FieldsDEM: Digital Elevation Model
• Contains only relative Height
• Regular interval
• Pixel color determine height
•Discrete resolution
ROAM: Real-time Optimally Adapting Mesh
Quad Tree
Triangle BIN Tree
•No cracks
•Reversible
•Efficient
•Adaptive
Developed by Mark Duchaineau, Lawrence Livermore National Laboratory
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
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
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
Maintaining Degenerated S-Queue
Understanding Geo-Morph Smooth interpolation of vertex
over subdivision
Requires maintenance of one additional queue (G-queue)
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)
Result with Texturing
End of Lecture 05
Questions?