Download presentation
Presentation is loading. Please wait.
1
Overview Introduction Constructing a scene Rendering Frustum culling OpenGL Performer
2
Introduction The term ‘scene graph’ is a combination of cinematography and discrete mathematics. Scene: ‘the visual percept of a region.’ In cinematography a scene includes camera’s, actors, background and so forth Graph: ‘nodes connected by edges.’ In this case a directed acyclic graph
3
Introduction A scene graph is a data structure which contains: (Viewable) objects Relations of objects to another Information on the appearance of objects Why use scene graphs? Possibly quick elimination of peripheral regions Easy content management Hierarchical objects are well supported Persistence; easy saving and storing
4
Introduction Every graphics application uses some form of scene graph. Paint photo manipulation programs Illustration/design programs Presentation software Visualization of modeling and simulation Any program that provides a GUI etc…
5
Models are stored in their own local space. To be positioned in the right position in the scene, they must be transformed from ‘model space’ to ‘world space’. It is common practice to use a 4x4 transformation matrix for this purpose. Positioning objects in a scene
6
3-dimensional coordinates can (amongst other transformations) be rotated, scaled and translated using 4x4 matrices after the vectors are rewritten in homogeneous form. Linear transformations TranslationScaling Z-axis rotationY-axis rotationX-axis rotation
7
Transforming coordinate v with a single matrix A Linear transformations Transforming coordinate v by matrix B after begin transformed with matrix A
8
Green box is placed (A) somewhere in the scene. Red prism is placed (B) on top of the green box Blue box is scaled down (C) and placed (D) on top of green box White prism is rotated (E) and placed on top of blue box (F) Positioning objects in a scene Green box: A Red prism: AB Blue box: ADC White prism: ADCFE
9
Positioning objects in a scene
10
Positioning objects in a scene (2)
11
Light sources Directional lightSpot lightPoint light Parameters: Attenuation Diffuse color/specular color Intensity
12
Rendering states Material properties Color Light reflection Surface texture Transparancy/opacity Reflection/refraction (ray tracing) Type of shading More rendering states Fog ZBuffer/Stencil buffer settings Other OpenGL/rasterizer specific settings
13
Refined scene graph
14
LOD (Level Of Detail) node (1) High-res bunnyMed-res bunnyLow-res bunny
15
LOD (Level Of Detail) node (2)
16
Switch/animation node Depending on a decision function only a specific subtree is used
17
Rendering the scene graph (1) Input: Scene graph, initial render state Output: Render queue
18
Rendering the scene graph (2) Next, let OpenGL or other rendering context consume the render queue. Changing the render state might be expensive!! Therefore the render queue is often sorted in such a way that the number of render changes is minimized.
19
Frustum culling So far, we've been rendering everything without considering wether or not it is in our field of view. Frustum culling: only process that part of the scene graph that is within our field of view. Test if an object lies within all six frustum boundaries. Do not proceed if this isn't the case. Not rendering something is cheap.
20
Frustum culling (2)
21
Bounding volumes Testing individual vertices of a model is not very efficient. By using bounding volumes, the number of tests is reduced significantly, at the cost of some unnescessary rendering. Bounding SphereAxis Aligned Bounding BoxOrientated Bounding Box
22
Bounding volumes Bounding volumes can be grouped in larger bounding volumes, so that large sections of the graph can be rejected at an early stage.
23
Spatial structuring: Static grid Only process nodes that overlap grid cells lying inside the frustum.
24
Spatial structuring: BSP-tree Binary Space Partitioning-tree. A spatial binary hierarchy within the scene graph. A balanced, axis aligned BSP-tree can be generated with the k-D tree algorithm.
25
Spatial structuring: Octree BSP-related. Every node of an octree splits an region in eight subregions or none at all (leaf). The 2-dimensional version of the same principal is called a quadtree.
26
Portals Portals clip the viewing frustum. When an additional transformation is added as well, portals can also be used for 'television' or mirrors. Making the viewing frustum smaller by clipping increases the chance of rejection.
29
Occlusion Culling Occlussion culling attempts to not render objects that are invisible because occluding objects are located in front of them. Z-Buffering Z-Pyramid/Hierarchical occluding maps Shadow frusta
30
OpenGL Performer "Industrial-strength" scene graph API developed by Silicon Graphics for OpenGL. Mainly used for visualisation purposes, but can also be employed for simulations and games. From the "Getting Started" guide: OpenGL Performer is an extensible software toolkit for creating real-time 3D graphics. Typical applications are in the fields of visual simulation, entertainment, virtual reality, broadcast video, and CAD. OpenGL Performer provides a flexible, intuitive, toolkit-based solution for developers who want to optimize application performance.
31
OpenGL Performer Performer is composed of the following eight libraries: 1. High performance rendering library 2. Visual simulation library 3. Geometry Builder Library 4. Utility Library 5. User Interface Library 6. Graphical Viewer Library 7. A Configuration-import Library 8. Database Loader Library
32
OpenGL Performer
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.