David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke

Slides:



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

Collisions and Intersections When objects move, test for collision. When projecting surfaces, check for intersections. (Many slides adapted from Amitabh.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Visible Surface Determination.
Ray Tracing CMSC 635. Basic idea How many intersections?  Pixels  ~10 3 to ~10 7  Rays per Pixel  1 to ~10  Primitives  ~10 to ~10 7  Every ray.
03/12/02 (c) 2002 University of Wisconsin, CS559 Last Time Some Visibility (Hidden Surface Removal) algorithms –Painter’s Draw in some order Things drawn.
David Luebke5/11/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
CS 551 / 645: Introductory Computer Graphics Visible Surface Determination.
Visibility in Computer Graphics Toni Sellarès Unversitat de Girona
Visibility Culling. Back face culling View-frustrum culling Detail culling Occlusion culling.
Visibility Culling Back face culling View-frustrum culling Detail culling Occlusion culling.
CS 445 / 645: Introductory Computer Graphics
David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Vertices and Fragments I CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing
RAY TRACING.
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,
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Visibility II Week 7,
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Spatial Data Structure: Quadtree, Octree,and BSP tree Mengxia Zhu Fall 2007.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Implementation I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Visibility: Z Buffering Week 10, Mon 3 Nov 2003.
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.
David Luebke9/7/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
COMP 175: Computer Graphics March 24, 2015
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”
Visibility Culling David Luebke Computer Science Department University of Virginia
David Luebke10/9/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
CS 480/680 Computer Graphics Shading in OpenGL Dr. Frederick C Harris, Jr. Fall 2013.
Computer Graphics 2 Lecture 8: Visibility Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova.
Visible-Surface Detection Jehee Lee Seoul National University.
Visibility Culling II: Beyond Cells & Portals David Luebke Computer Science Department University of Virginia
Visibility CS 446: Real-Time Rendering & Game Technology David Luebke University of Virginia.
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.
CAP4730: Computational Structures in Computer Graphics
3/23/04© University of Wisconsin, CS559 Spring 2004 Last Time Antialiasing –Area-weighted sampling Visibility –Painters algorithm –Depth buffer (Z-buffer)
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Binary Space Partitioning Trees Ray Casting Depth Buffering
Implementation II.
Computer Graphics Zhen Jiang West Chester University.
10/07/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Spatial data structures.
David Luebke 1 12/8/2015 Visibility CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Recap: General Occlusion Culling l When cells and portals don’t work… –Trees in a forest –A crowded train station l Need general occlusion culling algorithms:
Ray Tracing II. HW1 Part A due October 10 Camera module Object module –Read from a file –Sphere and Light only Ray tracer module: –No shading. No reflection.
Visibility II CS 446: Real-Time Rendering & Game Technology
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.
Maths & Technologies for Games Spatial Partitioning 2
Computer Graphics I, Fall 2010 Implementation II.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
1Computer Graphics Implementation 1 Lecture 15 John Shearer Culture Lab – space 2
DPL2/10/2016 CS 551/651: Final Review David Luebke
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
01/28/09Dinesh Manocha, COMP770 Visibility Computations Visible Surface Determination Visibility Culling.
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
RENDERING : Global Illumination
David Luebke3/12/2016 Advanced Computer Graphics Lecture 3: More Ray Tracing David Luebke
Occlusion Culling David Luebke University of Virginia.
CS 445: Introduction to Computer Graphics David Luebke University of Virginia Visibility Calculations and Occlusion Culling.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics Shading in OpenGL
CSCE 441: Computer Graphics Hidden Surface Removal
Visibility: Z Buffering Week 10, Mon 3 Nov 2003
Introduction to Computer Graphics with WebGL
Presentation transcript:

David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke

David Luebke11/26/2015 Recap: Z-Buffer Pros l Simple!!! l Easy to implement in hardware l Polygons can be processed in arbitrary order l Easily handles polygon interpenetration l Enables deferred shading –Rasterize shading parameters (e.g., surface normal) and only shade final visible fragments –When does this help?

David Luebke11/26/2015 Recap: Z-Buffer Cons l Lots of memory (e.g. 1280x1024x32 bits) l Read-Modify-Write in inner loop requires fast memory l Hard to do analytic antialiasing l Hard to simulate translucent polygons l Precision issues (scintillating, worse with perspective projection)

David Luebke11/26/2015 Ray Tracing l Idea: –trace a ray from the eyepoint through the center of each pixel –Color pixel according to the first object the ray hits –Simple! No need for: n Perspective projection matrices n Clipping n Scan conversion of polygons

David Luebke11/26/2015 Ray Tracing l An example: ScreenEyepointScene

David Luebke11/26/2015 Ray Tracing l An example: ScreenEyepointScene

David Luebke11/26/2015 Ray Tracing l Two flavors of the algorithm: –Ray casting just finds visible surfaces –Recursive ray tracing traces additional rays from those surfaces for sophisticated shading n Shadows n Reflection n Refraction

David Luebke11/26/2015 Ray Tracing: The Catch l Ray tracing is a simple, powerful way to determine visibility & shading l So why don’t we always use it?

David Luebke11/26/2015 Ray Tracing: The Catch l Ray tracing is a simple, powerful way to determine visibility & shading l So why don’t we always use it? l Too slow! –Complexity proportional to # of pixels –Typical screen: ~1,000,000 pixels –Typical scene:« 1,000,000 polygons

David Luebke11/26/2015 Visibility Algorithms l The Z-buffer is an image-space algorithm –Takes place at the end of the pipeline, in screen- space coordinates l BSP Trees are an object-space algorithm –Takes place in world-space coordinates l Warnock’s algorithm is a hybrid –Uses both screen-space and object-space information l How would you classify ray casting?

David Luebke11/26/2015 Visibility Algorithms l The 70’s were the decade of analytic object- space algorithms l In the mid-80’s, memory got cheap enough that Z-buffers became the practical choice l Then history repeated itself… l Next up: conservative visibility algorithms for reducing load from the front end of the rendering pipeline

David Luebke11/26/2015 Conservative Visibility Agorithms l View-frustum culling –Organize primitives into clumps with a simple bounding volume –Before rendering the primitives in a clump, test its bounding volume against the view frustum n If the clump is entirely outside the view frustum, don’t render any of the primitives n If the clump intersects the view frustum, render normally n If the clump is entirely within the view frustum, can render with clipping disabled

David Luebke11/26/2015 Efficient View-Frustum Culling l How big should the clumps be? –Choose minimum size so: cost testing bounding volume << cost clipping primitive –Organize bounding volumes into a hierarchy for more efficient testing n A general strategy known as hierarchical bounding volumes

David Luebke11/26/2015 Efficient View-Frustum Culling l What shape should bounding volumes be? –Spheres and axis-aligned bounding boxes are simple to calculate and cheap to test –Oriented bounding boxes converge asymptotically faster in theory –Lots of other volumes have been proposed, but most people still use spheres and AABBs.

David Luebke11/26/2015 Efficient View-Frustum Culling l Where in the pipeline should view-frustum culling be performed? –As early as possible (world coordinates)

David Luebke11/26/2015 Cells & Portals l Goal: walk through architectural models (buildings, cities, catacombs…) l These divide naturally into cells –Rooms, alcoves, corridors… l Transparent portals connect cells –Doorways, entrances, windows… l Key observation: cells only see each other through portals!

David Luebke11/26/2015 Cells & Portals l Idea: –Create an adjacency graph of cells –Starting with cell containing eyepoint, traverse graph, rendering visible cells –A cell is only visible if it can be seen through a sequence of portals n Need a line of sight n So cell visibility reduces to testing portal sequences…

David Luebke11/26/2015 Cells & Portals A D H F CB E G H BCDFG EA

David Luebke11/26/2015 Cells & Portals A D H F CB E G H BCDFG EA

David Luebke11/26/2015 Cells & Portals A D H F CB E G H BCDFG EA

David Luebke11/26/2015 Cells & Portals A D H F CB E G H BCDFG EA

David Luebke11/26/2015 Cells & Portals A D H F CB E G H BCDFG EA

David Luebke11/26/2015 Cells & Portals l Can even figure out which cells a particular cell will never see: Ex: H will never see F; B can only see H l This can further speed up culling A D H F CB E G

David Luebke11/26/2015 Overview l Recap: visible surfaces; Z-buffer l Other exact algorithms –BSP trees –Ray casting l Conservative algorithms –View-frustum culling –Cells & portals –Occlusion culling

David Luebke11/26/2015 Occlusion Culling l When cells and portals don’t work… –Trees in a forest –A crowded train station l Need general occlusion culling algs: –Dynamic scenes, aggregate occluders –Open problem, little work so far: n Hierarchical Z-Buffer (Greene 93) n Hierarchical Occlusion Maps (Zhang 97)