Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sep 30, 20051 I3I3DG&VR CE00539-m Interactive 3D Graphics and Virtual Reality Bob Hobbs Faculty of Computing, Engineering and Technology Staffordshire.

Similar presentations


Presentation on theme: "Sep 30, 20051 I3I3DG&VR CE00539-m Interactive 3D Graphics and Virtual Reality Bob Hobbs Faculty of Computing, Engineering and Technology Staffordshire."— Presentation transcript:

1 Sep 30, 20051 I3I3DG&VR CE00539-m Interactive 3D Graphics and Virtual Reality Bob Hobbs Faculty of Computing, Engineering and Technology Staffordshire University

2 Sep 30, 20052 Outline Module Details Module Details What is 3D programming? What is 3D programming? Typical Processing Steps Typical Processing Steps Modelling and Rendering Modelling and Rendering Applications Applications Summary Summary

3 Sep 30, 20053 Module Details Teaching Team Teaching Team –Bob Hobbsr.g.hobbs@staffs.ac.uk r.g.hobbs@staffs.ac.uk –Dr. Len Noriega l.a.noriega@staffs.ac.uk l.a.noriega@staffs.ac.uk Semester 215 cats Semester 215 cats 4 Hours per week 4 Hours per week –2 Hours Lecture Tues 2pm (C321) & Tue 4pm (BLUE) –2 Hours Practical Monday 1pm-3pm (K106)

4 Sep 30, 20054 Module Details Course Handbook & Lecture Notes http://www.soc.staffs.ac.uk/rgh1 http://www.soc.staffs.ac.uk/rgh1 http://www.soc.staffs.ac.uk/rgh Assignment Details 50% assignment work 50% assignment work 50% two hour exam 50% two hour exam

5 Sep 30, 20055 Program of Study Week 01 RGH Introduction, OpenGL and general 3D concepts Week 01 RGH Introduction, OpenGL and general 3D concepts Week 02 RGH Virtual Reality Concepts, Semantic cues and HCI Week 02 RGH Virtual Reality Concepts, Semantic cues and HCI Week 03 LANLighting, Shading and Texturing Week 03 LANLighting, Shading and Texturing Week 04 LAN Physics and Collision Detection Week 04 LAN Physics and Collision Detection Week 05 LAN Matrix Operations for Mechanics Week 05 LAN Matrix Operations for Mechanics Week 06 LAN Cognitive Agents and AI concepts Week 06 LAN Cognitive Agents and AI concepts Week 07 RGH Interaction Metaphors, Immersion and Presence Week 07 RGH Interaction Metaphors, Immersion and Presence Week 08 RGH Human movement, Bio-Mechanics and Kinematics Week 08 RGH Human movement, Bio-Mechanics and Kinematics Week 09 LAN Quaternion Operations for Mechanics Week 09 LAN Quaternion Operations for Mechanics Week 10 RGHQuaternion Operations for Mechanics II Week 10 RGHQuaternion Operations for Mechanics II Week 11 BOTH Assignment surgery Week 11 BOTH Assignment surgery Week 12 BOTH Assessment demo in exam week Week 12 BOTH Assessment demo in exam week

6 Sep 30, 20056 Hierarchy of Models Geometry Physics Bio-Mechanics Behaviour

7 Sep 30, 20057 How does this work ? Simulation Loop Simulation Loop –read input sensors –update objects –render scene in display Uses traditional 3D graphics methods to render or ‘draw’ the scene Uses traditional 3D graphics methods to render or ‘draw’ the scene

8 Sep 30, 20058 Simulation Loop Check any defined actions Read Sensors Update objects with sensor input Objects perform tasks Step along any defined paths Render universe

9 Sep 30, 20059 Introducing OpenGL Graphics basics: 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) Implementing all this is a lot of work (surprise) OpenGL provides a standard implementation OpenGL provides a standard implementation

10 Sep 30, 200510 OpenGL Design Goals SGI’s design goals for OpenGL: SGI’s design goals for OpenGL: –Hardware independence without sacrificing performance –Natural, concise API with some built-in extensibility OpenGL has become a standard because: OpenGL has become a standard because: –It doesn’t try to do too much Only renders the image, doesn’t manage windows, etc. Only renders the image, doesn’t manage windows, etc. No high-level animation, modeling, sound (!), etc. No high-level animation, modeling, sound (!), etc. –It does enough Useful rendering effects + high performance Useful rendering effects + high performance –It is promoted by SGI (& Microsoft, half-heartedly)

11 Sep 30, 200511 OpenGL: Conventions Functions in OpenGL start with gl 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/# 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

12 Sep 30, 200512 OpenGL: Specifying Geometry Geometry in OpenGL consists of a list of vertices in between calls to glBegin() and glEnd() 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... Points, lines, polygons, triangles, quadrilaterals, etc...

13 Sep 30, 200513 What is 3D rendering? Object Viewer Generally deals with graphical display of 3D objects as seen by viewer Synthetic image will vary according to: viewing direction, viewer position, illumination, object properties,... Projection onto 2D surface

14 Sep 30, 200514 What is 3D Computer Graphics? 3D graphics: generation of graphical display (rendering) of 3D object(s) from specification (model(s)) 3D graphics: generation of graphical display (rendering) of 3D object(s) from specification (model(s)) Specification Modelling Graphical display Rendering such as

15 Sep 30, 200515 Wireframe polygonal modelSolid object Vertices Viewpoint Typical Processing Steps Facets Transformation Hidden surface removal Light source Shading

16 Sep 30, 200516 Object model(s) Illumination model Viewing and projection specification Graphics engine Graphical display Rendering: operations that produce view of scene projected onto view surface Modelling: numerical description of scene objects, illumination, and viewer Typical Processing Steps

17 Sep 30, 200517 Modelling Human Head Model 1438 facets

18 Sep 30, 200518 Modelling Human Head Model 7258 facets

19 Sep 30, 200519 Modelling Teacher and Board Model 2074 facets

20 Sep 30, 200520 Rendering Shaded Human Head 1438 facets

21 Sep 30, 200521 Rendering Shaded Human Head 7258 facets

22 Sep 30, 200522 Rendering Shaded Teacher and Board

23 Sep 30, 200523 Scene Graphs In VR programming the structure used is a scene graph which is special tree structure designed to store information about a scene. 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 Typical elements include –geometries –positional information –lights –fog

24 Sep 30, 200524 Simple scene graph Fog node Light node Root node Group node Xform node Geom node

25 Sep 30, 200525 Scene Graph Nodes Content Nodes Content Nodes –contain basic elements of a scene geometry geometry light light position position fog fog Group Nodes Group Nodes –no content –link the hierarchy –allow grouping of nodes sharing a common state Parent Child #1 Parent Child #2

26 Sep 30, 200526 Example Hierarchy Geom Lampost Xform T2 Geom Dog Xform T1 Group “Dog” Group “Lampost” Light Root

27 Sep 30, 200527 Applications VR programming is used in many applications, e.g. 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

28 Sep 30, 200528 Summary Simulation consists of a series of scenes 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 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 Each iteration of the simulation loop determines actions, translations(along paths) and other inputs which affect properties of the objects NOT animation !!! NOT animation !!! The world is redrawn using rendering process The world is redrawn using rendering process


Download ppt "Sep 30, 20051 I3I3DG&VR CE00539-m Interactive 3D Graphics and Virtual Reality Bob Hobbs Faculty of Computing, Engineering and Technology Staffordshire."

Similar presentations


Ads by Google