1 / 32

Overview

Overview. Introduction Constructing a scene Rendering Frustum culling OpenGL Performer. Introduction. The term ‘scene graph’ is a combination of cinematography and discrete mathematics. Scene: ‘the visual percept of a region.’

barton
Télécharger la présentation

Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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. Positioning objects in a scene 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.

  6. Linear transformations 3-dimensional coordinates can (amongst other transformations) be rotated, scaled and translated using 4x4 matrices after the vectors are rewritten in homogeneous form. Translation Scaling X-axis rotation Y-axis rotation Z-axis rotation

  7. Linear transformations Transforming coordinate v with a single matrix A Transforming coordinate v by matrix B after begin transformed with matrix A

  8. Positioning objects in a scene 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) 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 light Spot light Point 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 bunny Med-res bunny Low-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 Sphere Axis Aligned Bounding Box Orientated 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.

  27. 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

  28. 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.

  29. OpenGL Performer • Performer is composed of the following eight libraries: • High performance rendering library • Visual simulation library • Geometry Builder Library • Utility Library • User Interface Library • Graphical Viewer Library • A Configuration-import Library • Database Loader Library

  30. OpenGL Performer

More Related