Virtual Environments: System Architectures Anthony Steed Simon Julier Department of Computer Science University College London

Slides:



Advertisements
Similar presentations
TU e technische universiteit eindhoven / department of mathematics and computer science Modeling User Input and Hypermedia Dynamics in Hera Databases and.
Advertisements

Executional Architecture
A Natural Interactive Game By Zak Wilson. Background This project was my second year group project at University and I have chosen it to present as it.
SDN Controller Challenges
Multimedia Synchronization Brian P. Bailey Spring 2006.
Programming Paradigms and languages
Asa MacWilliams Lehrstuhl für Angewandte Softwaretechnik Institut für Informatik Technische Universität München Dec Software.
Intro to Threading CS221 – 4/20/09. What we’ll cover today Finish the DOTS program Introduction to threads and multi-threading.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
Reference: Message Passing Fundamentals.
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
Graphical User Interface (GUI) Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
Underlying Technologies Part Two: Software Mark Green School of Creative Media.
Chapter 3.6 Game Architecture. 2 Overall Architecture The code for modern games is highly complex With code bases exceeding a million lines of code, a.
Computer-Based Animation. ● To animate something – to bring it to life ● Animation covers all changes that have visual effects – Positon (motion dynamic)
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Tiered architectures 1 to N tiers. 2 An architectural history of computing 1 tier architecture – monolithic Information Systems – Presentation / frontend,
Basic 3D Graphics Chapter 5. Bird’s Eye View  Basic 3D Graphics –Basic concepts of 3D graphics, rendering pipeline, Java 3D programming, scene graph,
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Games Development 2 Entity / Architecture Review CO3301 Week
Platforms for Learning in Computer Science July 28, 2005.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
The Gaia System Spring 2004: Gaia Larry Rudolph Not Invented Here Lots of Pervasive Computing Projects Carnegie Mellon Univ. U. Washington Georgia.
MVC pattern and implementation in java
Topics Introduction Hardware and Software How Computers Store Data
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
1.eCognition Overview. 1 eCognition eCognition is a knowledge utilisation platform based on Active Knowledge Network technology eCognition covers the.
Chapter 5: Spatial Cognition Slide Template. FRAMES OF REFERENCE.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Architecture styles Pipes and filters Object-oriented design Implicit invocation Layering Repositories.
© 2007 by Prentice Hall 1 Introduction to databases.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Styles.
(c) University of Washington08-1 CSC 143 Models and Views Reading: Ch. 18.
CSE 486/586 CSE 486/586 Distributed Systems Graph Processing Steve Ko Computer Sciences and Engineering University at Buffalo.
Yingcai Xiao Game Development Interactive Animation.
GENESIS OF VIRTUAL REALITY  The term ‘Virtual reality’ (VR) was initially coined by Jaron Lanier, founder of VPL Research (1989)..
Using Collaborative Interactive Objects and Animation to Enable Dynamic Interactions in Collaborative Virtual Environments Pieter Jorissen* Maarten Wijnants,
Games Development 2 Concurrent Programming CO3301 Week 9.
Distributed Galois Andrew Lenharth 2/27/2015. Goals An implementation of the operator formulation for distributed memory – Ideally forward-compatible.
Games Development 2 Review & Revision Strategy CO3301 End of Semester 1.
Grid-based Collaboration in Interactive Data Language Applications Minjun Wang Department of Electrical Engineering and Computer Science Syracuse University,
Model View Controller MVC Web Software Architecture.
Games Development Game Architecture: Entities CO2301 Games Development 1 Week 22.
Chapter 3.6 Game Architecture. 2 Overall Architecture The code for modern games is highly complex (can easily exceed 1M LOC) The larger your program,
A Few Things about Graphics Jian Huang Computer Science University of Tennessee.
HCI 입문 Graphics Korea University HCI System 2005 년 2 학기 김 창 헌.
Interface Opportunities for 3D Data and Media User Interface Software TechNote Panel Virginia Tech CS Fall 2002 Nicholas F. Polys Umur Yilmaz Will Lee.
1 Perception and VR MONT 104S, Fall 2008 Lecture 14 Introduction to Virtual Reality.
Visualization Four groups Design pattern for information visualization
ECE 526 – Network Processing Systems Design Programming Model Chapter 21: D. E. Comer.
Background Computer System Architectures Computer System Software.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Applications and Rendering pipeline
Sub-fields of computer science. Sub-fields of computer science.
Interactive Animation
MPEG-4 Binary Information for Scenes (BIFS)
Musical Instrument Virtual
Introduction to Visual Basic 2008 Programming
Games Development 2 semester 1 Review & Revision
Part 3 Design What does design mean in different fields?
Topics Introduction Hardware and Software How Computers Store Data
Analysis models and design models
Model, View, Controller design pattern
Games Development Game Architecture: Entities
Games Development 2 Entity / Architecture Review
Presentation transcript:

