Development of Simulation and Virtual Reality CM30008-2 Module Leader: Mr Bob Hobbs, Room K210, email: R.G.Hobbs@staffs.ac.uk Overall View of the Module This module is a pre-requisite for the 3rd year module Implementation of Simulation and Virtual Reality module. The module is essentially split into two sessions. Semester one: Delivered in the silicon graphics laboratory K103 Concentrates on graphics aspects of Virtual Reality and factors relating behavioural elements involved in Virtual Reality environments Implements raw 3D graphics handling using openGL and the 'c' programming language Semester two: Delivered in the engineering facility Concentrates on simulation and factors relating to VR peripherals Looks at engineering principles underpinning the use of VR and simulation hardware. Each week’s lecture will introduce new material that is reviewed, extended, discussed and applied to simple problems in weekly tutorials. The practical sessions will provide you with an opportunity to implement solutions and develop your practical skills. The tutorial sessions should be highly active. Practical Development Environment (Semester one) Operating System: Editor: Development Language: Development Environment: IRIX (sgi version of unix) nedit or eMacs ANSI C using OpenGL Silicon graphics Octane 2 workstations Practical Development Environment (Semester two) Operating System: Development Environment: Windows 2000 WorldUp VR simulation development kit Class Contact This module comprises two hours of class contact per week. You should attend one lecture and one tutorial session per week. Lectures You should attend one lecture per week. Tutorials You should attend one tutorial per week. In semester two the lecture and practical session will be delivered in one two hour slot. Teaching Team TUTOR NAME TIMETABLED FOR ROOM EMAIL Mr. Bob Hobbs (Module Leader) 6 weeks lectures plus Tutorial/practical sessions K210 R.G.Hobbs@staffs.ac.uk SDC Module Handbook Page 1 25 Jan. 02 Dr. Len Noriega 6 weeks lectures plus Tutorial/practical sessions K3 L.A.Noriega@staffs.ac.uk Mr. Sam Wane 12 weeks lectures plus Tutorial/practical sessions D107 S.O.Wane@staffs.ac.uk Credits There are 20 credits for this award Learning Hours Contact Hours 48 Total Learning Hours 160 Independent Study Hours 112 Indicative Content Concepts involved in nodes, splines and other modelling geometry Rendering and surface texturing effects Introduction to creation of VR objects using JAVA,C or C++ libraries in a suitable programming environment Concepts of behaviour of VR objects in a virtual world e.g. AI agents Examination and appraisal of current VR and simulation projects and practices Operation and application of transducers used in VR Simulation systems such as touch sensors, microphones, loudspeakers, stepper motors, servo motors, gearboxes, drives and pivots and hydraulic arms Learning Strategies The normal pattern of delivery will be one lecture and one practical session per week. In the lectures you will be taught about the principles of feedback and control in virtual reality and simulation. In the supervised practical sessions you will be able to learn how to practice what you were taught in the lectures by asking questions of the tutor as well as practical applications using appropriate software. During your independent learning sessions, you will complete work given to do during the lectures and practical sessions. This work will serve to enhance your understanding of the subject matter. Learning Outcomes Which Will Be Assessed By 1. Create virtual worlds 2. Create interactive learning and modelling spaces which incorporate intelligent behaviour 3. Understand the relationship between mathematical concepts and generation of VR objects (using headsets etc.) 4. Demonstrate awareness of concepts of operation and application of external components in VR 5. Create simple projects using OO programming languages utilising relevant libraries 6. Create processes which reflect inward and outward control of devices re: mechanical, optical and acoustic systems in VR and Simulation environments SDC Module Handbook Page 2 50% in course assessment by means of a series of practical assignments including a logbook (25%) (learning outcomes 1,2,5,6) A written report (25%) (learning outcomes 3,4) A written long and short answer exam (50%) (learning outcomes 1,2,3,4) 25 Jan. 02 Lecture Schedule Week Lecture Content Lecturer Room Tutorial Room Semester One 1. Introduction to Module RH K103 Introduction to openGL and Glut toolkit Construction of Polyhedra Rotating, scaling and translation Creating composite models. Lighting nodes in tree manipulation Collision detection and bounce back. Friction on an inclined plane. Simple levers and pivots Goal setting Using and viewing VEs through HMDs. Use of space mice and digitisers Use of head tracking to interact with VE Mapping images to HMD display Assignment work Assignment work K103 2. 3. Graphics Concepts Concepts of Image Manipulation LAN LAN K103 K103 4. Concept of Scene Graph and Simulation LAN Loop K103 5. Underlying Physics RH K103 6. 7. 8. Kinematics and Biomechanics AI agents in VEs Trade-off realism v Real-Time LAN LAN RH K103 K103 K103 9. Tracking and Feedback mechanisms RH K103 10. HCI for virtual Environments RH K103 11. Assignment Surgery 12. Recap and Revision Semester Two 13. Behaviour in Virtual environments 14. Concepts of Tracking Systems RH & LAN K103 RH & LAN K103 K103 K103 K103 K103 G01A&B Hydraulic rams, step motors and stewart platform G01A&B SW G01A&B Further work with Hydraulics, G01A&B step motors and stewart platform SW SW ,RH & LAN SW, RH & LAN G01A&B Assignment work G01A&B Assignment work G01A&B G01A&B G01A&B Assignment work G01A&B 16. Primary Feedback mechanisms SW 17. Secondary Feedback mechanisms SW 18. SW 22. 23. Study of example simulation system employing a virtual environment Mechanical system components used to manage input and output from a simulation system Overview of control systems used to interface between VEs and mechanical devices Critical constraints in mechanical systems Methods used to dampen or amplify mechanical input to or feedback from mechanical devices Assignment Surgery Assignment Surgery 24. Recap and Revision SDC Module Handbook K103 K103 K103 SW SW 21. K103 G01A&B G01A&B Mapping behaviour to tracking 20. K103 G01A&B Intro to World Up G01A&B Creating virtual worlds using world up G01A&B Using tracking device as input mechanism G01A&B Programming user interaction to generate simple (visual) feedback G01A&B Inter-object interaction within a VE G01A&B Programming secondary behaviour G01A&B Joints and linkages SW SW 15. 19. K103 K103 SW Page 3 G01A&B G01A&B G01A&B G01A&B G01A&B 25 Jan. 02 Recommended Texts Modern Control Technology Christopher T. Kilian West Publishing 1996 ; ISBN 0-314-06631-4 Al Agents in Virtual Reality Worlds : Programming Intelligent VR in C++ by Mark Watson John Wiley & Sons; ISBN: 0471127086 Force and Touch Feedback for Virtual Reality Grigore C. Burdea John Wiley & Sons; ISBN: 0471021415 Simulation Modelling and Analysis Averill M.Law, W.David Kelton McGraw-Hill College Division; ISBN 0070366985 Assessment This module is assessed by 50% coursework consisting of two individual assignments assignment 1 which must be demonstrated to your tutor as part of the assessment. The second assignment is to be ‘formally’ submitted in a blue folder, as per the School of Computing’s assignment submission process, following the guidelines and requirements stated in the assignment specifications. The remaining 50% is to be assessed by a long and short answer exam which will be sat under exam conditions under the university invigilation policy. Assignment 1 Assessment Weighting: 25% Format: Hand-out Date: Hand-in Date: Practical assignment Hardcopy distributed during the lecture of week 4 End of week 12. Demonstration to be given during week 12. Failure to demo will result in zero marks for whole assignment Assignment 2 Assessment Weighting: 25% Format: Hand-out Date: Hand-in Date: Written report Hardcopy issued at start of semester two (date to be decided) End of week 24. Exam Assessment Weighting: 50% Long and short answer exam duration 2 hours. Date and time to be confirmed. SDC Module Handbook Page 4 25 Jan. 02 Research and reading guidance for study time What is Simulation? Definition Simulation is the process of designing a model of a real system and conducting experiments with this model for the purpose of either understanding the behaviour of the system or of evaluating various strategies for the operation of the system. ADVANTAGES Simulation games simplify complex experiences making them easier to understand. Because the game is not "real" players can practice behaviors which they might be reluctant to try under normal circumstances. Time is compressed; therefore players get feedback on their decisions quickly and can see the relationship of events more clearly than in real life. The games are fun. They are a great way to break up lectures. They involve more participation than most learning techniques. They stimulate discussion. They can be used for problem solving, evaluation, information, analysis, verbal and interpersonal skill development and conflict resolution. They allow players to see themselves and others under different conditions. DISADVANTAGES Because simulation games are associated with "play" they are often not taken seriously. Players may reject game experiences as "just a game." Sometimes the game may excessively simplify a complex experience and therefore "distort" reality. If the game is not well designed it may confuse players and cause frustration. To use simulation games for educational purposes requires different skills on the part of the educator. Examples of simulation use Simulations are the products that result when one creates the appearance or effect of something else. Games are contests in which both players and opponents operate under rules to gain a specified objective. (Cruickshank, 1980, p. 75 ). Life The program called ‘LIFE’ developed by mathematician John Conway in the 1960’s. Shows how simple rules can create order out of chaos. Life rules: 1. If a cell has 1 or no neighbours, it dies. (loneliness) 2. If a cell has 4 or more neighbours it dies. (overcrowding) 3. A cell is born in an empty square that has exactly 3 neighbours. SHOW EXAMPLE OF LIFE ON COMPUTER http://cgi.student.nada.kth.se/cgi-bin/d95-aeh/get/lifeeng Robotwar Another simulation ‘Robotwar’ developed by Silas Warner at Muse Software in Baltimore. This is a programming game for Unix where robots are programmed with different behavious by people and set agains each other in an arena over the network. http://www.lysator.liu.se/realtimebattle/Main.html Windows version http://www.robotbattle.com/home.html Why use simulation? Practise runs (surgery, controlling submarine) Test theories without damage. Observe more data (strains, stress on points), colour code items (surgery) GAMES Computer packages available for simulation Working model 2D & 3D SDC Module Handbook Page 5 25 Jan. 02 Write own simulation (BASIC, MATLAB, C, JAVA ….) How a simulation is built Simulation uses a simplified representation, or model. Model A model is the essential components of the features we are simulating. It is likened to a caricature of the environment where the main features are detailed at the expense of the others using a selective process to reduce computing overheads. Superfluous details must be stripped to speed up simulations e.g. no good having a weather predicting program using models of pollutants, moisture and air mass if it takes 28 hours to run. William of Occam, a 14th English philosopher decreed that ‘Things should not be multiplied without good reason’, i.e. eliminate unnecessary detail. This is known as Occams razor. A model may be physical, mental, mathematical, computer, or a combination. Children playing house, wind tunnels, wave tanks. Mathematicians spent years in the 16th C iterating calculations to create navigation tables. Models may be of physical science, social science, economics. WORLD3 models the relation between population, pollution, resources and growth. SIMCITY Typical Steps in Building an Exploratory Simulation of a Complex System Simplify the problem as much as possible while keeping what is essential. Write program which simulates many components following simple rules with specified interactions and randomising elements. Run program many times with different random number seeds, collecting data and statistics from the different runs. Attempt to understand how the simple rules gave rise to the observed behaviour. Perform parameter changes and "lesions" on the program to locate the sources of behaviour and the effects of different parameters. Simplify the simulation even further if possible, or add additional elements that were found to be necessary. Design, test, implement, validate (techniques) What is Virtual Reality? emulating the real world making an electronic world seem real Being able to interact with the electronic representation moving within the world manipulating objects in the world How do we create virtual reality? 3D graphics Stereo projection Use of variety of senses Feedback Introduction to computer graphics Static image display, pixels, lines to points. Perspective. Overlap, foreground to background. SDC Module Handbook Page 6 25 Jan. 02 Web links http://www.swcollege.com/marketing/gitm/gitm16-6.html - notes on games for business tutoring http://www.cofc.edu/~seay/cb/simgames.html – includes notes on applications to education http://nasaga.org/resources/horngames.htm – simulations of various models mainly from history http://www.ncsa.uiuc.edu/Cyberia/Expo/ve_nav.html - virtual reality resource centre DOF (degrees of freedom) The 2D graph Progression from number line. Use in 2D plotters. Show how a point can be moved to a location. Centre reference of object, how to move 2D object to a point on the graph. 2D matrices Introduce matrices for 2D positioning. Translation using matrices How matrices can be coupled to describe an object position, perspective and translation. The 3D graph Show using 3D xyz co-ordinate system physical model Program to move object to coords. 3D matrices Introduce matrices for 3D positioning Surge, sway, heave Introduce matrices for x,y,z motion. Headsets Types of headsets and how the 3D image is produced. Quality of image. Tracking Systems Fast track How head tracking works (Hall effect sensors, accelerometers), relate to 6DOF Optical and electromagnetic tracking systems. How are tracking systems callibrated and mapped to the virtual environment? Gauntlets and space mice How gauntlet detects position of fingers (fiber-optics) Gauntlet positioning (same as headsets) Use of space mouse in Working Model or Fast Track Haptic devices Force Feedback Tactile sensation Joints and linkages The joints on the 2D version of working model pierce all overlapping components. These joints permit various degrees of freedom. Movements allowed are rotation or sliding. Types of joints Rigid Pin Slot joint Keyed slot joint Curved slot joint Closed curved slot joint Ball (restrictions) SDC Module Handbook Page 7 25 Jan. 02 Universal Clevis Forward kinematics How graphical models are displayed (FK) Robot arm. Modelling using FK, geometric solution. 2D rotation using matrices How to rotate an object using matrices. Building a model using successive matrices (FK) Robot arm in 2D 3D rotation using matrices Roll, pitch, yaw Robot arm with waist. 3D cube and how 8 points reference it. Centre of gravity Centre of gravity? How matrices can be used to calculate the centre of gravity. How do we translate the kinematics into digital inputs/outputs for Virtual Environments? How do we smooth, amplify or control the interfacing between internal representation and external components of a virtual reality system? Intelligent Behaviour AI agents Knowledge Acquisition How do we design systems to learn behaviour and allow elements of the system to behave intelligently with respect to other objects in the system? SDC Module Handbook Page 8 25 Jan. 02