370 likes | 552 Views
Afrigraph 2004 Tutorial A: Part I Rasterization B ased Approaches. Andreas Dietrich Computer Graphics Group, Saarland University Saarbrücken, Germany. Overview. Part I – Rasterization Based Approaches Visibility Culling Hierarchical Z-Buffer Hierarchical Occlusion Maps
E N D
Afrigraph 2004 Tutorial A:Part I Rasterization Based Approaches Andreas Dietrich Computer Graphics Group, Saarland University Saarbrücken, Germany
Overview • Part I – Rasterization Based Approaches • Visibility Culling • Hierarchical Z-Buffer • Hierarchical Occlusion Maps • Prioritized-Layered Projection • Simplification Techniques • LODs / HLODs, • Textured Depth Meshes • Existing Architectures • MMR • Gigawalk • iWalk State of the Art in Massive Model Visualization
Overview • Part I – Rasterization Based Approaches • Visibility Culling • Hierarchical Z-Buffer • Hierarchical Occlusion Maps • Prioritized-Layered Projection • Simplification Techniques • LODs / HLODs, • Textured Depth Meshes • Existing Architectures • MMR • Gigawalk • iWalk State of the Art in Massive Model Visualization
Visibility Culling • Large scenes often densely occluded • Only a fraction of the total dataset visible • Visibility culling • Try to find the visible seti.e. objects that contribute to the image • Goal: • Rejecting large parts of the scene before actual HSR • Reduce rendering cost to complexity of visible portion • Ideally output sensitive :Running time proportional to visible set size State of the Art in Massive Model Visualization
Visibility Culling • Culling techniques • View-frustumculling • Reject geometryoutside the viewingvolume • Back-faceculling • Reject geometryfacing away fromthe observer • Occlusionculling • Reject objectsoccluded by others State of the Art in Massive Model Visualization
Visibility CullingOcclusion Culling • Occlusion culling • Not as trivial as view-frustum or back-face culling • Often requires preprocessing • Usually involving some scene hierarchy • Occlusion tests performed top-down • Difference to Hidden surface removal (HSR) • Does not identify exact potion of visible polygons • Tries to identify objects not visible • Often exact HSR follows after culling step • However, distinction not that clear • Some HSR algorithms feature built-in occlusion cullinge.g. Ray casting (see Part II) State of the Art in Massive Model Visualization
Visibility CullingOcclusion Culling • Main classification [Cohen-Or 03] • From-point methods • Computation with respect to current viewpoint • Image precision variants: Operate on fragments • Object precision variants: Operate on raw objects • From-region methods • Bulk computations valid for a specific region • Cell-and-portal variants: Exploit scene characteristics • Generic scene variants: Work with arbitrary scenes State of the Art in Massive Model Visualization
Visibility CullingOcclusion Culling • Additional classification criteria [Cohen-Or 03] • Conservative vs. approximate techniques • Tightness of approximation • All objects vs. subset of occluders • Convex vs. generic occluders • Individual vs. fused occluders • 2D vs. 3D • Special hardware requirements • Need of precomputation • Dynamic scenes State of the Art in Massive Model Visualization
Visibility CullingHierarchical Z-Buffer • Hierarchical Z-Buffer (HZB) [Greene 93] • Exploits object-space coherence: Octree subdivision • Exploits Image-space coherence: Z-pyramid • Octree used for • View-frustum culling • Hierarchic top-down rendering / occlusion • Front-back rendering • Z-Pyramid • Use original Z-buffer as finest level • Combine 2x2 samples by choosing farthest Z value State of the Art in Massive Model Visualization
Visibility CullingHierarchical Z-Buffer • Z-pyramid visibility query • Polygon visibility test: • Find finest-level pyramid sample coveringscreen-space bounding box of polygon • If nearest polygon Z value farther away than sample Z value • Polygon hidden Otherwise subdivide polygon and recurse • Allows for fast octree node occlusion query: • Test projected octree node faces • If node is hidden • All polygons inside hidden Otherwise subdivide node and recurse State of the Art in Massive Model Visualization
Visibility CullingHierarchical Occlusion Maps • Hierarchical Occlusion Map (HOM) [Zhang 97] • Pixels record opacity of screen space regions • Construction: • Select occluders:E.g. visible objects from previous frame • Render occluders:Pure white pixels on black background • Form next coarser level:Average 2x2 pixel regions State of the Art in Massive Model Visualization
Visibility CullingHierarchical Occlusion Maps • Object occlusion test • Find hierarchy level with pixels approximately the samesize as screen-space object bounding box • Examine each pixel in map overlapping bounding rectangle:If all pixel completely opaque • Objects projection inside occluders • Z-test: • Single Z-plane behind all occluders • Depth estimation buffer(Z-planes for separate screen regions) Otherwise check next level for not completely opaque pixels • Use transparency threshold to terminate recursion • Render object using Z-buffer State of the Art in Massive Model Visualization
Visibility CullingPLP • Prioritized-Layered Projection [Klosowski 00] • Approximate occlusion culling • Estimates visible primitives • Renders the primitives most likely visible up to a given budget • Scene partitioned into cells • Basic Idea: Cells containing much geometry are likely to occlude other cells • Render cells front-to-back in layers • Use probabilistic values to prioritize cell rendering order (depending on viewpoint settings) State of the Art in Massive Model Visualization
Visibility CullingPLP • Priority-Based Cell Traversal • Maintain priority queue (front ) • Contains cells to be rendered next • Front „advances“ from the viewpoint into the view frustum: • Remove cell (depending on priority) from the front • Render it (using z-Buffer) • Add adjacent cells to the front with updated priority • Continue until triangle budget reached State of the Art in Massive Model Visualization
Visibility CullingPLP • Priority-Based Cell Traversal • As priority use solidity • Heuristic to determine how difficult it is to see a particular cell • No inherent property of a cell • Accumulated during rendering, depending on viewpoint • Solidity is transferred to neighboring cells State of the Art in Massive Model Visualization
Overview • Part I – Rasterization Based Approaches • Visibility Culling • Hierarchical Z-Buffer • Hierarchical Occlusion Maps • Prioritized-Layered Projection • Simplification Techniques • LODs / HLODs, • Textured Depth Meshes • Existing Architectures • MMR • Gigawalk • iWalk State of the Art in Massive Model Visualization
SimplificationPolygonal Simplification • Idea: • Simplify small or distant model parts without significant loss in the scene‘s visual appearance • Switch at runtime between different complexity levels • Reduce I/O bandwidth • Improve runtime performance State of the Art in Massive Model Visualization
SimplificationPolygonal Simplification • Classification • Static simplification • Offline computation of discrete versions of each object:Levels-of-Detail (LODs) • Dynamic simplification • Data structures encoding a continuous detail spectrum • View-dependent simplification • Single objects can span multiple simplification levels State of the Art in Massive Model Visualization
SimplificationPolygonal Simplification • Techniques • Sampling • Sample initial model e.g. with points on surface • Adaptive subdivision • Find base mesh approximating initial model and subdivide • Decimation • Remove vertices and retriangulate resulting holes • Vertex-merging • Collapse two or more vertices,remove degenerated triangles • Special case: Edge collapse(merge 2 vertices per step) • Use error metric to decide which vertices to collapse,e.g. Quadratic Error Metrics (QEM) [Garland 97] State of the Art in Massive Model Visualization
SimplificationPolygonal Simplification • Hierarchical Level of Detail (HLOD) [Erikson 01] • Use LODs for each scene graph node • HLODs:Simplification of entirescene graph branches • Higher fidelity thanseparate approximations • Simplify scene graphtraversal State of the Art in Massive Model Visualization
SimplificationImage-Based Methods • Polygonal simplification sometimes difficult • E.g. because of unsuitable scene structure • Image-Based Rendering (IBR) • Image-based entities (impostors) as alternative representation for scene parts • Simple variant: Billboards State of the Art in Massive Model Visualization
SimplificationImage-Based Methods • Textured Depth Meshes (TDM) [Sillion 97] • Simple polygon mesh of rough scene structure • Textured with detailed model images • Better parallax movement • Longer valid when viewpoint changes State of the Art in Massive Model Visualization
Overview • Part I – Rasterization Based Approaches • Visibility Culling • Hierarchical Z-Buffer • Hierarchical Occlusion Maps • Prioritized-Layered Projection • Simplification Techniques • LODs / HLODs, • Textured Depth Meshes • Existing Architectures • MMR • Gigawalk • iWalk State of the Art in Massive Model Visualization
Existing ArchitecturesMMR • MMR [Aliaga 99] • Massive Model Rendering framework • One of first systems capable of interactive display of a12.5 million power plant scene (out-of-core rendering) • Modular System:Incorporates a variety of techniques • Visibility Culling • Mesh simplification • Static LODs • Hierarchical occlusion maps • Textured depth meshes State of the Art in Massive Model Visualization
Existing ArchitecturesMMR • Basic Idea: • Partition scene into viewpoint cells (not automatic) • Associate cull box with each viewpoint-cell • For every observer position inside a viewpoint cell • Clip geometry against cull box • Replace clipped geometry with TDMs State of the Art in Massive Model Visualization
Existing ArchitecturesMMR • Textured depth meshes • Pre-generated images of geometry outside cull box viewed from cell center • Images projected onto simplified depth meshes State of the Art in Massive Model Visualization
Existing ArchitecturesMMR • Run-time pipeline State of the Art in Massive Model Visualization
Existing ArchitecturesMMR • Multiprocessor pipelined implementation • Interframe phase • Cull phase • Render phase • Prefetch phase Only a single rendering pipeline used State of the Art in Massive Model Visualization
Existing ArchitecturesMMR • Results • SGI Onyx with Infinite Reality graphics • Frame rates: 5-15 fps • Only 0.9% of original polygons need to be rendered • However: Popping and distortion when switching cells • Preprocessing time: • 17 hours for cells on selected sample camera paths • 525 hours for complete model (estimated) State of the Art in Massive Model Visualization
Existing ArchitecturesGigawalk • Gigawalk [Baxter 02] • Fully automatic scene organization (BVH) • Hierarchical Z-Buffer • Static LODs / HLODs • Uses two rendering pipelines • Parallel rendering of occluders and visible geometry • Can exploit temporal coherence • Use of visible geometry from a previous frame as occluders State of the Art in Massive Model Visualization
Existing ArchitecturesGigawalk • System architecture • 3 Processes running in parallel • Occluder Rendering (OC) • Scene Traversal, Culling, LOD selection (STC) • Rendering Visible Scene Geometry (RVG) State of the Art in Massive Model Visualization
Existing ArchitecturesGigawalk • Timing relationship • Frame i uses occluders from frame i-2 State of the Art in Massive Model Visualization
Existing ArchitecturesGigawalk • Results • SGI Onyx with Infinite Reality graphics,dual graphics rasterization pipelines • Frame rates: 11-50 fps(tanker model: 82 million triangles) • Preprocessing time: 35 hours (Pentium IV, 2GHz) • However: No out-of-core rendering State of the Art in Massive Model Visualization
Existing ArchitecturesiWalk • iWalk [Correa 03] • Interactive frame rates on a single commodity PC • Prioritized-Layered Projection • Approximate visibility • Budget-based rendering • Optionally conservative variant (cPLP) • Efficient prefetching • Out-of-core rendering State of the Art in Massive Model Visualization
Existing ArchitecturesiWalk • Multi-threaded rendering pipeline (simplified) • PLP used for visibility culling and prefetching State of the Art in Massive Model Visualization
Existing ArchitecturesiWalk • Results • Commodity PC (Pentium IV, 2.8 GHz), 512 MByte RAM • Rendering budget: 280.000 triangles per frame • Average frame rate: 9.3 fps (power plant) • Median accuracy: 99.2% pixels correct • Preprocessing time: 3 minutes State of the Art in Massive Model Visualization