Virtual Environments: System Architectures Anthony Steed Simon Julier Department of Computer Science University College London

Overview Problem Statement & Requirements Data Representations (Contents) Execution Models (Dynamics) Latency

Reminder - VE is an Immersive, Mediated Communication Medium User Interface Devices Environment User Synthetic Environment Real Environment Mediated Medium

Ellis’s Content, Geometry, Dynamics Model Contents is data Dynamics is code or rules to change content Today we will look at common data and code representations

Sources and Sinks of Data Input “Data” –Data from trackers (e.g. 3D position plus 3D rotation for head and hand = 12D data) –Data from input devices (e.g. 2D joystick, buttons) –Possibly audio, haptic, physiological input Output “Data” –Displays systems, audio, video

Displays Have Different Requirements Video (N copies – for stereo and multiple screens) –Maintain copy of visual state –Render as fast as possible (~60Hz) –Synchronise with other renders Audio –Maintain copy of audio state –Render without glitches (requires fast interrupt) Haptics –Maintain copy of haptic data Render as fast as possible (~1000Hz)

“Under the Hood” of the Code We will find code modules for many different tasks: –Managing data and assets –Reading devices –Audio rendering –Video rendering –User input –Networking –Complex calculations such as physics (see seminar tomorrow!)

Overview Problem Statement & Requirements Data Representations (Contents) Execution Models (Dynamics) Latency

Graphs A graph consists of vertices and edges Vertices define the “state” information Edges define “relationships” Scene-graphs are directed and acyclic Arbitrary graphDirected graphDirected acyclic graph

Scene-graphs In a scene-graph, vertices are often called nodes –Store state information –Can include arbitrary property information All graphs have a root node which defines the base of the tree All other nodes divided into two types: –Group nodes –Leaf Nodes Root node Group nodes Leaf nodes

Group Nodes Group nodes have multiple nodes as children –Child nodes can be other group nodes or leaf nodes Applies common state information to multiple objects –State information propagates down the graph Examples include: –Transformations –Switch nodes –Effects Bump mapping, scribing, specular highlights –(In recent times) Shader programs

Examples (OpenSceneGraph) Anisotropic Lighting Scribing Cartoon Bumpmapping

Leaf Nodes Leaf nodes cannot have children State information relates to the appearance of specific objects Examples include: –Geometry –Image based rendering Billboards Impostors

Examples (OpenSceneGraph) ImpostorsBillboards

Overview Problem Statement & Requirements Data Representations (Contents) Execution Models (Dynamics) Latency

Dynamics These are the rules of interaction between the contents These can be: –Differential equations of Newtonian dynamics to describe kinematic and dynamic relationships –Grammatical rules for pattern-matched triggered actions Many different ways of doing this from imposing numerical approximations to Newtonian physics, through to plain old C++ / Java / XVR coding

Dynamics Representation Model Separate from the contents, how do we want to represent our dynamics? Its leads to quite critical computer science questions about the separation between code and data From a scene-authors point of view two basic models –Standalone process model –Within-scene-graph model

Implementing Dynamics as Standalone Processes Dynamics implemented as separate processes / threads Can change state of the graph in arbitrary ways –Change values of nodes –Add / remove nodes Dynamics

Problems of Standalone Treats scene-graph as a black-box, makes initial scene-creation very easy (load nodes in to scene- graph, changes a few fields on nodes) Composing scenes together, or instantiating existing objects is very hard End up with quite complicated code The code probably has variables in local scope which “should” be in the scene-graph Couples together rendering and animation to the same frame rate

Implementing Dynamics Within the Scene-Graph Fairly “autonomous” dynamics can be achieved by embedding dynamics within the scenegraph Animations are group nodes which apply state changes to their children Examples include: –Animation paths –Particle systems Animation Node Animated nodes

