Open Scene Graph Visualization II MSIM 842, CS 795/895

Slides:



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

COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
Introduction to Massive Model Visualization Patrick Cozzi Analytical Graphics, Inc.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 1 – Introduction to VRML.
Lecture Fall 2001 Visibility Back-Face Culling Painter’s Algorithm.
Visibility Culling. Back face culling View-frustrum culling Detail culling Occlusion culling.
HCI 530 : Seminar (HCI) Damian Schofield.
1 Dr. Scott Schaefer Hidden Surfaces. 2/62 Hidden Surfaces.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
Scenegraph. Scenegraph Nodes - all implement a run function Leaf/Geo Nodes - typedefs of sgNode superclass –Poly Mesh A geo node that stores a list of.
Lecture21 Other Java Gamming technologies – Java3D (This lecture will not be assessed)
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
Tomas Mőller © 2000 Speed-up Techniques for Real-Time Rendering or “What makes your real-time video game fly” Tomas Möller Chalmers University of Technology,
Overview Introduction Constructing a scene Rendering Frustum culling OpenGL Performer.
B + -Trees (Part 1) Lecture 20 COMP171 Fall 2006.
B + -Trees (Part 1) COMP171. Slide 2 Main and secondary memories  Secondary storage device is much, much slower than the main RAM  Pages and blocks.
Fall 2006 revised1 Frustum Culling in OpenGL Ref: MarkMoley.com.
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.
Graphical Objects and Scene Graphs CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Ch 1 Intro to Graphics page 1CS 367 First Day Agenda Best course you have ever had (survey) Info Cards Name, , Nickname C / C++ experience, EOS experience.
B + -Trees COMP171 Fall AVL Trees / Slide 2 Dictionary for Secondary storage * The AVL tree is an excellent dictionary structure when the entire.
Hierarchical Transformations Hierarchical Models Scene Graphs
1 Occlusion Culling ©Yiorgos Chrysanthou, , Anthony Steed, 2004.
Week 1 - Friday.  What did we talk about last time?  C#  SharpDX.
Basic 3D Graphics Chapter 5. Bird’s Eye View  Basic 3D Graphics –Basic concepts of 3D graphics, rendering pipeline, Java 3D programming, scene graph,
Hierarchy, Modeling, and Scene Graphs Angel: Chapter 10 OpenGL Programming and Reference Guides, other sources. ppt from Angel, AW, etc. CSCI 6360/4360.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
COMP 175: Computer Graphics March 10, 2015
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
3D Visualisation of Simulation Data. Informal Seminar 08/03/2004. By Chris Sweet.
Don Burns Robert Osfield
Graphical Objects and Scene Graphs 1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009.
The Visibility Problem In many environments, most of the primitives (triangles) are not visible most of the time –Architectural walkthroughs, Urban environments.
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”
Data Structures for Scenes, The Basics of Scene Graphs Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Friday,
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.
2 COEN Computer Graphics I Evening’s Goals n Discuss application bottleneck determination n Discuss various optimizations for making programs execute.
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.
3D Viewers Two main uses: –Detector/event exploration – interactivity priority (15fps min). –Generate presentation material (still/movie renders) – quality.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Coherent Hierarchical Culling: Hardware Occlusion Queries Made Useful Jiri Bittner 1, Michael Wimmer 1, Harald Piringer 2, Werner Purgathofer 1 1 Vienna.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 7. Speed-up Techniques Presented by SooKyun Kim.
Models & Hierarchies CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
Graphical Objects and Scene Graphs Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
Hierarchical Occlusion Map Zhang et al SIGGRAPH 98.
CS777 Project 1 Developing Maya Plug-ins for motion related projects Kyungsuk David Lee.
Computer Graphics I, Fall 2008 Hierarchical Modeling I.
Some Notes on 3-D Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, October 24, 2003.
CHC ++: Coherent Hierarchical Culling Revisited Oliver Mattausch, Jiří Bittner, Michael Wimmer Institute of Computer Graphics and Algorithms Vienna University.
Institute for Computer Graphics and Vision Computer Graphics and Interactive Systems 1 Grabner HS i4, 2006/03/08 Web3D, VRVU, SGP Web3D ( ) VRVU.
COMPUTER GRAPHICS CHAPTER 38 CS 482 – Fall 2017 GRAPHICS HARDWARE
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.
Week 2 - Monday CS361.
Complex Geometry Visualization TOol
Tutorials available at jamestedder.net
Ogre Overview Lecture 3.
Graphical Objects and Scene Graphs
Graphical Objects and Scene Graphs
Scalability of Intervisibility Testing using Clusters of GPUs
Real-Time Ray Tracing Stefan Popov.
The Graphics Rendering Pipeline
CSCE 441: Computer Graphics: Hierarchical Models
Hierarchical Modeling & Constructive Solid Geometry
CSCE 441: Computer Graphics: Hierarchical Models
Presentation transcript:

