Project1W17
Contents |
Homework Assignment 1: Big Wall
For this assignment you can obtain 100 points, plus up to 10 points of extra credit.
The goal of this assignment is to create an application which uses the physics engine to simulate breaking out of a cylinder made of a brick wall.
This assignment is due on Friday, January 27th at 2:00pm.
The assignment is to be done in teams of two.
This project will be presented in class on Jan 17th, and there will be a discussion on it on Monday, January 23rd at 7pm.
You can choose to do this project in Unity 3D, UE4, Lumberyard or C++ with OpenGL and optionally OpenSceneGraph.
Unity 3D
Unity 3D comes with a built-in physics engine, called PhysX.
Note that if you use Unity you aren't allowed to use any Unity assets other than 3D models and textures without explicit permission by a course staff member.
C++
To add physics effects, you should use the Bullet Physics Library. This library allows assigning physical properties such as weight and softness to geometrical objects. Then the physics engine will calculate the objects' motion, applying the laws of physics.
Here is an excellent tutorial on the Bullet Engine.
The Project (100 Points)
Create an interactive, immersive application for the Oculus Rift head mounted display (HMD). In the application, you are trapped inside of a seemingly impenetrable, tall, beautiful cylindrical brick wall - except that there wasn't enough money to put mortar between the bricks so they just sit loosely on top of one another. Luckily, you have superpowers you can use just by using your gaze. With your gaze you trigger one of two actions: a laser beam and a cannon ball. You can pick which one to use by using your gaze and the dwelling method. When the laser beam is triggered on a brick (by dwelling on it), the brick gets destroyed, which makes the wall unstable. When the cannon ball is triggered, you shoot a cannon ball roughly the size of a brick in the direction you're gazing. The goal is to destroy enough of the wall that you feel like you could climb over it.
In this application you are only allowed to use the HMD as an input device (i.e., no mouse, keyboard, Touch controller, or other input devices are allowed). You are not allowed to move the user except by natural head motion. The brick wall should be far enough away from the user so that the user can't walk through it.
The dwelling method is a technique where a cursor in the center of your field of view follows your head motion. When the cursor hovers over an actionable object for a certain amount of time, for instance 2 seconds, the action gets triggered. Many Google Cardboard and Gear VR applications use this method because it is cumbersome to push the buttons on the HMDs.
You will get points for the following things:
- A ground plane nothing can fall through. (10 points)
- A cylindrical wall of bricks, generated from code. This can be composited of simple cubes or boxes. Use as many bricks as your computer can comfortably render at 90 frames per second, the minimum required frame rate for the Oculus Rift. In Bullet, the cubes can be simulated as btBoxShapes. In Unity, you should create a brick prefab and instantiate the wall using instances of that prefab. The bricks must have physics properties applied to them. (20 points)
- A way of selecting one of the two actions by dwelling. An example is to create two cubes inside the wall that the user can look at. Colliders around the cubes sense the cursor. Each cube stands for one of the actions. You could even use just one cube and switch between the two actions.
- Laser beam: when in laser mode and a shot is triggered by dwelling, eliminate the brick the cursor is on. This is the brick a line from between the user's eyes straight out intersects with. The physics simulation should realistically make the bricks above the eliminated ones fall down.
- Cannon ball: in this mode a ball roughly the size of a brick gets shot from the user's head position, straight forward. Gravity should make the ball fly along a slight arc downward.
- You should be able to reset the application by looking straight up to the sky, within a reasonable threshold around the zenith. (10 points)
Let these images inspire you:
Extra Credit (10 Points)
TBD