High Level Graphics Programming & VR System Architecture

Similar documents
High-level 3D programming. using Coin and Sc21. on Mac OS X. Marius Kintel ~ Karin Kosina

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

Chapter 5 - The Scene Graph

Ciril Bohak. - INTRODUCTION TO WEBGL

Hierarchical Models Josef Pelikán & Alexander Wilkie CGG MFF UK Praha

CHAPTER 1 Graphics Systems and Models 3

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

Open Inventor Scene Graph

Graphical Objects and Scene Graphs

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

CS451Real-time Rendering Pipeline

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Modeling Objects. Modeling. Symbol-Instance Table. Instance Transformation. Each appearance of the object in the model is an instance

Hierarchical Modeling and Scene Graphs

Animation & Rendering

Introduction to 2D Graphics

Net Centric Computing - Graphics

CSE4030 Introduction to Computer Graphics

Spring 2011 Prof. Hyesoon Kim

Graphics for VEs. Ruth Aylett

Beginning Direct3D Game Programming: 1. The History of Direct3D Graphics

Hierarchical Modeling and Scene Graphs

Lecture 25: Board Notes: Threads and GPUs

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

GPU Memory Model. Adapted from:

Graphics Pipeline & APIs

2.5 Animations. Applications. Learning & Teaching Design User Interfaces. Content Process ing. Group Communi cations. Documents.

2.5 Animations. Contents. Basics. S ystem s. Services. Usage. Computer Architectures. Learning & Teaching Design User Interfaces.

Rendering Objects. Need to transform all geometry then

Scene Graphs. COMP 575/770 Fall 2010

Computer Graphics: Programming, Problem Solving, and Visual Communication

Graphics for VEs. Ruth Aylett

Spring 2009 Prof. Hyesoon Kim

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics

Hierarchical Modeling

Modeling the Virtual World

S7316: Real-Time Robotics Control and Simulation for Deformable Terrain Applications Using the GPU

Hardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences

Hierarchical Modeling and scene graphs

Open Scene Graph Lecture Note #1

Accelerating Realism with the (NVIDIA Scene Graph)

CS 563 Advanced Topics in Computer Graphics QSplat. by Matt Maziarz

Viewport 2.0 API Porting Guide for Locators

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

Hierarchical Modelling

The Rendering Pipeline (1)

3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models

PROFESSIONAL. WebGL Programming DEVELOPING 3D GRAPHICS FOR THE WEB. Andreas Anyuru WILEY. John Wiley & Sons, Ltd.

NVSG NVIDIA Scene Graph

CS130 : Computer Graphics. Tamar Shinar Computer Science & Engineering UC Riverside

CS 465 Program 4: Modeller

Graphics Pipeline & APIs

Virtual Environments: System Architectures

Java2D/Java3D Graphics

Graphics Programming. Computer Graphics, VT 2016 Lecture 2, Chapter 2. Fredrik Nysjö Centre for Image analysis Uppsala University

Transformation Hierarchies. CS 4620 Lecture 5

VR-programming tools (procedural) More VRML later in this course! (declarative)

MODELING AND HIERARCHY

Copyright Khronos Group Page 1

X3D - Texture, Material Properties, Artificial Light Models -

CSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science

Introduction to VRT. Interactive Graphical Systems HT2007. Lars Pettersson. Interactive Graphical Systems

2D/3D Geometric Transformations and Scene Graphs

Standards for WebVR. Neil Trevett. Khronos President Vice President Mobile Content,

Experiences with Open Inventor. 1 Introduction. 2 HEP Visualization in an Object-Oriented Environment

MIXED REALITY (AR & VR) WITH UNITY 3D (Microsoft HoloLens)

Copyright Khronos Group, Page Graphic Remedy. All Rights Reserved

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

<Insert Picture Here> JavaFX 2.0

Topics. Overview of VRML 97 VRML Today After VRML

Visibility optimizations

Unit Maps: Kindergarten Math

Rendering Grass with Instancing in DirectX* 10

Could you make the XNA functions yourself?

Models and Architectures

Course Title: Computer Graphics Course no: CSC209

