Development of Simulation and - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Development of Simulation and

Description:

Dog. Xform. T1. Group 'Dog' Group 'Lampost' Light. Root. 10/26 ... Entertainment (computer games, movie' special effects, ...) Human computer interaction (GUI, ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 27
Provided by: claudecch
Category:
Tags: cat | development | dog | draw | games | how | simulation | to

less

Transcript and Presenter's Notes

Title: Development of Simulation and


1
Development of Simulation and Virtual
Reality CM30008-2
School of Computing Staffordshire University
Introduction to Development of Simulation and
Virtual Reality
Bob Hobbs
2
Outline
  • Module Details
  • What is VR programming?
  • Typical Processing Steps
  • Modelling and Rendering
  • Applications
  • Summary

3
Module Details
  • Teaching Team
  • Bob Hobbs r.g.hobbs_at_staffs.ac.uk
  • Dr. Len Noriega l.a.noriega_at_staffs.ac.uk
  • Sam Wane s.o.wane_at_staffs.ac.uk
  • 2 Semesters 20 cats
  • 2 Hours per week
  • Semester 1 SoC
  • Semester 2 SEAT

4
Module Details
  • Course Handbook Lecture Notes
  • http//www.soc.staffs.ac.uk/cmtrgh
  • Assignment Details
  • 25 Assignment 1 - practical
  • 25 Assignment 2 Report
  • 50 Exam

5
Hierarchy of Models
Behaviour
Bio-Mechanics
Physics
Geometry
6
How does this work ?
  • Simulation Loop
  • read input sensors
  • update objects
  • render scene in display
  • Uses traditional 3D graphics methods to render or
    draw the scene

7
Simulation Loop
Read Sensors
Check any defined actions
Update objects with sensor input
Objects perform tasks
Step along any defined paths
Render universe
8
Introducing OpenGL
  • Graphics basics
  • Transform geometry (object ?world, world ?eye)
  • Apply perspective projection (eye ?screen)
  • Clip to the view frustum
  • Perform visible-surface processing (Z-buffer)
  • Calculate surface lighting etc.
  • Implementing all this is a lot of work (surprise)
  • OpenGL provides a standard implementation
  • So why study the basics?

9
OpenGL Design Goals
  • SGIs design goals for OpenGL
  • Hardware independence without sacrificing
    performance
  • Natural, concise API with some built-in
    extensibility
  • OpenGL has become a standard because
  • It doesnt try to do too much
  • Only renders the image, doesnt manage windows,
    etc.
  • No high-level animation, modeling, sound (!),
    etc.
  • It does enough
  • Useful rendering effects high performance
  • It is promoted by SGI ( Microsoft,
    half-heartedly)

10
OpenGL Conventions
  • Functions in OpenGL start with gl
  • Functions starting with glu are utility functions
    (i.e., gluLookAt())
  • Functions starting with glx are for interfacing
    with the X Windows system (i.e., in gfx.c)
  • Function names indicate argument type/
  • Functions ending with f take floats
  • Functions ending with i take ints, functions that
    end with v take an array, with b take byte, etc.
  • Ex glColor3f() takes 3 floats, but glColor4fv()
    takes an array of 4 floats

11
OpenGL Specifying Geometry
  • Geometry in OpenGL consists of a list of vertices
    in between calls to glBegin() and glEnd()
  • A simple example telling GL to render a triangle
  • glBegin(GL_POLYGON)
  • glVertex3f(x1, y1, z1)
  • glVertex3f(x2, y2, z2)
  • glVertex3f(x3, y3, z3)
  • glEnd()
  • Usage glBegin(geomtype) where geomtype is
  • Points, lines, polygons, triangles,
    quadrilaterals, etc...

12
What is 3D rendering?
Generally deals with graphical display of 3D
objects as seen by viewer
13
What is 3D Computer Graphics?
  • 3D graphics generation of graphical display
    (rendering) of 3D object(s) from specification
    (model(s))

Modelling
14
Typical Processing Steps
Wireframe polygonal model
Solid object
15
Typical Processing Steps
Modelling numerical description of scene
objects, illumination, and viewer
Rendering operations that produce view of scene
projected onto view surface
16
Modelling
1438 facets
Human Head Model
17
Modelling
7258 facets
Human Head Model
18
Modelling
2074 facets
Teacher and Board Model
19
Rendering
1438 facets
Shaded Human Head
20
Rendering
7258 facets
Shaded Human Head
21
Rendering
Shaded Teacher and Board
22
Scene Graphs
  • In VR programming the structure used is a scene
    graph which is special tree structure designed to
    store information about a scene.
  • Typical elements include
  • geometries
  • positional information
  • lights
  • fog

23
Simple scene graph
Root node
Fog node
Light node
Group node
Geom node
Xform node
24
Scene Graph Nodes
  • Content Nodes
  • contain basic elements of a scene
  • geometry
  • light
  • position
  • fog
  • Group Nodes
  • no content
  • link the hierarchy
  • allow grouping of nodes sharing a common state

Parent
Child 1
Child 2
25
Example Hierarchy
Group Lampost
26
Applications
  • VR programming is used in many applications, e.g.
  • Entertainment (computer games, movie special
    effects, ...)
  • Human computer interaction (GUI, ...)
  • Science, education, medicine (visualisation )
  • Business (marketing, ...)
  • Art

27
Summary
  • Simulation consists of a series of scenes
  • Objects defined as Scenes in a scene graph which
    may be one object or a related collection of
    objects
  • Each iteration of the simulation loop determines
    actions, translations(along paths) and other
    inputs which affect properties of the objects
  • NOT animation !!!
  • The world is redrawn using rendering process
Write a Comment
User Comments (0)
About PowerShow.com