CSE 167: Introduction to Computer Graphics Lecture #9: Scene Graph. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

Similar documents
CSE 167: Introduction to Computer Graphics Lecture #8: Scene Graph. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

CSE 167: Introduction to Computer Graphics Lecture 11: Scene Graph 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

Problem Max. Points Total 80

Culling. Computer Graphics CSE 167 Lecture 12

CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Introduction to Computer Graphics Lecture #7: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015

CSE 167: Introduction to Computer Graphics Lecture #5: Visibility, OpenGL

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

CSE 167: Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Overview. Java and OpenSceneGraph. Introduction. OpenSceneGraph. Introduction Scene graph structure

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Introduction to Computer Graphics Lecture #19: Wrapping Up. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

Total 80

Lecture 08: Hierarchical Modeling with Scene Graphs

CSE 167: Introduction to Computer Graphics Lecture #5: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

EDAF80 Introduction to Computer Graphics. Seminar 1. Hierarchical Transformation. Michael Doggett. Some slides by Carl Johan Gribel,

CSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CS451Real-time Rendering Pipeline

Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014

Open Scene Graph Lecture Note #1

CIS 581 Interactive Computer Graphics

Speeding up your game

Spatial Data Structures

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

CSE 167: Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Lecture #17: Procedural Modeling. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Accelerating Realism with the (NVIDIA Scene Graph)

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #16: Procedural Modeling

Computer Graphics Disciplines. Grading. Textbooks. Course Overview. Assignment Policies. Computer Graphics Goals I

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

Chapter 4. Chapter 4. Computer Graphics 2006/2007 Chapter 4. Introduction to 3D 1

CSE 167: Introduction to Computer Graphics Lecture #7: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

CIS 581 Interactive Computer Graphics (slides based on Dr. Han-Wei Shen s slides) Requirements. Reference Books. Textbook

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Computer Graphics I Lecture 11

CSE 167: Introduction to Computer Graphics Lecture #3: Coordinate Systems

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

Exercise Max. Points Total 90

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

CS535: Interactive Computer Graphics

Introduction to Computer Graphics. Knowledge basic concepts 2D and 3D computer graphics

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Spatial Data Structures

Lecture 18 of 41. Scene Graphs: Rendering Lab 3b: Shader

CSE 167: Introduction to Computer Graphics Lecture #9: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

Programming Game Engines ITP 485 (4 Units)

Many rendering scenarios, such as battle scenes or urban environments, require rendering of large numbers of autonomous characters.

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

Lecture 0 of 41: Part A Course Organization. Introduction to Computer Graphics: Course Organization and Survey

Spatial Data Structures

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

Spatial Data Structures

lecture 18 - ray tracing - environment mapping - refraction

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

Spatial Data Structures

Topic 10: Scene Management, Particle Systems and Normal Mapping. CITS4242: Game Design and Multimedia

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

6.837 Introduction to Computer Graphics Assignment 5: OpenGL and Solid Textures Due Wednesday October 22, 2003 at 11:59pm

Animation & Rendering

Game Architecture. 2/19/16: Rasterization

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing

CSE 167: Introduction to Computer Graphics Lecture #5: Illumination Model

CS450/550. Pipeline Architecture. Adapted From: Angel and Shreiner: Interactive Computer Graphics6E Addison-Wesley 2012

CHAPTER 1 Graphics Systems and Models 3

Chapter 5 - The Scene Graph

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Lecture 11: Textures 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Rendering Grass with Instancing in DirectX* 10

CSE 167: Introduction to Computer Graphics Lecture #4: Coordinate Systems

What s New in TerraExplorer Suite 5.0

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Course Producer. Prerequisites. Textbooks. Academic integrity. Grading. Ming Chen. Same office hours as TA. The Hobbit: The Desolation of Smaug (2013)

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

NVSG NVIDIA Scene Graph

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Lecturer Athanasios Nikolaidis

The Application Stage. The Game Loop, Resource Management and Renderer Design

3D GRAPHICS. design. animate. render

Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts

Lecture 2. Shaders, GLSL and GPGPU

CS 381 Computer Graphics, Fall 2012 Midterm Exam Solutions. The Midterm Exam was given in class on Tuesday, October 16, 2012.

3D Production Pipeline

Lecture 13: Reyes Architecture and Implementation. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

3D Rendering Pipeline

Goals. Course Staff. Demo: Surreal (HW 3) Entertainment. Foundations of Computer Graphics (Spring 2012) Why Study 3D Computer Graphics?

Particle systems, collision detection, and ray tracing. Computer Graphics CSE 167 Lecture 17

Transcription:

CSE 167: Introduction to Computer Graphics Lecture #9: Scene Graph Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

Announcements Project 2 due tomorrow at 2pm Midterm next Tuesday 2

HP Summer Internship Calling all UCSD students who are interested in a computer science internship! San Diego can be a tough place to gain computer science experience as a student compared to other cities which is why I am so excited to present this positon to your sharp students! (There are 10 open spots for the right candidates) The position is with HP and will be for the duration of the upcoming summer. Here are a few details about the exciting opportunity. Company: HP Position Title: Refresh Support Technician Contract/Perm: 3-4 month contract Pay Rate: $13-15/hr based on experience Interview Process: Hire off of a resume Work Address: Rancho Bernardo location Top Skills: Refresh windows 7 & 8.1 experience Must have: Windows refresh 7 or 8.1 experience Minimum Vocational/Diploma/Associate Degree (technical field) Equivalent with 1-2 years of working experience in related fields, or Degree holder with no or less than 1 year relevant working experience. This is a competitive position and will move quickly. If you have any students who might be interested please have them contact me to be considered for this role. My direct line is 858 568 7582. Curtis Stitts Technical Recruiter THE SELECT GROUP CStitts@selectgroup.com Web Site 9339 Genesee Avenue, Ste. 320 San Diego, CA 92121 3