Example Animation and Particle System

Problems with Within-Scene-Graph Model Difficult to get all the code in there –e.g Difficult to write code that interfaces to other applications –Some valiant attempts such as VRML97/X3D Does provide for easy composition of scenes Different parts of the scene do need an explicit way of talking to each other –In VRML/X3D there are routes –In many other systems there is an event system Many systems provide a scripting language support –Python and Lua are very common

Execution Model Ties Everything Together So far we we’ve talked about a disparate set of systems: –A master environment –Separate representations for different output modes –User interfaces for controlling the environment The execution model “glues” all these parts together –Closely related to distributed systems as well

Execution Models Tying Things Together Example: –The position on an object is changed –The update needs to be reflected in: The master database The different scenegraphs Over the network (if connected) –How can all of this be coordinated? Two main models: –Kernel model –Actor model

Simple Kernel Model Treats a VR application like a traditional graphical application: while(true) { read_trackers(); set_body_position();//Changes scene graph do_animation(); //Changes scene graph render_left_eye(); render_right_eye(); render_sound(); poll_trackers(); }

do_animation After the user’s position is set by the read_trackers and set_body_position (see later in course) … … do_animation manipulates the scene As we have noted, is responsible for: –Animations, physics, interaction This is where the standalone or all the within-scene- graph dynamics are updated

Problems with Simple Kernel Model Everything happens in serial order Rendering only happens at a fixed rate, so if part of the animation slows down, the rendering slows down (very noticeable in many video games!) What if there are different output requirements such as haptics (1000Hz)? What if the input rates are much higher (e.g. 200Hz)

Modified Kernel Model (1) Has a fast loop which calls different functions at different frame rates: while(true) { fast_function(); if (elapsed>30ms) slow_function(); } fast_function() {read_trackers(), do_haptics();} slow_function() {render_left_eye();render_right_eye(); render_sound(); }

Modified Kernel Model (2) Uses a simple main loop, for the video rendering, but “background” threads for reading devices Main thread is very much like the Simple Kernel Model, but the function read_trackers and poll_trackers are now in a separate thread, and the main thread just copies information This is a good match to how operating systems actually schedule non-blocking input and output

Pros / Cons of the Kernel Model Advantages: –Simple to understand –Application programmer keeps their own data structures within the loop Disadvantages: –Implementation needs care because of different update rates –Usually requires some awareness of parallel programming issues –Lots of complexity ends up in the do_animation() method

Actor Model Virtual environment is realised by a set of collaborating asynchronous processes (actors) Actors send messages to one another Processes share a common database Database is a central repository of the scene graph Database Audio Video1 Video2 Tracking Speech Collision Application

Setting Object State Using in the Actor Model Setting the object state is often achieved using the subject-observer design pattern The object in the database is the subject Different renderers / networking systems are the observers When the subject’s state is updated, the observers are automatically notified

Pros / Cons of the Actor Model Advantages: –Application program does not care about distribution / what rendering systems used –Update rates are locally very good –Scales well to multiple cores Disadvantages: –Difficult to code efficiently –Difficult to query between code modules in different actors, needs very clear separation of responsibilities –End to end latency difficult to control (see next section)

Overview Problem Statement & Requirements Data Representations Execution Models Latency

End-to-End Latency Total time from head movement to scene movement Mine, Mark (1993). Characterization of End-to-End Delays in Head-Mounted Display Systems, UNC Chapel Hill Computer Science Technical Report TR

End-to-end latency

Problems Single process For the main CPU, tracker processing is actually mostly just “waiting”, could schedule something else IF and only IF (IFF) we know how long it will take –Previously we did poll and read separately If there are multiple video streams, we could do them in parallel IFF rendering changes no state in the scene graph (depending on your scene graph this isn’t a good bet!)

Example Timing Problem AnimateRenderAnimateRender T 0 = tracker poll T 1 = video output AnimateRenderAnimateRender T 0 = tracker poll T 1 = video output Ideal case Worst case

Summary Representing the environment is difficult The representation has to be rich enough to capture the contents, geometry and dynamics Each display mode requires its own form of the environment to optimise the display Want to make content as rich as possible to support dynamic models Otherwise behaviour is expressed only in code. At run-time there are logically concurrent processes (rendering, collision, audio etc…) Execution models need to reflect this concurrency