Download presentation
Presentation is loading. Please wait.
Published byWilfrid Ambrose Todd Modified over 9 years ago
1
1 Advanced Scene Management
2
2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake” Octree PVS (Potentially visible set) Culling Skills Advanced Scene Graphs
3
3 Hierarchical structure of bounding spheres R B Bounding Volume Hierarchies (BVHs)
4
4 Two varients Axis-aligned Polygon-aligned The trees are created by using a plane to divide the space into two, and then sorting the geometry into two spaces. BSP Tree
5
5 plane1 plane0 plane2 plane3 0 1 2 3 Axis-aligned BSP Tree
6
6 A B C D E F G A B C D E FG Polygon-aligned BSP Tree
7
7 Quickly to identify where you are BSP = Sorting Need a pre-processor to generate the PVS Visibility culling + occlusion culling PVS : Potentially Visible Set Optimized for in-door game environment [Fuch80] Fuchs, H., On Visible Surface Generation by a Priori Tree Structures, Computer Graphics, 14, 124-33, (Proc. SIGGRAPH’80) Why BSP Tree ?
8
8 Octree Similar to axis-aligned BSP tree A box is split simultaneously along all three axes The split point must be the center of the box This creates eight new smaller boxes Quadtree is the 2D version of octree Octree & Quadtree
9
9 Quadtree - Example
10
10 Data structure coherence Apply visibility culling from parents Split or not split ? Outdoor game scene ? Octree – Some Discussion
11
11 Culling means “remove from a flock” Visibility culling Remove the object not in view frustum A “must” for game engine Backface culling Remove the polygons facing away from camera Hardware standard Occlusion culling Remove the objects hidden by the others Culling (1/2)
12
12 eye View frustum Visibility culling Backface culling Occlusion culling Culling (2/2)
13
A Pre-processor A Pre-processor –Space partition the scene data from artist –Generate the BSP data structure –Generate the PVS BSP Walk Through BSP Walk Through –Identify the room where you are –Show/hide the rooms according to the PVS 13 BSP Implementation
14
Input Input –A scene from artist –Cutting planes (optional) »Can be procedurally generated by algorithm –Cutting policy »Split or not split –Ray casting resolution for PVS Output Output –A BSP file »BSP Tree »PVS »Geometry Data 14 BSP Preprocessor (1/2)
15
Process Process –Generate the BSP tree according to the cutting policy –Split or sort the geometry into BSP room (leaves) –For each “room”, perform ray casting for all rooms to generate the possible visible room set –3D –Time consuming –Pre-processing process (can be done off-line) 15 BSP Preprocessor (2/2)
16
Effectiveness of PVS Effectiveness of PVS –Data set Dynamic Objects Dynamic Objects Room size Room size 16 BSP Challenges
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.