A lion in the desert How do you find a lion in the desert? How about when you have a predicate that tells you if the lion is in front or behind a separating.

Slides:



Advertisements
Similar presentations
Computer Graphics - Rasterization -
Advertisements

Visible-Surface Detection(identification)
1 Binary Space Partition Trees ©Anthony Steed, Yiorgos Chrysanthou
GR2 Advanced Computer Graphics AGR
Collisions and Intersections When objects move, test for collision. When projecting surfaces, check for intersections. (Many slides adapted from Amitabh.

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.
Korea Univ. Graphics Lab. 3D Game Engine Design Chapter 12. Spatial Sorting Chung Ji Hye
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
BSP Trees Binary space partitioning trees. Used to store a collection of objects in n- dimensional space. Tree recursively divides n-dimensional space.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Clipping II, Hidden Surfaces.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
1 Dr. Scott Schaefer Hidden Surfaces. 2/62 Hidden Surfaces.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
Hidden Surface Elimination Wen-Chieh (Steve) Lin Institute of Multimedia Engineering I-Chen Lin’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals.
1 CSCE 441: Computer Graphics Hidden Surface Removal (Cont.) Jinxiang Chai.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
1 Clipping and Hidden Surfaces CS-184: Computer Graphics Prof. James O’Brien.
A lion in the desert How do you find a lion in the desert? How about when you have a predicate that tells you if the lion is in front or behind a separating.
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.
Estruturas de Dados Espaciais MC-930 MO-603. Speeding Up Ray Tracing.
10/11/2001CS 638, Fall 2001 Today Kd-trees BSP Trees.
10/02/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Octrees.
Hidden Surface Removal
Visible Surface Determination
BSP Trees, Quadtrees & Octrees Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, January 28, 2004.
Graphics Pipeline Hidden Surfaces CMSC 435/634. Visibility We can convert simple primitives to pixels Which primitives (or parts of primitives) should.
Graphics Pipeline Hidden Surface CMSC 435/634. Visibility We can convert simple primitives to pixels/fragments How do we know which primitives (or which.
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.
10/09/2001CS 638, Fall 2001 Today Spatial Data Structures –Why care? –Octrees/Quadtrees –Kd-trees.
The Visibility Problem In many environments, most of the primitives (triangles) are not visible most of the time –Architectural walkthroughs, Urban environments.
Graphics Graphics Korea University cgvr.korea.ac.kr Solid Modeling 고려대학교 컴퓨터 그래픽스 연구실.
Implementing Scene Graphs, CSG Trees Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, January 26, 2004.
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.
Visible-Surface Detection Jehee Lee Seoul National University.
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
CS-378: Game Technology Lecture #2.2: Clipping and Hidden Surfaces Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney,
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.
CS 376 Introduction to Computer Graphics 03 / 21 / 2007 Instructor: Michael Eckmann.
Implementation II.
College of Computer and Information Science, Northeastern UniversityJanuary 6, CS4300 Computer Graphics Prof. Harriet Fell Fall 2011 Lecture 22 –
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
Presented by: Bhavna Agarwal. Given a bunch of 3D objects predefined in x,y,z; order them in geometry.
Computer Graphics I, Fall 2010 Implementation II.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
Visibility Determination – List Priority Methods Chapter 11.
Ray Tracing Acceleration (3)
Hidden Surface Removal. 2 Goal: Determine which surfaces are visible and which are not. Z-Buffer is just one of many hidden surface removal algorithms.
CS552: Computer Graphics Lecture 28: Solid Modeling.

Computer Graphics Implementation II
BSP Trees Binary space partitioning trees.
Hidden Surfaces Dr. Scott Schaefer.
Modeliranje kompleksnih modelov
Graphics Pipeline Hidden Surfaces
CSCE 441: Computer Graphics Hidden Surface Removal
Implementation II Ed Angel Professor Emeritus of Computer Science
Introduction to Computer Graphics with WebGL
Hidden Surface Removal
Modeliranje kompleksnih modelov
Implementation II Ed Angel Professor Emeritus of Computer Science
Presentation transcript:

a lion in the desert How do you find a lion in the desert? How about when you have a predicate that tells you if the lion is in front or behind a separating plane?

a lion in the desert Cut the desert in two and ask in which part is the lion. Repeat the process for the part that the lion is in.

BSP Trees Binary Spatial Partitioning (BSP) means: –Partition (or split) a space (like the desert) into Binary (two) parts using a separating plane. –Repeat the process for both resulting subspaces and you will get a BSP tree.

What we see in this example is a simple model with four polygons. We will choose the splitting planes so that they lay on a polygon of the model.

Creating the tree We choose a splitting plane a split the space in two. Chosen Splitting Plane Root Node Front Node Back Node Associated Splitting Plane

Creating the tree Front Node Back Node Chosen Splitting Plane Associated Splitting Plane

Creating the tree Chosen Splitting Plane

Creating the tree Chosen Splitting Plane

Creating the tree The leaves of the tree are convex regions.

Traversing the Tree We want to render the scene from this point of view. In what order should we render the regions?

Traversing the Tree Test against the splitting plane Traverse the front subtree before the back subtree Rendering order: Test against the splitting plane

Creating the tree Test against the splitting plane Traverse the back subtree before the front subtree Rendering order: Test against the splitting plane

Creating the tree Rendering order: Traverse the front subtree before the back subtree Test against the splitting plane

Creating the tree Rendering order: Test against the splitting plane Traverse the back subtree before the front subtree

Creating the tree Rendering order: Test against the splitting plane Traverse the back subtree before the front subtree

Convex Cells The cells can be ordered back to front, or front to back.

F2B Order

Hidden Surface Removal Display: –Traverse the BSP tree back to front, drawing polygons in the order they are encountered in the traversal. Construct a BSP tree: –Pick a polygon, let its supporting plane be the root of the tree. –Create two lists of polygons: these in front, and those behind (splitting polygons as necessary). –Recurse on the two lists to create the two sub-trees.

BSP Construction

BSP Trees BSP-Trees are view-independent A good splitting plane minimize the number of polygon intersections, and aims at a balanced tree. How to choose the order of splitting planes during construction?

Point Location Given p, in which cell it resides?

Ray Traversal Given R, which cells, and in which order it traverses?