Project3W18

From Immersive Visualization Lab Wiki
Revision as of 13:34, 9 February 2018 by Jschulze (Talk | contribs)

Jump to: navigation, search

Contents

Air Race

under construction

In this project we're going to use the Leap Motion for user input, attached to the Oculus Rift head set. Leap Motion mounting brackets have been installed on all Oculus Rifts. In addition to the Leap you are allowed to use the data from the Oculus Rift head set, but you are not allowed to use the Touch controllers, keyboard, mouse, or any other input devices. The Leap Motion drivers should have been installed on all computers.

If you are not familiar with air races, you might find this video entertaining and informative.

Our version of the air race actually resembles the rather new category of drone races more. Here is a great video illustrating how it works. Here is another hopefully inspirational video for this project.

As a special treat, here's the video of tutor Anish's Air Race project from Winter 2016 - at the time it was done for the desktop with a Sony Move controller.

Leap Motion Access From Unity

There is some information about this in the Discussion notes from Feb. 13.

1. Race Track (30 Points)

This UCSD campus model provides the environment for the race track. The unit size is one inch, so you have to scale the model to match Unity's unit size, in order for the campus to show up life sized. Load it into your application and turn the buildings and the ground plane into colliders that cannot be traversed. (If you implement your game in C++ and OpenGL, you only need to make the ground plane a collider.)

The race track is a set of check points the player has to go to in a specific order in order to win.

About 24 hours before grading starts (which means on Thursday, February 23rd around 2pm), we will post the competition file along with a note on Piazza. The competition file will be an ASCII file in the XYZ file format, listing the locations of your check points. The coordinate system will be the same as that of the campus model. An XYZ file does not have a header, it only consists of a list of point locations in 3D, in the format X Y Z<return>X Y Z<return> and so on. An example for an XYZ file defining two points is this:

-200.0378 100.1279 10.0475
-202.0447 103.1288 10.0905

The coordinates are separated by white space or a tab character, the points are separated by a line break. On each line are three floating point numbers. The first three are the x, y and z coordinates of the first point. The next three numbers are the x, y and z coordinates of the second check point, and so on. There could be hundreds of points in the file. In this project you can assume that the competition file will not have more than 100 check points.

Here is what you need to do:

  • Load campus model and display at correct scale. (5 points)
  • Write a parser for XYZ files. It should be a simple for loop in which you read each line of the file. In C you would use the fscanf command for this. Your parser does not need to do any error handling - you can assume that you will get a proper XYZ file. You do need to recognize when there are no more points in the file (i.e., check for End of File) (10 points)
  • Draw the check points using a method of your choice. You can assume that all check points will be floating above the campus model and will not intersect with any buildings. For instance, you can draw the check points as translucent spheres. The goal is that the visualization should allow the player to move from one check point to the next as fast as possible without missing any. A check point is reached once the aircraft's origin gets within a fixed radius of 30 feet around the check point. (15 points)

Here is a sample race track, whose points are relative to the campus model. And here is a picture of where the checkpoints should be located.

Here is the competition file from last year, which may also be useful for testing. The check points should be in these locations.

2. Flight Controls (30 Points)

You need to implement a way to control the aircraft which uses only the permitted input devices (Leap and Rift). The aircraft needs to fly continuously and can't instantaneously 'teleport' itself anywhere at any time. You do not need to worry about momentum though, but can assume the aircraft has no mass that needs to be accelerated or decelerated (i.e., the aircraft can accelerate to any speed at any time instantaneously or stop instantaneously).

While flying the user needs to be able to look around without impacting the direction the airplane is flying in or its speed.

Grading:

  • -10 if the user can't look around without impacting the flight direction

3. Wayfinding (20 Points)

The check points can be quite far from one another, so it will be important for the pilot to know where the next check point is. Come up with at least two different visual ways of helping the player to know where to go next. For instance, you could have an arrow pointing to the next checkpoint along with an indicator for how far it is. Make sure your wayfinding aids give the player an idea of both direction to (in 3D) and distance from the next checkpoint.

Note that there are three coordinate systems you can reasonably display the wayfinding aids:

  • world coordinates (which the campus is in)
  • aircraft coordinates
  • head coordinates (the Oculus Rift's coordinate system)

Each of the two visual wayfinding aids has to be displayed in a different coordinate system.

Grading:

  • 10 points for each wayfinding aid (5 if there's a visual but it isn't functional)
  • -5 points if both wayfinding aids are in the same coordinate system

4. Gameplay (20 Points)

The player's aircraft should start at the first check point, with zero pitch or roll (level with the ground). It can be facing in the direction of the second check point (heading).

You should use a first person view: the aircraft itself is not visible to the player. See the extra credit option for an alternate option.

There should be a countdown of some sort. Before the countdown ends the aircraft can't move. Once the countdown is done, a stopwatch starts running and is visible to the player. The player takes control of the aircraft and tries to fly to the next checkpoint as fast as possible. Once that checkpoint is reached, there needs to be some sort of visual notification that the checkpoint has indeed been reached. Once the last checkpoint has been reached, the race is over and the time is halted and needs to remain visible.

A checkpoint is considered reached when the airplane's collider collides with the checkpoint. The aircraft's collider cannot be wider than 1 foot in any dimension.

Grading will include that you fly your aircraft along all the checkpoints and we record your time. Who is going to have the fastest lap time in class, and what flight control method will it be achieved with?

We'll determine the winners of the competition once we're done grading everyone. Then the top three teams are going to have to race one more time with all graders watching. The result of these final races determines the winner.

Notes:

  • Checkpoints cannot be skipped, each checkpoint has to be reached in the correct order to finish the game.
  • If the aircraft collides with the ground or a building it should be moved back to the last successfully cleared checkpoint in the orientation it reached it, and another countdown should be initiated before the player can continue. The time between collision and the player regaining control of the aircraft has to be no less than 3 seconds. The lap timer should not stop when a crash happens.

Grading:

  • -5 if the player does not see a first person view
  • -5 if reaching the checkpoints in order is not enforced
  • -5 if aircraft isn't initially level with the ground (also disqualifies from winning the competition)
  • If the penalty for a crash is less than 3 seconds the team gets disqualified from the competition.

5. Extra Credit (10 Points)

  1. Motion sickness mitigation: implement two ways to see parts of or the whole airplane. Use Unity assets or design your own with a 3D modeling tool such as Sketchup. Add an interaction method to switch between the three viewing modes (view from pilot without visuals, from pilot with cockpit, from behind airplane) during flight, using only Leap and/or Rift), and find out which modes create more or less motion sickness for yourself or others. (2 points)
    1. Display the cockpit the pilot sits in and allow the user to look around it. (2 points)
    2. Display the airplane from a 3rd person perspective behind the airplane. The camera doesn't need to be in a fixed spot behind the airplane, but the airplane must always be visible in this view. (2 points)
  2. Audio: add sound effects to the experience. Use a motor sound with increasing pitch for faster speeds, a countdown sound effect when the race starts, an effect when checkpoints are reached, and an effect when the finish line is reached. Feel free to add additional sound effects (eg, for crashes). (4 points, one for each effect)
  3. The winner of the competition gets two extra credit points, as long as the graders all agree that the team competed fairly.