CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Space Partitions.

Slides:



Advertisements
Similar presentations
Collisions and Intersections When objects move, test for collision. When projecting surfaces, check for intersections. (Many slides adapted from Amitabh.
Advertisements


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
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
Visibility in Computer Graphics Toni Sellarès Unversitat de Girona
Computer Graphics Visible Surface Determination. Goal of Visible Surface Determination To draw only the surfaces (triangles) that are visible, given a.
Korea Univ. Graphics Lab. 3D Game Engine Design Chapter 12. Spatial Sorting Chung Ji Hye
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Texture Mapping II April 10, 2003.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Object-Order vs. Screen-Order Rendering April 24, 2003.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
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.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Texture Mapping.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 The Mystic Z Values.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Acceleration of Rendering.
UNC Chapel Hill M. C. Lin Overview of Last Lecture About Final Course Project –presentation, demo, write-up More geometric data structures –Binary Space.
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.
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.
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
Ray Tracing II A More Practical Version. A QUICK REVIEW.
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.
Managing Your Objects Paul Taylor 2009 Assignment Due Fri 5/6/2009.
10/09/2001CS 638, Fall 2001 Today Spatial Data Structures –Why care? –Octrees/Quadtrees –Kd-trees.
1 Speeding Up Ray Tracing Images from Virtual Light Field Project ©Slides Anthony Steed 1999 & Mel Slater 2004.
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.
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
CS-378: Game Technology Lecture #10: Spatial Data Structures Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran.
Using BSP for CD Ref: BSP in deBerg et al ’ s book (url)url.
2 COEN Computer Graphics I Evening’s Goals n Discuss application bottleneck determination n Discuss various optimizations for making programs execute.
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)
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
CS 325 Introduction to Computer Graphics 03 / 22 / 2010 Instructor: Michael Eckmann.
Implementation II.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
CSCE 552 Spring D Models By Jijun Tang. Triangles Fundamental primitive of pipelines  Everything else constructed from them  (except lines and.
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.
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.
Honours Graphics 2008 Session 5. Today’s focus Rasterization Visibility determination Coarse / fine visibility determination.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
01/28/09Dinesh Manocha, COMP770 Visibility Computations Visible Surface Determination Visibility Culling.
BSP Tree Supplement Jyun-Ming Chen. Fall Kd-Tree and BSP tree kd-tree is a special kind of bsp tree.
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”
Visibility Determination – List Priority Methods Chapter 11.
Ray Tracing Acceleration (3)

Bounding Volume Hierarchies and Spatial Partitioning
Bounding Volume Hierarchies and Spatial Partitioning
Modeliranje kompleksnih modelov
CS679 - Fall Copyright Univ. of Wisconsin
Modeliranje kompleksnih modelov
Lecture 31: Visible Surface Detection
Presentation transcript:

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Space Partitions

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Today’s Short Film Arnold

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Announcement Proxy Settings for accessing SIGGRAPH papers online. Two paper presentations each on March 18 & 25. –3/18: Portal paper and BSP paper. –Read the papers before class. Volunteers wanted for paper presentations on April 8

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Common Operations in 3D Line/object intersection –Given a ray or line, which object will it intersect? View frustum culling Collision detection

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Sorting/Indexing in 3D Sequential search is too slow for large models. How about storing them in a 3D array? –Size will be overwhelming Think “hierarchy”

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Octree Divide the space in halves in X/Y/Z. –Always split in the middle. –You may also consider them as splitting in X, then in Y, then in Z. If too many objects are in a partition, divide them again (recursively).

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 K-D Tree More flexible than octree: –Not always splitted in the middle. –Split in X, then in Y, then in Z, or any order.

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Kd-tree Example Figure Source: CS638 slides by Stephen Chenney, University of Wisconsin – Madison,

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 BSP Trees From the paper by Fuchs et al, “On visible surface generation by a priori tree structures” SIGGRAPH 80.On visible surface generation by a priori tree structures Binary Space Partition trees –A sequence of cuts that divide a region of space into two Cutting planes can be of any orientation

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Drawing Order from BSP Trees BSP tress can be used to order polygons from back to front, or visa-versa –Descend tree with viewpoint –Things on the same side of a splitting plane as the viewpoint are always in front of things on the far side Can draw from back to front –Gives the correct order for rendering transparent objects with a z-buffer, and by far the best way to do it Can draw front to back too.

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 BSP Example BAout8 D 6 C A B C D Figure Source: CS638 slides by Stephen Chenney, University of Wisconsin – Madison,

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 OBB Tree OBB stands for Oriented Bounding Box. OBB is a rectangular bounding box at an arbitrary orientation. Asymptotically faster for close proximity situations.

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Off Topics…

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Mouse Interaction in Assignment 1 You may write your own like this: x -= mouse_ref_x; y -= mouse_ref_y; xf = (float) x/width; yf = (float) y/height; angle = 90* xf; M = rotation3D(axis_Y, angle); angle = 90* yf; M = rotation3D(axis_X, angle) * M;

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Or You May Use GLH So you don’t have to reinvent the wheel. OpenGL Helper Library Used in some NVIDIA SDK Demos.

CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Example Code #include glut_simple_mouse_interactor camera, object, *current_interactor; current_interactor = &camera; glut_add_interactor( current_interactor);