Libraries for Computer Graphics. Introduction to VRT. Scene-graph libraries. Libraries for computer graphics. Scene-graph libraries (cont.

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

Module 13C: Using The 3D Graphics APIs OpenGL ES

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

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

MIXED REALITY (AR & VR) WITH UNITY 3D (Microsoft HoloLens)

PowerVR Hardware. Architecture Overview for Developers

Computer Graphics. Prof. Feng Liu. Fall /21/2016

Adaptive Point Cloud Rendering

API Background. Prof. George Wolberg Dept. of Computer Science City College of New York

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

Rasterization Overview

Teaching a Modern Graphics Pipeline Using a Shader-based Software Renderer

Next Generation OpenGL Neil Trevett Khronos President NVIDIA VP Mobile Copyright Khronos Group Page 1

6.837 Introduction to Computer Graphics Quiz 2 Thursday November 20, :40-4pm One hand-written sheet of notes allowed

EDAF80 Introduction to Computer Graphics. Seminar 3. Shaders. Michael Doggett. Slides by Carl Johan Gribel,

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

Pipeline Integration with FX Composer. Chris Maughan NVIDIA Corporation

Enabling immersive gaming experiences Intro to Ray Tracing

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

Today. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline

Computer Graphics 1. Chapter 2 (May 19th, 2011, 2-4pm): 3D Modeling. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2011

Introduction to X3D. Roberto Ranon HCI Lab University of Udine, Italy

! Readings! ! Room-level, on-chip! vs.!

Transcription:

High Level Graphics Programming & VR System Architecture Hannes Interactive Media Systems Group (IMS) Institute of Software Technology and Interactive Systems Based on material by Dieter Schmalstieg

VR & AR Course Overview Introduction Hardware Input Devices Output Devices 3D Graphics Hardware Software 3D Interaction High Level Graphics Programming Usability, Evaluations & Psychological Effects 2

Application Programmer s View Rendering Engine or Scene Graph OpenGL or D3D 3

Low-Level Graphics API OpenGL (v 1.0 1992), Direct3D (DirectX 2, 1996) Procedural Primitives Line, Triangle, Color,... Dual Database Problem 1. Representation: Data Objects 2. Representation: Graphical Redundancy, Problem of Inconsistency 4

High-Level Graphics API Rendering Engine (e.g. Unity, Unreal Engine, ) or Scene Graph e.g. OpenSceneGraph, OpenSG, X3D (VRML), Java3D,.. Object oriented Scene Objects Objects, not Drawings Not limited to graphical display Interactivity: Event-model for 3D scenes Software architecture Toolkit-approach, extendible 5

Lab Exercise: Higher Level Programming Game-Engine E.g. Unity3D Extended functionality: Simple AR Framework Tracking input Distribution 6 Object oriented programming in C# / Javascript Based on scene graph

Why High-Level API? Rapid prototyping Rapid application development (RAD) interpreted script geometry file Application or Shell (Browser, Editor) Hi-Level API Low-Level API 7

Scene Graph Example: SGI Open Inventor Scene graph library Based on C++ Used in research & commercial projects Platform & windowing system independent 1. Version: SGI Inventor, 1992. Open Source (ver 2.1) 2. Version: VGS Open Inventor: Continued development of SGI Inventor. 3. Version: Coin by Systems in Motion (SIM), Re-Engineered API, Open Source; ver. 3.0 http://www.coin3d.org/ 8

Scenegraph Structure Graphical data structure = Scenegraph Scenegraph consists of Nodes Directed graph! (Head/Tail) Directed edges -> Hierarchy Use of the hierarchy Semantic Hierarchy: e.g. car (parts) Geometric Hierarchy: e.g. puppet / jointed doll Usually one tree is sufficient 9 General: Directed Acyclic Graph (DAG) [ Multiple parent nodes allowed ] No directed circles

Scene Graph - Nodes 10 Nodes consist of data and methods Nodes are of a specific type Type determines behavior Behavior = Reaction to certain events Events are generated by the application by the user -> Interactivity Nodes are instances of a class Scene hierarchy vs. class hierarchy! Flexibility: Choose node(type), compose scene graph with nodes Extendible: New nodes can be implemented

Scene Graph - Fields Attributes (member variables) in nodes are called fields Fields: set/get, detect changes, connect fields across nodes Fields are objects by themselves Float-Object, String-Object etc. SoMaterial ambientcolor diffusecolor specularcolor emissivecolor shininess transparency 11

Example 12

Graph Traversal: Basic Idea 13 Data structure (scene graph) is processed (= traversed ) For each node a number of methods is implemented: Rendering BoundingBox calculation Transformation matrix calculation Handle Events (e.g. picking) Search nodes Write to file Execute user callback

Graph Traversal Order All nodes must be processed In general: Depth-First Traversal uses a State-Engine Difference in Group Nodes Ordered Group State Propagation top->down and left->right e.g. Inventor, VRML / X3D Very flexible scene graph generation Unordered Group State Propagation only top->down e.g. Java3D Parallel Render Traversal possible (Threads, SMP)! 14

State, Stack & Separator Separator Color state stack Red SphereSeparator Green Separator Cube Green Red Blue Cone Traversal saves state in Stack 15

Graph Traversal Modeling Attributes In-between, leaves or fields? Red Group Group Group Sphere Cube Red Sphere Cube Sphere Red Cube Red 16 Some toolkits only allow specific structures e.g. X3D Shape & Appearance combined

Transformation-Hierarchy R SL SR EL ER SL SR R EL ER HL HR HL HR OpenGL Matrix Stack <--> Transformation hierarchy 17

Instancing (Re-use) Example: Car In case of textures: Saves texture memory

Polygonal Shapes: Coordinates 1 3 5 2 4 6 Indexed vs. non-indexed polygon lists (e.g. FaceSet): Non-Indexed: V={P1=(x1,y1,z1), P2, P3, P2, P3, P4, P3, P4, P5, P6} F={3, 3, 4} Indexed: V={P1,P2,P3,P4,P5,P6} F={1,2,3,-1, 2,3,4,-1, 3,4,5,6,-1} 19

Polygonal Shapes: Attribute 1 3 5 7 2 4 6 8 Per face overall 20 Per vertex Bindings of attributes for material, normals, texture coordinates specifies mapping of attributes to polygons Overall object, per face, per vertex

Dependency Graph Field connections : Field types must be compatible! Two different (overlapping) structures Scene graph Dependency graph (dependent fields) 21

Engines To model complex dependencies in graph TargetField := Engine(SourceField) E.g. Calculator, Counter, Type converter, Interpolator, Trigger Engine Engine 22

Node Kits / Prefabs Prefabricated sub-scene graphs e.g. transformation, material + shape Simplify the construction of semantically correct scenes 24

Software Design and Components of an VR/AR Framework Hannes Interactive Media Systems Group (IMS) Institute of Software Technology and Interactive Systems 25

AR/VR Framework: Requirements & Wishes 26 Support multiple input & output devices Input: Interface to tracking middleware (e.g. OpenTracker, VRPN) Output: High level graphics programming, Stereo rendering, Handle user interaction Allow flexible 3D user interface widget libraries/middleware Support of collaboration multiple users, flexible user configuration, mobile work Support distributed work Easy application design / authoring

VR/AR/MR System Architecture 27

Example: Distributed VR / AR in Education Distributed collaboration over large distances Large number of users supported Flexible hardware setups Interaction depends on input device properties Intra/ Internet 28

Distributed Shared Scene Graph Shared Memory (SM): Multiple CPUs access the same memory Very simple and popular May need mutual exclusion (locks etc.) Distributed Shared Memory (DSM): SM on top of standard message passing Distributed Shared Scene Graph: DSM semantics added to a scene graph library 29

Symmetric Approach: Distributed Shared Scene Graph Goal: Distribution without programming Keep existing API intact Host 1 Host 2 App. explicit Sync. App. App. specific data Host 1 Host 2 App. implicit Sync. App. Scene Graph 30 Dual database (app, scene) Optimizations Distributed shared memory semantics Transparent distribution E.g.: Avango, Distributed Inventor (DIV)

Updates in DIV 2. Observer detects change due to notification 3. Network transmission of update Update: mynode-> myfield = 3 4.Receiver applies update Hashtable lookup of mynode 1. App makes update to myfield 31 mynode myfield=3 mynode myfield=3 Synchronisation protocol: - update field - create node - delete node + some more for for convenience...

Master DIV - Pipeline Slave Simulation code Scene Traversal Geometry Stage DIV Updates (sent by Rendering Engine!) Simulation code... Scene Traversal Geometry Stage Rasterization Rasterization Display Display 32

Long Distance Distribution Requirements for AR Applications Main Challenges: Robust application replication Reliable network communication over long distances: Networking Protocols (uni-/multicast) & Bandwidth considerations 33 3 Options: Input data: e.g. Tracking data of input devices Output data: e.g. Application content, Screen Intermediate data: High level metadata for regenerating correct application state

Long Distance Distribution - Example 3 Types of Data: Input data: e.g. Tracking data of input devices Tracking Middleware (e.g. OpenTracker, VRPN) For long distance: Use Unicast (UDP) instead of Multicast Output data / Application content Distributed Open Inventor (reliable TCP) Intermediate data: High level metadata for regenerating correct application state Construct3D: enhanced replication behavior Geometric objects not transmitted! Only high level state data 34

Example: Distribution - Results Platform independent (Windows, Linux) Long distance (Vienna - Graz) 2-6 machines, 5 app. instances Dynamic joining & leaving Hybrid networks possible (multicast UDP + TCP) 35 Educational evaluation 6 students (Sir Karl Popper school)