Image-Based Techniques Hierarchical Image Caching Michael Chung.

Slides:



Advertisements
Similar presentations
Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
Advertisements

Computer graphics & visualization Collisions. computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization.
3D Graphics Rendering and Terrain Modeling
David Luebke5/11/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Two Methods for Fast Ray-Cast Ambient Occlusion Samuli Laine and Tero Karras NVIDIA Research.
Occlusion Culling Fall 2003 Ref: GamasutraGamasutra.
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
Hidden Surface Removal Why make the effort?  Realistic models.  Wasted time drawing. OpenGL and HSR  OpenGL does handle HSR using the depth buffer.
Visibility in Computer Graphics Toni Sellarès Unversitat de Girona
CSE 381 – Advanced Game Programming Scene Management
Multi-Layered Impostors for Accelerated Rendering Xavier Decoret, iMAGIS This is joint work with Gernot Schaufler and Julie Dorsey at MIT and François.
Visibility Culling. Back face culling View-frustrum culling Detail culling Occlusion culling.
Visibility Culling using Hierarchical Occlusion Maps Hansong Zhang, Dinesh Manocha, Tom Hudson, Kenneth E. Hoff III Presented by: Chris Wassenius.
Object-Space Visibility Culling Anthony Steed University College London Based upon material presented by Claudio T. Silva at Eurographics 1999 Slides,
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
18.1 Si31_2001 SI31 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Light Maps What We Did Not Cover Learning More...
1 Image-Based Visual Hulls Paper by Wojciech Matusik, Chris Buehler, Ramesh Raskar, Steven J. Gortler and Leonard McMillan [
Tomas Mőller © 2000 Speed-up Techniques for Real-Time Rendering or “What makes your real-time video game fly” Tomas Möller Chalmers University of Technology,
Bounding Volume Hierarchies and Spatial Partitioning Kenneth E. Hoff III COMP-236 lecture Spring 2000.
1 Advanced Scene Management System. 2 A tree-based or graph-based representation is good for 3D data management A tree-based or graph-based representation.
Spatial Data Structure: Quadtree, Octree,and BSP tree Mengxia Zhu Fall 2007.
Collision Detection David Johnson Cs6360 – Virtual Reality.
10/11/2001CS 638, Fall 2001 Today Kd-trees BSP Trees.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Hidden Surface Removal
1 Occlusion Culling ©Yiorgos Chrysanthou, , Anthony Steed, 2004.
Afrigraph 2004 Massive model visualization Tutorial A: Part I Rasterization Based Approaches Andreas Dietrich Computer Graphics Group, Saarland University.
Erdem Alpay Ala Nawaiseh. Why Shadows? Real world has shadows More control of the game’s feel  dramatic effects  spooky effects Without shadows the.
Computer Graphics 2 Lecture x: Acceleration Techniques for Ray-Tracing Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
10/29/02 (c) 2002 University of Wisconsin, CS559 Today Hidden Surface Removal Exact Visibility.
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
CSE 381 – Advanced Game Programming Basic 3D Graphics
The Visibility Problem In many environments, most of the primitives (triangles) are not visible most of the time –Architectural walkthroughs, Urban environments.
Culling Techniques “To cull” means “to select from group” In graphics context: do not process data that will not contribute to the final image The “group”
Graphics Graphics Korea University cgvr.korea.ac.kr Solid Modeling 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphics 2 Lecture 8: Visibility Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
The BSP-tree from Prof. Seth MIT.. Motivation for BSP Trees: The Visibility Problem We have a set of objects (either 2d or 3d) in space. We have.
On a Few Ray Tracing like Algorithms and Structures. -Ravi Prakash Kammaje -Swansea University.
Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova.
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
2 COEN Computer Graphics I Evening’s Goals n Discuss application bottleneck determination n Discuss various optimizations for making programs execute.
Real-time Graphics for VR Chapter 23. What is it about? In this part of the course we will look at how to render images given the constrains of VR: –we.
Saarland University, Germany B-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes Sven Woop Gerd Marmitt Philipp Slusallek.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
CSCE 552 Spring D Models By Jijun Tang. Triangles Fundamental primitive of pipelines  Everything else constructed from them  (except lines and.
03/31/03© 2003 University of Wisconsin Last Time Image-Based Rendering for Architecture and Faces.
Coherent Hierarchical Culling: Hardware Occlusion Queries Made Useful Jiri Bittner 1, Michael Wimmer 1, Harald Piringer 2, Werner Purgathofer 1 1 Vienna.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 7. Speed-up Techniques Presented by SooKyun Kim.
Where We Stand At this point we know how to: –Convert points from local to window coordinates –Clip polygons and lines to the view volume –Determine which.
3/16/04James R. McGirr1 Interactive Rendering of Large Volume Data Sets Written By : Stefan Guthe Michael Wand Julius Gonser Wolfgang Straβer University.
Image-based Rendering Ref: RTRv2. 2 Introduction Sprite, billboard, overview.
LOD Unresolved Problems The LOD algorithms discussed previously do not perform well with large amounts of visible objects Consider a large number of tress.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
Rendering Large Models (in real time)
01/28/09Dinesh Manocha, COMP770 Visibility Computations Visible Surface Determination Visibility Culling.
Hierarchical Occlusion Map Zhang et al SIGGRAPH 98.
Computer Graphics Inf4/MSc 1 Computer Graphics Lecture 5 Hidden Surface Removal and Rasterization Taku Komura.
David Luebke 3/5/2016 Advanced Computer Graphics Lecture 4: Faster Ray Tracing David Luebke
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
CHC ++: Coherent Hierarchical Culling Revisited Oliver Mattausch, Jiří Bittner, Michael Wimmer Institute of Computer Graphics and Algorithms Vienna University.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Bounding Volume Hierarchies and Spatial Partitioning
Real-time Walkthrough of Virtual Space using Environment Map
Bounding Volume Hierarchies and Spatial Partitioning
3D Object Representations
CSCE 441: Computer Graphics Hidden Surface Removal
CS 551 / 645: Introductory Computer Graphics
Presentation transcript:

Image-Based Techniques Hierarchical Image Caching Michael Chung

Papers Hierarchical Image Caching for Accelerated Walkthroughs of Complex Environments –Jonathan Shade, Dani Lischinski, David H. Salesin, Tony DeRose, John Snyder (SIGGRAPH, 1996) A Three Dimensional Image Cache for Virtual Reality –Gernot Schaufler, Wolfgang Sturzlinger (EUROGRAPHICS, 1996)

Motivation Unable to render large and complex environments at a sufficiently high frame rate. Would be nice to be able to. (ex: crowded forests, cities…)

Insights Dynamically Generated Impostors (Schaufler, 1995) –Path coherence between frames –No need to render every frame from scratch

Impostor – What is it? An impostor is a billboard that mimics and replaces 3d geometry in a scene.

Impostor – Why use it? Fast to render Reusable for objects that are coherent between frames –Especially distant objects Essentially, a high quality image at the cost of a very low LOD model (a quad) –But the impostor is short-lived.

Impostor Generation Face viewpoint towards center of bounding box Project bounding box into screen space Generate tight rectangle Reverse project rectangle into world space Render impostor texture onto rectangle

Example: Virtual Dublin Project Geopostors: A Real-Time Geometry / Impostor Crowd Rendering System Simon Dobbyn, John Hamill, Keith O’Conor, Carol O’Sullivan

Insights Dynamically Generated Impostors (Schaufler, 1995) –Path coherence between frames –No need to render every frame from scratch

Insights Dynamically Generated Impostors (Schaufler, 1995) –Path coherence between frames –No need to render every frame from scratch New insight: –Further optimize rendering using a hierarchical cache of impostors Creating impostors out of smaller impostors saves time over rendering actual geometry If possible, draw fewer impostors per frame

Proposed Contributions Shade, Lischinski, Salesin, DeRose, Snyder “New method for accelerating walkthroughs of geometrically complex and largely unoccluded static scenes by hierarchically caching images of scene portions.” “New simple error metric that provides automatic quality control.”

Proposed Contributions Schaufler, Sturzlinger “New approach to software accelerated rendering which improves and generalizes the concept of impostors” –Handles intersecting objects –Handles indoor as well as outdoor scenes –Deals with primitives, does not rely on organization of scene into object groupings

Proposed Contributions Schaufler, Sturzlinger Indoor intersecting objects problem:

Proposed Contributions Schaufler, Sturzlinger With the 3d image cache:

Method Overview Partition scene into a tree (BSP-tree or k-d-tree) For each frame: –First traversal of tree Cull nodes outside of the view frustum (optional) Update the cached impostors of nodes –Second traversal of tree Render scene into framebuffer, back to front

Algorithm Details Shade, Lischinski, Salesin, DeRose, Snyder Partition scene into BSP-tree –All splitting planes perpendicular to x and z axes. –Place splitting planes in the “best” gap found. Compute a cost for each gap that is a function of: –the number of its active objects –and, the ratio of the number of primitives on either side of the gap –Choose best gap such that the longest side of the bounding box is split.

Algorithm Details Schaufler, Sturzlinger Partition scene into k-d-tree –Recursively subdivide along longest side. –If primitive intersects more than one bounding box, store primitive in all intersected bounding boxes.

Updating Image Caches Shade, Lischinski, Salesin, DeRose, Snyder UpdateCaches(node, viewpoint) if node is outside the view frustum then node.status  CULL else if node.cache is valid for viewpoint then node.status  DRAW CACHE else if node is a leaf then UpdateNode(node, viewpoint) else UpdateCaches(node.back, viewpoint) UpdateCaches(node.front, viewpoint) UpdateNode(node, viewpoint)

Updating Image Caches A Visual Example

Updating Image Caches Shade, Lischinski, Salesin, DeRose, Snyder UpdateCaches(node, viewpoint) if node is outside the view frustum then node.status  CULL else if node.cache is valid for viewpoint then  DETERMINE VALIDITY? node.status  DRAW CACHE else if node is a leaf then UpdateNode(node, viewpoint) else UpdateCaches(node.back, viewpoint) UpdateCaches(node.front, viewpoint) UpdateNode(node, viewpoint)

Determining Impostor Validity Shade, Lischinski, Salesin, DeRose, Snyder Error metric In practice, only consider the eight corners of a node’s bounding box when computing error.

Determining Impostor Validity Error threshold Impostor can be used if… – –AND, imposter is not too close to the viewpoint Too close if tex >= screen (Schaufler, Sturzlinger) OR, too close if viewpoint is in the same node (Shade et al)

Updating Image Caches Shade, Lischinski, Salesin, DeRose, Snyder UpdateCaches(node, viewpoint) if node is outside the view frustum then node.status  CULL else if node.cache is valid for viewpoint then node.status  DRAW CACHE else if node is a leaf then UpdateNode(node, viewpoint) else UpdateCaches(node.back, viewpoint) UpdateCaches(node.front, viewpoint) UpdateNode(node, viewpoint)  CACHE NEW IMAGE OR NOT?

Updating Nodes Shade, Lischinski, Salesin, DeRose, Snyder UpdateNode(node, viewpoint) if viewpoint is inside node then if node is a leaf then node.status  DRAW GEOMETRY else node.status  RECURSE return k  EstimateCacheLifeSpan(node, viewpoint) amortizedCost  (cost to create cache) / k + (cost to draw cache) if (amortizedCost < (cost to draw contents) then CreateCache(node, viewpoint) node.status  DRAW CACHE node.drawingCost  (cost to draw cache) else if node is a leaf then node.status  DRAW GEOMETRY node.drawingCost  (cost to draw geometry) else node.status  RECURSE node.drawingCost  node.back.drawingCost + node.front.drawingCost

Updating Nodes Shade, Lischinski, Salesin, DeRose, Snyder UpdateNode(node, viewpoint) if viewpoint is inside node then if node is a leaf then node.status  DRAW GEOMETRY else node.status  RECURSE return k  EstimateCacheLifeSpan(node, viewpoint)  HOW TO ESTIMATE LIFE SPAN? amortizedCost  (cost to create cache) / k + (cost to draw cache) if (amortizedCost < (cost to draw contents) then CreateCache(node, viewpoint) node.status  DRAW CACHE node.drawingCost  (cost to draw cache) else if node is a leaf then node.status  DRAW GEOMETRY node.drawingCost  (cost to draw geometry) else node.status  RECURSE node.drawingCost  node.back.drawingCost + node.front.drawingCost

Estimating Impostor Life Span Shade, Lischinski, Salesin, DeRose, Snyder Approximate the safety zone around current viewpoint.

Estimating Impostor Life Span Shade, Lischinski, Salesin, DeRose, Snyder Approximating safety zone for a leaf node –Evaluate d for each corner of node’s bounding volume. –Let r be the smallest such d. –Set the safety zone to be the axis-aligned cube inscribed inside a sphere of radius r around current viewpoint.

Estimating Impostor Life Span Shade, Lischinski, Salesin, DeRose, Snyder Approximating safety zone for an interior node. –Compute safety zone Z using the bounding box of the node. –Intersect Z with the safety zones of the node’s children

Main Algorithm Differences Shade et al. –View frustum culling –Cost-benefit analysis for cache update Schaufler, Sturzlinger –No view frustum culling –No cost-benefit analysis for cache update Replace invalid impostors with new ones no matter what

Questions so far? Method Overview Partition scene into a tree (BSP-tree or k-d-tree) For each frame: –First traversal of tree Cull nodes outside of the view frustum (optional) Update the cached impostors of visible nodes –Second traversal of tree Render scene into framebuffer, back to front

Tests and Analysis of Results Shade, Lischinski, Salesin, DeRose, Snyder Silicon Graphics Indigo2 workstation –250 MHz R4400 processor –320 MB RAM –Maximum Impact graphics board with 4 MB texture memory Outdoor Scene (island forest) –1117 willow trees –40,599,982 triangles

Tests and Analysis of Results Shade, Lischinski, Salesin, DeRose, Snyder

BSP-tree Preprocessing –46 seconds construction time –No splitting of trees, only terrain is split –13 levels, 1072 leaf nodes –150 MB storage space Walkthroughs –640 x 480 frame resolution –2 pixel error threshold

Tests and Analysis of Results Shade, Lischinski, Salesin, DeRose, Snyder Actual geometry Image cache 2 pixel error threshold

Tests and Analysis of Results Shade, Lischinski, Salesin, DeRose, Snyder Actual geometry Image cache 8 pixel error threshold

Tests and Analysis of Results Shade, Lischinski, Salesin, DeRose, Snyder Actual geometry Image cache 2 pixel error threshold

Tests and Analysis of Results Shade, Lischinski, Salesin, DeRose, Snyder Actual geometry Image cache 8 pixel error threshold

Tests and Analysis of Results Shade, Lischinski, Salesin, DeRose, Snyder

Tests and Analysis of Results Schaufler, Sturzlinger INDIGO R3000 –39k triangles per second –No hardware support for texture mapping One cache update visualization Two performance tests

Tests and Analysis of Results Schaufler, Sturzlinger Cache update visualization Diagonal walkthrough of some complex scene k-d-tree preprocessing –341 bounding boxes 256 x 256 maximum texture resolution Impostor updates for every 6 th frame of 120 frames shown…

Tests and Analysis of Results Schaufler, Sturzlinger Cache update visualization

Tests and Analysis of Results Schaufler, Sturzlinger

Two performance tests –Make up for hardware insufficiencies 1 st test: Render at a small screen resolution 2 nd test: Replace each textured polygon with two gouraud shaded polygons –Sideward translation in front of forest (100 frames) –Zoom from one corner of forest towards its center (100 frames) –1 pixel threshold

Tests and Analysis of Results Schaufler, Sturzlinger Procedurally generated forest scene –100 trees –Approximately polygons k-d-tree preprocessing –Max depth of 4 –585 bounding boxes

Tests and Analysis of Results Schaufler, Sturzlinger

Comments on Papers Shade et al. –Relatively thorough explanation of proposed method –No justification of formulas for calculating cached image life expectancy. Schaufler, Sturzlinger –Insufficient explanation of testing procedure –Confusing graphs

Summary

Hierarchical image caching –Impostors are cheap mimics of complex 3d geometry. Take advantage of path coherence –Caching impostors hierarchically further saves rendering time Allows generation of impostors from children impostors –Scene partitions are disjoint and does not rely on object groupings Able to handle intersecting objects Automatic cache update control using error metric based on angular discrepancy Improved frame rates for large, complex static scenes Following work impacted by the insight that large and complex geometry can be efficiently rendered by hierarchically caching cheap representations

Summary Hierarchical image caching –Impostors are cheap mimics of complex 3d geometry. Take advantage of path coherence –Caching impostors hierarchically further saves rendering time Allows generation of impostors from children impostors –Scene partitions are disjoint and does not rely on object groupings Able to handle intersecting objects Automatic cache update control using error metric based on angular discrepancy Improved frame rates for large, complex static scenes Following work impacted by the insight that large and complex geometry can be efficiently rendered by hierarchically caching cheap representations

Summary Hierarchical image caching –Impostors are cheap mimics of complex 3d geometry. Take advantage of path coherence –Caching impostors hierarchically further saves rendering time Allows generation of impostors from children impostors –Scene partitions are disjoint and does not rely on object groupings Able to handle intersecting objects Automatic cache update control using error metric based on angular discrepancy Improved frame rates for large, complex static scenes Following work impacted by the insight that large and complex geometry can be efficiently rendered by hierarchically caching cheap representations

Summary Hierarchical image caching –Impostors are cheap mimics of complex 3d geometry. Take advantage of path coherence –Caching impostors hierarchically further saves rendering time Allows generation of impostors from children impostors –Scene partitions are disjoint and does not rely on object groupings Able to handle intersecting objects Automatic cache update control using error metric based on angular discrepancy Improved frame rates for large, complex static scenes Following work impacted by the insight that large and complex geometry can be efficiently rendered by hierarchically caching cheap representations

Summary Hierarchical image caching –Impostors are cheap mimics of complex 3d geometry. Take advantage of path coherence –Caching impostors hierarchically further saves rendering time Allows generation of impostors from children impostors –Scene partitions are disjoint and does not rely on object groupings Able to handle intersecting objects Automatic cache update control using error metric based on angular discrepancy Improved frame rates for large, complex static scenes Following work impacted by the insight that large and complex geometry can be efficiently rendered by hierarchically caching cheap representations

Summary Hierarchical image caching –Impostors are cheap mimics of complex 3d geometry. Take advantage of path coherence –Caching impostors hierarchically further saves rendering time Allows generation of impostors from children impostors –Scene partitions are disjoint and does not rely on object groupings Able to handle intersecting objects Automatic cache update control using error metric based on angular discrepancy Improved frame rates for large, complex static scenes Following work impacted by the insight that large and complex geometry can be efficiently rendered by hierarchically caching cheap representations

Summary Hierarchical image caching –Impostors are cheap mimics of complex 3d geometry. Take advantage of path coherence –Caching impostors hierarchically further saves rendering time Allows generation of impostors from children impostors –Scene partitions are disjoint and does not rely on object groupings Able to handle intersecting objects Automatic cache update control using error metric based on angular discrepancy Improved frame rates for large, complex static scenes Following work impacted by the insight that large and complex geometry can be efficiently rendered by hierarchically caching cheap representations

Questions?