Open Scene Graph Visualization II MSIM 842, CS 795/895 Instructor: Jessica Crouch

Implementation work Time constraints and algorithmic complexity make it impractical to implement very many of the algorithms we’ll discuss We’ll introduce OpenSceneGraph and do a little programming It’s a useful skill Good to learn after OpenGL We’ll do enough to prepare you to pursue it further on your own Our primary focus in class will remain on the readings

VTK Alternative VTK was another strong possibility OSG implements more graphics and simulation oriented features VTK Implements more visualization, 2D & 3D data processing algorithms

Scene Graphs Datastructure: Directed Acyclic Graph (DAG) Usually a tree (only one parent per node) Represents object-based hierarchy of geometry Leaves contains geometry (triangles, etc.) Each node holds pointers to children Children can be Group Geometry Matrix transform Others…

Scene Graphs Spatial transforms represented as graph nodes (rotation, translation, scaling, etc.) tricycle T T Seat Front Group Back wheels Handle bars Left wheel Right wheel T Front Wheel

Scene Graphs & Bounding Volumes Basic idea: Augment scene graphs with bounding volume data (spheres or blocks) at each node Sometimes called “Bounding Volume Hierarchy” (BVH) By applying clipping/culling tests to the bounding volumes, prune entire branches of the tree and possibly avoid processing many triangles

Scene graph example scene graph circles=BVs root Objects close to each other in the virtual world are close in the scene graph

Culling: Overview Hierarchical view-frustum culling Detail culling Use bounding volumes Detail culling Choose resolution of rendering based on object’s distace to camera Next slides shows some examples

View-Frustum Culling If a bounding volume (BV) is outside the view frustum, then the entire contents of that BV is also outside (not visible) Avoid further processing of such BV’s and their containing geometry Happens early (on CPU) in the pipeline == GOOD

Example of Hierarchical View Frustum Culling root Assuming that testing a sphere against the view frustum is cheaper than rendering the object camera

Scene Graphs & Detail Control In complex scenes, a large percentage of time is wasted drawing tiny triangles What happens if a triangle projects to one pixel or less? Goal: Use scene graph to reduce workload of insignificant triangles

Detail Culling Idea: Objects whose projected BV occupy less than N pixels are culled This is an approximating algorithm since the triangles you cull may actually contribute to the final image Advantage: trade-off quality/speed Also, called SCREEN-SIZE CULLING Bullet 2: This implies that this is an approximation….forts slide Bullet 3: higher speed if larger threshold (N) Often combined with Hierarchical VF CULL, that is, DONE in a hierarchical fashion as well

Example of Detail Culling Images courtesy of ABB Robotics Products, created by Ulf Assarsson detail culling OFF detail culling ON Not much difference, but 80-400% faster Good when moving

Level-of-Detail Rendering Use different levels of detail at different distances from the viewer More triangles closer to the viewer IDEA: Does not make sense to use 10,000 triangles when the object cover 50 pixels on-screen Different levels of detail == different number of polygons BECAUSE, when an object is far away,

