Managing Your Objects Paul Taylor 2009 Assignment Due Fri 5/6/2009.

Slides:



Advertisements
Similar presentations
Hierarchical Cellular Tree: An Efficient Indexing Scheme for Content-Based Retrieval on Multimedia Databases Serkan Kiranyaz and Moncef Gabbouj.
Advertisements

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

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.
AreaPortal Visibility By Filami. Objectives Practice the techniques of visibility determination using Area Portals; Develop an experimental application.
CSE 381 – Advanced Game Programming Scene Management
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
GATE D Object Representations (GATE-540) Dr.Çağatay ÜNDEĞER Instructor Middle East Technical University, GameTechnologies & General Manager SimBT.
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...
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.
Implicit Surfaces Tom Ouyang January 29, Outline Properties of Implicit Surfaces Polygonization Ways of generating implicit surfaces Applications.
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 Space Partitions.
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.
Collision Detection Michael Fuller. Overlap testing Most Common Technique Most Error Prone Test if two bodies overlap.
10/11/2001CS 638, Fall 2001 Today Kd-trees BSP Trees.
10/02/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Octrees.
Hierarchical Transformations Hierarchical Models Scene Graphs
Week 1 - Friday.  What did we talk about last time?  C#  SharpDX.
BSP Trees, Quadtrees & Octrees Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, January 28, 2004.
Modeling and representation 1 – comparative review and polygon mesh models 2.1 Introduction 2.2 Polygonal representation of three-dimensional objects 2.3.
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.
Graphics Graphics Korea University cgvr.korea.ac.kr Creating Virtual World I 김 창 헌 Department of Computer Science Korea University
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.
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.
Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova.
Quaternions Paul Taylor Swizzle What is a swizzle?
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
Collision/Acceleration University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
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.
Copyright © Curt Hill Visualization of 3D Worlds How are these images described?
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Mark Nelson 3d projections Fall 2013
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.
Maths & Technologies for Games Spatial Partitioning 2
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
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”
Solid Modeling Dr. Scott Schaefer.
Ray Tracing Acceleration (3)
Hierarchical Data Structure in Game Programming Yanci Zhang Game Programming Practice.
CS552: Computer Graphics Lecture 28: Solid Modeling.

Scene Manager Creates and places movable objects like lights and cameras so as to access them efficiently, e.g. for rendering. Loads and assembles world.
Bounding Volume Hierarchies and Spatial Partitioning
Week 2 - Monday CS361.
Collision Detection Spring 2004.
Bounding Volume Hierarchies and Spatial Partitioning
Deformable Collision Detection
Modeliranje kompleksnih modelov
CSCE 441: Computer Graphics Hidden Surface Removal
Hierarchical Modeling & Constructive Solid Geometry
CS679 - Fall Copyright Univ. of Wisconsin
Deformable Collision Detection
Overview of Modeling 김성남.
Modeliranje kompleksnih modelov
Presentation transcript:

Managing Your Objects Paul Taylor 2009 Assignment Due Fri 5/6/2009

What is an Object A Bunch of Polygons (or one), or a Sprite Each Object can have: – A Translation – A Rotation – A Scale – A Shear (not super common)

Our Test Objects A Sweet Car!

The Simplest Representation Car Body Translation, Rotation and Scale Wheel 1 Translation, Rotation and Scale Wheel 2 Translation, Rotation and Scale

Scale Rotate Translate Scale Rotate Translate Scale Rotate Translate

Using Hierarchical Objects

With our Matricies Scale Rotate Translate Scale Rotate Translate Scale Rotate Translate

Directed Acyclic Graphs (DAG) Technically this is a Specialised case of a Directed Graph The rule is there are no paths that start at a vertex and end at the same vertex (No Loops)

What is the benefit? We can Reuse Objects Cars have four wheels A flock of birds may all be the same A turret may have 4 Cannons

Sweet Car utilising a DAG

Connecting All your Objects We are creating a Scene Graph

In effect Object Storage Looks Like Root Child 1 Child 2Sibling 1Sibling 2 Sibling 2 Child 1 Sibling 2 Child 2 Sibling 2 Child 2 Sibling 1 Child 3

Creating Bounding Boxes BBs are typically used For Collision Detection With a Hierarchical Object generation can still be relatively simple. Outlier detection in X Y Z and –X-Y-Z directions A Bounding Sphere simply needs the most distant vertex from the Object Center More Complicated routines can be used, or you can use a Human!

Constructive Geometry Not generally used during real time renders Consist of using Logical Operators on Polygon Objects to combine them – Intersections, Unions and Difference A Typical Use of Constructive Geometry is in 3D Game Level creation and CAD Design

Constructive Solid Geometry CSG

We have our Objects Nicely packed Why? To Create Structures that define the 3D Worlds we are creating Intersecting the Bounding Boxes/Spheres in the game world is much faster. Once we know that 2 objects intersect (via BB collision) we can go deeper into the collision (If needed)

Space Subdivision We have already covered BSP Trees, now we will look at 1 1/2 more Space Partitioning methods Oct-Trees KD-Trees

Quad-Trees Quad Trees are the 2D baby brother of Oct Trees Computationally similar, conceptually easier Space is Divided into 4 areas If more than one object exists in a region it is again subdivided into 4 sub-regions, and so on….

es/spatialDBMS/quadtree.gif es/spatialDBMS/quadtree.gif

Oct-Trees

/Jean-Daniel_Nahmias/Massive_Model_Rendering.htm /Jean-Daniel_Nahmias/Massive_Model_Rendering.htm

KD-Trees A specialisation of Binary Trees (Similar to BSP Trees) In a similar way to Oct Trees a KD Tree splits space in an Axis Aligned Fashion. Different to Oct-Trees a KD Tree does not always split the world into even parts

KD-Trees a.org/wiki/Kd-tree

hpcc.astro.washington.edu/old_content/papers/marios/perform/n ode3.html hpcc.astro.washington.edu/old_content/papers/marios/perform/n ode3.html

What else can you do? Oct-Trees and KD-Trees can be used for: – View Frustum Culling – Occlusion Culling – Level of Detail Detection – Spatial Indexing (Similar to a BSP Tree) – Ray Casting

Bringing it all together You organise all of your objects – Binary Tree, Object Tree, Hash Table etc You have a method of generating Collisions – Firstly by Simplifying objects Bounding Boxes, Spheres – Secondly by finding Collisions between objects Oct-Trees, KD-Trees – Thirdly we can check the collision of the actual objects if required Finally we need to do something appropriate with the collision!

That’s a lot of work!

Open Scene Graph (OSG) Multipass Object Grouping and Ordering Middleware that does Object Handling Things you could do with it: Prototyping Offline Rendering A Sluggish Game