Difference between revisions of "Project4S16"

From Immersive Visualization Lab Wiki
Jump to: navigation, search
(1. Track)
(2. Control Handles)
Line 11: Line 11:
 
==2. Control Handles==
 
==2. Control Handles==
  
interaction with control points; selection buffer for selection of points or ray casting or or 3D input device - discussion goes over selection algorithms
+
Make your control points editable by the user with the mouse. You need to support both the interpolating and the approximating control points.
 +
 
 +
First, draw the control points:
 +
 
 +
# Interpolating control points: these are the control points which the curve goes through, also called anchor points. Highlight the points with spheres or otherwise to make it easy to see where they are.
 +
# Approximating control points: these control points "pull" on the curve but the curve does not go through them. Highlight these points in a similar way as the interpolating points, but use a different color or shape to distinguish them from those.
 +
 
 +
To ensure C1 continuity, you will need to support control handles like in the video. They connect the two last control points from one curve with the first two control points of the neighboring curve, and ensure that they lie on a straight line. Draw all eight control handles (lines).
 +
 
 +
Finally, use the control handles with the mouse to modify the control points, and update the shape of the Bezier curve in real-time, just like the video demonstrates. To detect which control point is being modified, we will go over a few options in the discussion on Monday May 9th. Examples are ray casting or a selection buffer.
 +
 
 +
'''Notes:'''
 +
* If you own a 3D input device such as a Razer Hydra or Sony Move, you are welcome to use it in this project as it will simplify the interaction with the control points, but this is by no means a requirement.
  
 
==3. Environment mapping==
 
==3. Environment mapping==

Revision as of 07:31, 7 May 2016

Contents

Project 4: Roller Coaster

In this project, you need to create a track editor for a simple roller coaster. The roller coaster will have just one car, which will be the pod from project 3. The editor should work like the one in the video shown in class.

Start with your sky box from project 3, along with the code to manipulate the camera with keyboard and/or mouse. We recommend that you use and further develop your scene graph engine from project 3. However, if you prefer not to that is acceptable.

1. Track

Just like in the Bezier curve video, create eight connected Bezier curves. Ensure C1 continuity by forcing the tangents of the two curves in the connecting points to be parallel. Draw the Bezier curves by approximating them with about 100 straight OpenGL line segments each, for a total of about 800 line segments. Make them wider than the default by using OpenGL command glLineWidth, so that they are more easily visible.

2. Control Handles

Make your control points editable by the user with the mouse. You need to support both the interpolating and the approximating control points.

First, draw the control points:

  1. Interpolating control points: these are the control points which the curve goes through, also called anchor points. Highlight the points with spheres or otherwise to make it easy to see where they are.
  2. Approximating control points: these control points "pull" on the curve but the curve does not go through them. Highlight these points in a similar way as the interpolating points, but use a different color or shape to distinguish them from those.

To ensure C1 continuity, you will need to support control handles like in the video. They connect the two last control points from one curve with the first two control points of the neighboring curve, and ensure that they lie on a straight line. Draw all eight control handles (lines).

Finally, use the control handles with the mouse to modify the control points, and update the shape of the Bezier curve in real-time, just like the video demonstrates. To detect which control point is being modified, we will go over a few options in the discussion on Monday May 9th. Examples are ray casting or a selection buffer.

Notes:

  • If you own a 3D input device such as a Razer Hydra or Sony Move, you are welcome to use it in this project as it will simplify the interaction with the control points, but this is by no means a requirement.

3. Environment mapping

Load the pod from project 3. It will be the roller coaster car. We want to make its surface a polished metal, so we need to use environment mapping with it.

cube map tutorial of learnopengl has env map - point to it

4. Physics

make it look like in the video; potential energy equation: conversion from potential to kinetic energy; reset button: start pod at highest point

5. Optional (10 Points)

either one gives 10 points a) extend bezier curve to band with 1st order polynomial added b) real time calculated environment map to include the track