1 / 18

Exploration of a 3-D Environment

By Zachary Greer. Exploration of a 3-D Environment. Here's what it is. Introduction. Abstract. Allows user to explore 3-dimensional world First person Mouse and keyboard input Fog and Lighting. Inspirations. Proximity-based chat system First employed in first-person shooters

kostya
Download Presentation

Exploration of a 3-D Environment

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. By Zachary Greer Exploration of a 3-D Environment

  2. Here's what it is. Introduction

  3. Abstract • Allows user to explore 3-dimensional world • First person • Mouse and keyboard input • Fog and Lighting

  4. Inspirations • Proximity-based chat system • First employed in first-person shooters • Enhanced social element greatly (realism, intuitiveness) • Could be used for just a chat client • Could also be used for other teamwork activities • Gaming experience • Explains the elements of an enjoyable game • Google Lively, IMVU are 3-D chat clients, but are neither proximity nor audio.

  5. Goals • Realistic physics • Loadable surface system • Networked, first-person graphical chat system • Chat: audio, based on proximity (modeling real life) • Game element? (Maze? Capture the Flag?)

  6. Here's how it works. Development

  7. C, OpenGL, MPI • Why C? • C is a powerful and fast language • OpenGL is a 3-D graphics library compatible with C • C does not change its syntax. C code is always valid • MPI is an interface to pass information over a network and is compatible with C • I have had experience and am familiar with all of these.

  8. Perspective • Spherical coordinate system • Angle measurements in radians • Mouse control of looking around • Mouse recenters to the middle of the screen, so the screen does not limit where you look.

  9. Why Spherical? • OpenGL provides a command to look at a certain point from another point • User's position is easy, but how to give point on line of sight?

  10. Why Spherical? • Apply a spherical coordinate system, and this is simple • In (x,y,z) format, the point is (x_position_of_player + cos(θ)*cos(φ), y_position_of_player + sin(θ)*cos(φ), z_position_of_player + sin(φ))

  11. Why Spherical? • Mouse system intuitive, looking up or down changes φ, left and right changes θ • Movement simple, obtaining a unit vector in the plane of horizontal movement just <cos(θ), sin(θ)>

  12. Movement • Movement occurs with respect to the direction the user is facing • Movement is controlled with keyboard input • The unit vector in the direction of the line of sight projected onto the xy plane is multiplied by speed, added to position. The result is motion.

  13. Working with X11 • Problems encountered: • Screen size is not a simple thing to find • Little documentation on how X functions work in C • Mouse warp works inconsistently • Very careful of how many connections you open • Mouse warp now works every time, as I found out how to check if it’s warped. So now, despite inconsistency, I can do it until it works. • Pieced together most X11 from forums.

  14. Here's what it does. Results

  15. Current State • The user may move along the xy plane • A grid of spheres are provided for reference • A floor and horizon are displayed • Realistic lighting and fog

  16. Current State • The user may move freely throughout the environment with arrow keys • The user may use the mouse to look wherever they wish • Speed can be changed with +/- keys.

  17. Current Obstacles • OpenGL is very unkind about loading images • No libraries for audio seem to exist for C... • Networking over internet is not trivial

  18. Changes of Plan • Originally meant to be a simple first-person shooter • Now the plan is a networked chat system/maybe puzzle game/team activity • Of these, puzzle game looks most feasible

More Related