Lecture Overview Scene Graphs & Hierarchies Introduction Data structures Performance Optimization Level-of-detail techniques View Frustum Culling 4

Rendering Pipeline Scene data Modeling and viewing transformation Shading Projection Rasterization, visibility 5 Image

Graphics System Architecture Interactive Applications Games, scientific visualization, virtual reality Rendering Engine, Scene Graph API Implement functionality commonly required in applications Back-ends for different low-level APIs No broadly accepted standards Examples: OpenSceneGraph, NVSG, Java3D, Ogre Low-level graphics API Interface to graphics hardware Highly standardized: OpenGL, Direct3D 6

Scene Graph APIs APIs focus on different types of applications OpenSceneGraph (www.openscenegraph.org) Scientific visualization, virtual reality, GIS (geographic information systems) NVIDIA SceniX (https://developer.nvidia.com/scenix) Optimized for shader support Support for interactive ray tracing Java3D (http://java3d.java.net) Simple, easy to use, web-based applications Ogre3D (http://www.ogre3d.org/) Games, high-performance rendering 7

Commonly Offered Functionality Resource management Content I/O (geometry, textures, materials, animation sequences) Memory management High-level scene representation Graph data structure Rendering Optimized for efficiency (e.g., minimize OpenGL state changes) 8

Lecture Overview Scene Graphs & Hierarchies Introduction Data structures Performance Optimization Level-of-detail techniques View Frustum Culling 9

Scene Graphs Data structure for intuitive construction of 3D scenes So far, our GLFW-based projects store a linear list of objects This approach does not scale to large numbers of objects in complex, dynamic scenes 10

Example: Solar System Star World Rotation Rotation Planet 1 Planet 2 Rotation Rotation Moon A Moon B Moon C Moon D Source: http://www.gamedev.net 11

Data Structure Requirements Collection of separable geometry models Organized in groups Related via hierarchical transformations Use a tree structure Nodes have associated local coordinates Different types of nodes Geometry Transformations Lights Many more 12

Class Hierarchy Many designs possible Design driven by intended application Games Optimized for speed Large-scale visualization Optimized for memory requirements Modeling system Optimized for editing flexibility 13

Sample Class Hierarchy Node Group Geode MatrixTransform Switch Sphere Billboard Inspired by OpenSceneGraph 14

Class Hierarchy Node Common base class for all node types Stores node name, pointer to parent, bounding box Group Stores list of children Geode Geometry Node Knows how to render a specific piece of geometry 15

Class Hierarchy MatrixTransform Derived from Group Stores additional transformation M Transformation applies to sub-tree below node Monitor-to-world transformation M 0 M 1 World Star M 0 Planet M 1 16 Moon A Moon B

Class Hierarchy Switch Derived from Group node Allows hiding (not rendering) all or subsets of its child nodes Can be used for state changes of geometry, or key frame animation M 1 Moon Visible Moon Infrared 17

Class Hierarchy Sphere Derived from Geode Pre-defined geometry with parameters, e.g., for tesselation level, solid/wireframe, etc. Billboard Special geometry node to display an image always facing the viewer Sphere at different tessellation levels 18 Billboarded Tree

Source Code for Solar System world = new Group(); world.addchild(new Star()); rotation1 = new MatrixTransform( ); rotation2 = new MatrixTransform( ); rotation3 = new MatrixTransform( ); rotation4 = new MatrixTransform( ); world.addchild(rotation1); world.addchild(rotation2); rotation1.addchild(rotation3); rotation2.addchild(rotation4); rotation1.addchild(new Planet( 1 )); rotation2.addchild(new Planet( 2 )); rotation3.addchild(new Moon( A )); rotation3.addchild(new Moon( B )); rotation4.addchild(new Moon( C )); rotation4.addchild(new Moon( D )); Planet 1 Star Rotation 1 Rotation 3 World Rotation 2 Rotation 4 Planet 2 Moon A Moon B Moon C Moon D 19

Basic Rendering Traverse the tree recursively Group::draw(Matrix4 M) { for all children draw(m); } MatrixTransform::draw(Matrix4 M) { M_new = M * MT; // MT is a class member for all children draw(m_new); } Geode::draw(Matrix4 M) { setmodelmatrix(m); render(myobject); } Initiate rendering with world->draw(identity); 20

Modifying the Scene Change tree structure Add, delete, rearrange nodes Change node parameters Transformation matrices Shape of geometry data Materials Create new node subclasses Animation, triggered by timer events Dynamic helicopter-mounted camera Light source Create application dependent nodes Video node Web browser node Video conferencing node Terrain rendering node 21

Benefits of a Scene Graph Can speed up rendering by efficiently using low-level API Avoid state changes in rendering pipeline Render objects with similar properties in batches (geometry, shaders, materials) Change parameter once to affect all instances of an object Abstraction from low level graphics API Easier to write code Code is more compact Can display complex objects with simple APIs 22 Example: osgearth class provides scene graph node which renders a Google Earth-style planet surface