1 / 97

Virtual Reality over the Internet 2001

Virtual Reality over the Internet 2001. Supervisor: Dr. Wenping Wang Second Examiner: Dr. C.L. Wang Group members: Chan Hing Sun, Sun Hui Pui Fan, Martha Siu Chi Man, Siu Wong Wai Kwan, Jimmy. Introduction - Presented by Martha. Introduction – Objectives.

moesha
Download Presentation

Virtual Reality over the Internet 2001

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Virtual Reality over the Internet 2001 • Supervisor: Dr. Wenping Wang • Second Examiner: Dr. C.L. Wang • Group members: Chan Hing Sun, Sun Hui Pui Fan, Martha Siu Chi Man, Siu Wong Wai Kwan, Jimmy

  2. Introduction - Presented by Martha

  3. Introduction – Objectives • Objectives of the project: • Implement a 3D Chess Game over the Internet • Learn how to design, develop & deliver a system • Learn about 3D graphics & knowledge required for project • Fundamental requirements: • 3D Studio Max • MFC • OpenGL

  4. Introduction – The Game • Title of the Game: King of the Forest • Game Environment: • Forest, River, etc • Main Characters: • 8 kinds of animals in the forest • Elephant, Lion, Tiger, Fox, Dog, Cat, etc

  5. Introduction – Division of Labor • Modeling: Sun & Martha • Parser: Siu • OpenGL Display: Jimmy • GUI: Martha & Jimmy • Sound & Animation: Sun • Commun Engine: Sun & Siu

  6. Introduction – Presentation Outline • Architecture • Modeling • Parser • OpenGL Display • Progress Evaluation & Planning • Graphical User Interface • Sound & Animation • Communication Engine • Game Logic

  7. Architecture - Presented by Martha

  8. Architecture Game Engine User Parser GUI Game Display Engine Sound & Animation Communication Engine Server

  9. Modeling - Presented by Sun

  10. Modeling - Introduction • Modeling is the part to make the 3D models for the game • 3 types of model: • 3D animal models in the game • The environment of the forest • The weapon model

  11. Modeling - Tool • Discreet 3D Max Studio 4.2 (the newest version) • Why? • common • Better for a beginner to learn

  12. Modeling – Animal models • Simulating a real game • Keep the original animals of the game • Totally 8 animals • Elephant

  13. Modeling – Animal Models • Lion, tiger, panther, fox • Dog, cat and mouse

  14. Modeling – Scene Objects • Create a scene similar to the board • Many components that found in the forest • tree, mushroom • Bridge and hole

  15. Modeling – Scene Objects • Combining all the scene objects:

  16. Modeling – Scene Objects • Combining the scene with the animal models

  17. Modeling – weapon models • Create 5 different weapons • stick, sword, gun, knife and hammer

  18. Modeling - Technique • create a model, consider 2 things • its funny and interesting • simplicity • Funny • increase user’s interest • Simplicity • complexity of each model would relate to the game speed • due to the readability of the Parser

  19. Modeling - Technique • Created two versions of the models • First version • The speed for loading into Parser is quite long • Second version • exists commonality between each model • their bodies, hands and legs are the same and the objects are primitive • increase the speed for readability of the parser.

  20. Modeling - Technique First version Second version

  21. Modeling - Integration • The parser need to read in the file in vrml format • Export each object from 3d max (.max) to vrml file (.wrl).

  22. Modeling – Improvement & difficulties • Efficiency of the parser to read each object is still long for second version of model. • Improve the quality of the model still • finding the commonality for each model • Modifying export format for each 3d max model • redrawing the model with some better primitive objects.

  23. Parser - Presented by Siu

  24. Parser – Reason for using parser Why should we use the parser? • Difficult to render attractive 3D models • Efficient way to break down models • Easy to trace the nodes of the models

  25. Parser – Role of parser • Transformation of VRML file into C++ recognizable data format. • Bridge between 3D models and OPENGL rendering process

  26. Parser – Flow of the rendering process VRML files Parser 3D Studio Parser objects Object Collect C++ recognizable data format Display Engine Display

  27. Parser – Structure design • Class which parses and stores VRML nodes and properties • Based on VRML 2.0 hierarchical structure • Create an object tree

  28. Parser – Structure component Main Component: • SceneGraph Class • IO manipulation • Whole output data structure • Node Class • Root Node • Children Node • Non-children Node • etc

  29. Parser – Structure hierarchy SceneGraph Root Node Root Node Grouping Node Grouping Node Children Node Non-Children Node Grouping Node Children Node Non-Children Node

  30. Parser – Example • Root Node • DEF Node • Children Node • Shape Node • Non-children Node • Material Node • Appearance Node • Geometry Node

  31. Parser – Implementation Approach • Object-Oriented Approach • Ready to be used in several place • High cohesion • Each node has its separate class to represent its properties • Low coupling • Class is provided API to facilitate its function

  32. Parser – Implementation • Classes written in C++ • Integrate into Visual C++ 6.0 Project • Tokenizer • Use of flex and bison functions in Unix • Help analysis input and pattern matching

  33. Parser – Mechanism • Read a VRML 2.0 file • Tokenize the VRML file into token • Store the data if the token is valid • Drop the data if the token is invalid • Output a C++ recognizable data structure

  34. Parser – Difficulties and limitation • Suitable for parsing primitive objects • Long Processing time when parsing lots of complex objects • High performance computer should be used

  35. Parser – Improvement • Reduce VRML file size • Using primitive objects • Good design of game flow • Reuse parsed objects • CPU processing is much faster than IO processing • Adding animation information in the object data file

  36. Game Engine - Presented by Jimmy

  37. Game Engine - Outline • Components • Scene Rendering • Game Flow • Event Handling • Improvements

  38. Components - 3D Objects • Inherits from CObject class in MFC • A class for all the 3D objects - Characters - Background Objects (e.g. ground, river, sky…)

  39. Components - 3D Objects • An 3D Object contains: - Location - Transformation - Power attributes (for characters only)

  40. Components - Hierarchy of 3D objects CObject 3D Object Characters Background

  41. Components - Camera • Defines the users’ point of view in the game • The Camera class contains: - Eyes location of the user - Targeting point

  42. Components - Players • Define a player status in the game • A player class contains: - The “animals” remaining in the “forest” - Win/Lose

  43. Components - Scene • Model a virtual reality environment (the game environment) • Contains a list of 3D objects

  44. Components - Game Display Engine • Initialize the OpenGL context for drawing • Initialize the lighting of the scene • Define the viewport

  45. Scene Rendering • 3D objects in the scene are stored in a list • Transformation is applied to the 3D objects • The game engine will call the object collection to render the 3D objects

  46. Scene Rendering Object Collection Store all imported 3D objects Object List A list of objects to form a 3D objects Object Primitive objects, e.g. sphere, box….

  47. Game Flow Program start Server Setting Connect to server Game start Quit game Game end

  48. Event Handling • Handling user input event • Use arrows to move the view point • Use the left mouse click to select an animal (to move that animal) • User can trigger a dialog box to chat with the opponent

  49. Improvements • Texture mapping of the background objects • Shorten the time to initialize the program • Smooth moving when user changing the view point

  50. Progress & Planning - Presented by Martha

More Related