LOD rendering Not much visual difference, but a lot faster Other criteria to select LOD: distance to the object, rendering budget (I.e., do we have time to draw a more complex LOD?) Many different types of LODs : what we’ve shown here are called “Discrete Geometry LODs” Read more in the book about Alpha LODs, Geomorph LODS, and more sophisticated LOD selection critera. Speedups: usually at least a factor of 2 Use area of projection of BV to select appropriate LOD

Scene graph with LODs Car chair

Scene Graphs: State Changes State changes affect the way the graphics pipeline execute Recall pipelining from your architecture class A change in state may require flushing the pipeline flushing the cache (on the graphics card) Binding to a texture is one of the most expensive state changes

Scene Graphs: State Changes Ideally, a scene would be drawn with the fewest possible state changes Most expensive state changes would be minimized at the expense of faster state changes How to accomplish this? Must sort triangles according to their state Manually? Automatically?

Scene Graphs: State Changes Scene graphs are used for state sorting State information is stored with the nodes Optimized rendering algorithms take advantage of groupings of same-state primitives Scene graph hierarchy can be (algorithmically) rearranged for rendering into a state graph Branchings represent state changes State tends to be static

Open Scene Graph Library for scene graphs Built on top of OpenGL C++ API Object oriented Open source Growing popularity in graphics community Commercially used (Boeing, NASA, …) Web site: http://www.openscenegraph.org

Open Scene Graph Supports: View frustum culling Occlusion culling Small feature culling Level Of Detail nodes State sorting Many other features

OSG Distribution Contains Core OSG – Focus on understanding this first NodeKits – implements more node types than available in the core Plugins – I/O for different file types Interoperability libs – for using OSG with various packages, languages Examples

Core OSG osg::Node - Base class for all nodes in the scene graph.

osg::Group - General group node which maintains a list of children.

Transform Nodes osg::Transform - A Transform is a group node for which all children are transformed by a 4x4 matrix. It is often used for positioning objects within a scene, producing trackball functionality or for animation.

Geometry Nodes osg::Geode - A Geode is a "geometry node", that is, a leaf node on the scene graph that can have "renderable things" attached to it. Renderable things are represented by objects from the Drawable class, so a Geode is a Node whose purpose is grouping Drawables.

Drawables Pure virtual base class for drawable geometry. Everything that can be rendered is implemented as a class derived from Drawable. A Drawable is not a Node, and therefore it cannot be directly added to a scene graph. Instead, Drawables are attached to Geodes, which are scene graph nodes. The OpenGL state that must be used when rendering a Drawable is represented by a StateSet. Drawables can also be shared between different Geodes, so that the same geometry (loaded to memory just once) can be used in different parts of the scene graph.

Plugins for file I/O Has plugins to support reading/writing lots of graphics file formats and 3D models: 3D database loaders include OpenFlight (.flt) TerraPage (.txp) LightWave (.lwo) Alias Wavefront (.obj) Carbon Graphics GEO (.geo) 3D Studio MAX (.3ds) Peformer (.pfb) Quake Character Models (.md2) Direct X (.x) Inventor Ascii 2.0 (.iv)/ VRML 1.0 (.wrl) Designer Workshop (.dw) AC3D (.ac) native .osg ASCII format. Image loaders include .rgb .gif .jpg .png .tiff .pic .bmp .dds .tga

OSGEdit http://osgedit.sourceforge.net/ Helps you compose scenes for OSG Open source Import models created with other programs, arrange your tree structure and transforms http://osgedit.sourceforge.net/

Open Scene Graph OSG documentation is incomplete No textbook Doxygen code documentation Some online tutorials and example programs Takes time to learn your way around Useful As-Is, development work continues

References www.openscenegraph.org http://www.nps.navy.mil/cs/sullivan/osgTutorials/SceneGraphOverview.htm http://www.realityprime.com/scenegraph.php

Your To-Do List Email me (jrcrouch@cs.odu.edu) your paper preferences by Sunday night. Download and build OSG. See instructions on course web site. Read through and run the Example osgAnimate. Draw the scene graph tree constructed in osgAnimate.cpp and bring to the next class. For each node, list object name and type. Read the two assigned papers for the next class.