Game Engine Design Quake Engine Presneted by Holmes 2002/12/2.

Slides:



Advertisements
Similar presentations
Visible-Surface Detection(identification)
Advertisements

Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
Nearest Neighbor Search
Map Overlay Algorithm. Birch forest Wolves Map 1: Vegetation Map 2: Animals.
Advanced Light and Shadow Culling Methods Eric Lengyel.
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.
CHAPTER 12 Height Maps, Hidden Surface Removal, Clipping and Level of Detail Algorithms © 2008 Cengage Learning EMEA.
Part I: Basics of Computer Graphics
CSE 381 – Advanced Game Programming Scene Management
Visibility Culling. Back face culling View-frustrum culling Detail culling Occlusion culling.
May Visible Surface Detection Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.
Korea Univ. Graphics Lab. 3D Game Engine Design Chapter 12. Spatial Sorting Chung Ji Hye
Quadtrees Raster and vector.
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
Object-Space Visibility Culling Anthony Steed University College London Based upon material presented by Claudio T. Silva at Eurographics 1999 Slides,
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.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
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.
1 From-Point Occlusion Culling From-Point Occlusion Culling Chapter 23.
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.
Spatial Data Structure: Quadtree, Octree,and BSP tree Mengxia Zhu Fall 2007.
10/11/2001CS 638, Fall 2001 Today Kd-trees BSP Trees.
Hidden Surface Removal
1 Occlusion Culling ©Yiorgos Chrysanthou, , Anthony Steed, 2004.
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.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
The Visibility Problem In many environments, most of the primitives (triangles) are not visible most of the time –Architectural walkthroughs, Urban environments.
10/16/2001CS 638, Fall 2001 Today Visibility –Overview –Cell-to-Cell –Cell-to-Region –Eye-To-Region –Occlusion Culling (maybe)
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”
GRAPHS CSE, POSTECH. Chapter 16 covers the following topics Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component,
CSC418 Computer Graphics n BSP tree n Z-Buffer n A-buffer n Scanline.
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.
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”
Using BSP for CD Ref: BSP in deBerg et al ’ s book (url)url.
03/14/02 (c) 2002 University of Wisconsin, CS559 Last Time Some more visibility (Hidden Surface Removal) algorithms –A-buffer –Scanline –Depth sorting.
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.
3/23/04© University of Wisconsin, CS559 Spring 2004 Last Time Antialiasing –Area-weighted sampling Visibility –Painters algorithm –Depth buffer (Z-buffer)
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
10/07/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Spatial data structures.
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
GRAPHS. Graph Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component, spanning tree Types of graphs: undirected,
Maths & Technologies for Games Spatial Partitioning 1 CO3303 Week 8-9.
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.
Data Structures and Algorithm Analysis Graph Algorithms Lecturer: Jing Liu Homepage:
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.
UNC Chapel Hill M. C. Lin Geometric Data Structures Reading: Chapter 10 of the Textbook Driving Applications –Windowing Queries Related Application –Query.
CS552: Computer Graphics Lecture 28: Solid Modeling.
Bounding Volume Hierarchies and Spatial Partitioning
Geometric Data Structures
Bounding Volume Hierarchies and Spatial Partitioning
3D Graphics Rendering PPT By Ricardo Veguilla.
3D Object Representations
Today Visibility Overview Cell-to-Cell Cell-to-Region Eye-To-Region
Orthogonal Range Searching and Kd-Trees
CSCE 441: Computer Graphics Hidden Surface Removal
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
Presentation transcript:

Game Engine Design Quake Engine Presneted by Holmes 2002/12/2

Component Scene graph Special Effect

Scene graph Mass scene data FPS game focuses on efficient moving vs. RPG game

Scene graph-1 PVS(potentially visible set) Subdivide scene into cells Compute visibility offline Interactive rendering Superset of the polygons visible from any viewpoint in the cell PVS computing a superset of the visible polygon, and Graphics hardware solve hidden-surface for this superset in screen- space

Scene graph-2 Subdivision the scene space along its major opaque feature Found maximal set of sightline(PVS) Cell-to-cell visibility is established is a sightline exists from any point in one cell to any point in another Culled against the view cone of observer Eye-to-cell visibility producing a reliable superset of the visible scene data

Scene graph-3 Assumption ” faces ” are axial line segments in the plane Coordinate data occur on a grid Data structure k-D tree If a k-D tree node is not a leaf, it has split the dimension s such that,a split abscissa a such that,for which the extends are

Scene graph-4 Each input face F is classified Disjoint No intersection with cell Spanning Partitions the cell interior into components that intersect only on their boundaries Covering Lies on the cell boundary and intersects the boundary ’ s relative interior Incident

Scene graph-5

Scene graph-6 Recursively subdivide the root node with procedure If the k-D cell has no incident faces(its interior is empty), do nothing If any spanning faces exist,split on the median spanning pace Otherwise,split on a sufficiently obscured minimum cleaving abscissa “ sufficiently obscured ” means that the length of the faces as this abscissa sum to more than some threshold

Scene graph-7 After subdivision terminates, the portals are enumerated and sorted with each leaf cell Constructing an adjacency graph over the subdivision leaf cell

Scene graph-8 Determining exist of sightline between cells Portal sequence If there exists a line that stabs every portal of the sequence Portal sequence from A [A/B,B/C,C/D] [A/C,C/B,B/D] [A/B,B/D] [A/C,C/D]

Scene graph-9 Generating portal sequence DFS(depth-first-search) with adjacency graph Finding sightlines Places the portal endpoints in a set L or R according to the portal ’ s oriented A sightline can stab this portal sequence if and only if there exists a line S such that

Scene graph-10 Algorithm

Scene graph-11

Scene graph-12 After recursive of Find_Visible_Cells(),we construct the stab tree Each node or vertex of the stab tree corresponds to a cell visible from the source cell

Scene graph-13 Define O the cell containing the observer C the view cone S the stab tree rooted at O V the set of cells visible from O

Scene graph-14 Disjoint cell Remove from V those cells that disjoint from C O(|V|) Connected component Employs a depth-first-search from O in S Constraint every cell traversed must intersect the interior with C Incident portals Searching only through cells reachable via portals that intersect C ’ s interior Exact eye-to-cell Portal sequence to that cell must admit a sightline that lies inside C and contains the view position

Scene graph-15

Special Effect Light Mapping

Light mapping-1 Light map this value will be pre- calculated for that normal and it will simply have to be fetched from the map The aim of light mapping is too decrease the overhead associated with lightning calculations

Light mapping-2 You can see that a sphere has a face looking in almost every direction.

Light mapping-3 This means that the faces of the sphere also have normals pointing in almost every direction as shown in the picture below. The little yellow lines are normals to corresponding polygons

Light mapping-4 The idea behind light mapping is to generate a 'light map' which will contain the precalculated light values for normal vectors found on a fairly fine grained sphere. The idea I have now is to let the light map be a three dimentional array [x][y][z] where the light values at each element are generated for normal vectors found on a sphere.

Light mapping-5 Aim: Speed up lighting calculations by pre-computing lighting and storing it in maps Allows complex illumination models to be used in generating the map (eg shadows, radiosity) Used in complex rendering algorithms to catch radiance (Radiance)

Light mapping-6

Light mapping-7