Modeliranje kompleksnih modelov

Slides:



Advertisements
Similar presentations
Visible-Surface Detection(identification)
Advertisements

GR2 Advanced Computer Graphics AGR
Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
Collisions and Intersections When objects move, test for collision. When projecting surfaces, check for intersections. (Many slides adapted from Amitabh.

Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
Computer graphics & visualization Collisions. computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization.
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.
CSE 381 – Advanced Game Programming Scene Management
Visibility Culling. Back face culling View-frustrum culling Detail culling Occlusion culling.
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.
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
1 Dr. Scott Schaefer Hidden Surfaces. 2/62 Hidden Surfaces.
Ray Tracing Acceleration Structures Solomon Boulos 4/16/2004.
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.
Advanced Data Structures for Games and Graphics Lecture 4
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.
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.
November 6, /37 cs123 INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © Acceleration Data Structures CS123.
10/11/2001CS 638, Fall 2001 Today Kd-trees BSP Trees.
10/02/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Octrees.
BSP Trees, Quadtrees & Octrees Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, January 28, 2004.
Computer Graphics 2 Lecture x: Acceleration Techniques for Ray-Tracing Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
CS 450: COMPUTER GRAPHICS VISIBLE SURFACE DETECTION SPRING 2015 DR. MICHAEL J. REALE.
10/09/2001CS 638, Fall 2001 Today Spatial Data Structures –Why care? –Octrees/Quadtrees –Kd-trees.
Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova.
Visible-Surface Detection Jehee Lee Seoul National University.
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.
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
Using BSP for CD Ref: BSP in deBerg et al ’ s book (url)url.
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
1 Visiblity: Culling and Clipping Computer Graphics COMP 770 (236) Spring 2009 January 21 & 26: 2009.
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.
Maths & Technologies for Games Spatial Partitioning 2
Advanced topics Advanced Multimedia Technology: Computer Graphics Yung-Yu Chuang 2006/01/04 with slides by Brian Curless, Zoran Popovic, Mario Costa Sousa.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
February 17, 2005Lecture 6: Point Location Point Location (most slides by Sergi Elizalde and David Pritchard)
Advanced Computer Graphics Spring 2009 K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology.
Ray Tracing Optimizations
Ray Tracing Acceleration (5). Ray Tracing Acceleration Techniques Too Slow! Uniform grids Spatial hierarchies K-D Octtree BSP Hierarchical grids Hierarchical.
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
3D Object Representations 2009, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
Ray Tracing Acceleration (3)
Hierarchical Data Structure in Game Programming Yanci Zhang Game Programming Practice.
CS552: Computer Graphics Lecture 28: Solid Modeling.

Computer Graphics Implementation II
Bounding Volume Hierarchies and Spatial Partitioning
Collision Detection Spring 2004.
Bounding Volume Hierarchies and Spatial Partitioning
Deformable Collision Detection
Hidden Surfaces Dr. Scott Schaefer.
Modeliranje kompleksnih modelov
Real-Time Ray Tracing Stefan Popov.
3D Object Representations
CSCE 441: Computer Graphics Hidden Surface Removal
Implementation II Ed Angel Professor Emeritus of Computer Science
Quadtrees 1.
CS679 - Fall Copyright Univ. of Wisconsin
Introduction to Computer Graphics with WebGL
Collision Detection.
Deformable Collision Detection
BVH Student: Jack Chang.
An Adaptive Octree for Ray Tracing by
Implementation II Ed Angel Professor Emeritus of Computer Science
Presentation transcript:

Modeliranje kompleksnih modelov Hierahična, drevesna struktura modela

Polygonal Meshes Used to model solid objects Objects are defined by: List of vertices List of normals Face list

Vertex List Vertex 0 0 0 1 1 0 0 2 1 1 0 3 0 1 0 4 0 0 1 5 1 0 1 6 1 1 1 7 0 1 1 1 2 3 4 5 6 7

Normal list Normal 0 0 -1 1 1 0 0 2 0 0 1 3 -1 0 0 4 0 1 0 5 0 -1 0 1 2 3 4 5 0: Rear Face 1: Right Face 2: Front Face 3: Left Face 4: Top Face 5: Bottom Face

Face List Face Vertex List 0 3 2 1 1 1 2 6 5 2 4 5 6 7 3 0 4 7 3 4 0 3 2 1 1 1 2 6 5 2 4 5 6 7 3 0 4 7 3 4 2 3 7 6 5 0 1 5 4 1 2 3 4 5 6 7 0: Rear Face 1: Right Face 2: Front Face 3: Left Face 4: Top Face 5: Bottom Face

Data File 8 6 6 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 1 0 1 1 1 1 0 1 1 0 0 -1 1 0 0 0 0 1 1 0 0 0 1 0 0 -1 0 4 0 3 2 1 4 1 2 6 5 4 4 5 6 7 4 0 4 7 3 4 2 3 7 6 4 0 1 5 4 # Vertices # Normals # Faces Vertices Normals Faces

Spatial Data Structures Used to organize geometry in n-dimensional space (2 and 3D are of this course’s interest) For accelerating queries – culling, ray tracing intersection tests, collision detection They are mostly hierarchy by nature Topics: Bounding Volume Hierarchies (BVH) Binary Space Partitioning Trees (BSP trees) Octrees

Anwendungen für Objekthierarchien Culling Raytracing Radiosity Navigation

Binary Space Partitioning (BSP) Trees Main purpose – depth sorting Consisting of a dividing plane, and a BSP tree on each side of the dividing plane (note the recursive definition) The back to front traversal order can be decided right away according to where the eye is back to front: A->P->B P BSP A BSP B back to front: A->P->B

BSP Trees (cont’d) Two possible implementations: Axis-Aligned BSP Polygon-Aligned BSP Intersecting?

Axis-Aligned BSP Trees Starting with an AABB Recursively subdivide into small boxes One possible strategy: cycle through the axes (also called k-d trees) 1a 1b A B C 2 D E D E B 2 1b 1a A C Q: objects intersect the boundaries?

Polygon-Aligned BSP Trees The original BSP idea Choose one divider at a time – any polygon intersect with the plane has to be split Done recursively until all polygons are in the BSP trees The back to front traversal can be done exact The dividers need to be chosen carefully so that a balanced BSP tree is created F A B D E C F B C A D E result of split

Octrees Similar to Axis-Aligned BSP trees Each node has eight children A parent has 8 (2x2x2) children Subdivide the space until the number of primitives within each leaf node is less than a threshold Objects are stored in the leaf nodes