Spacecraft - Animation
Deadline: November 24, 23:59:59 IST
Overview
You have to design a spacecraft launch mission animation based on a real mission that has been carried out by any country. In the previous assignment you must have finished all modelling. In this part you will animate your model and camera.
Figure out and plan the trajectory that each part of your launch vehicle must take as it carries out the mission to place the payload in space. Figure out the final trajectory for the payload too. Also, plan the trajectory for the camera (this would include the position of the camera center and the lookat point) using which you want to display the animation. You can change cameras between the launch sequence, if you want to show close-ups, or other kinds of camera shots.
Preparation
- Like the previous assignment, this assignment is to be maintained and submitted via github.com
- Make sure you have a github.com account and have access to it before proceeding.
- Click on the assignment invitation link sent on the mailing list to begin.
- Use the same team names you used last time.
- Read these instructions about how to get started with assignments on github, if you do not remember.
To Do:
-
Finish all modelling and texturing that is leftover from the pervious assignment.
-
Model other planets, satellites and other bodies in space as required.
-
Implement an interface to create Bezier space curves by clicking control points using the mouse in your scene. To make this feasible you will need a way to move around the scene with arrow keys and you will need to visualize where in 3D space did you click. So drawing a small sphere where you click is a good idea.
-
Ability to add control points to create the curve is mandatory, but you may add the capability to delete the last clicked point or click and drag already clicked points if you want. After the control points are in place, join them with a single Bezier curve.
-
A curve can be displayed by sampling points on this curve at small “delta t” intervals and joining successive points with a straight line.
-
Add key
T/t
to save/append the trajectory control points to a trajectory.txt file. Each trajectory can be saved as:< Number of control points > CP1X CP1Y CP1Z CP2X CP2Y CP2Z : : :
-
Make sure you can load this file and draw all the trajectories together by pressing the
Y/y
key. Draw each trajextory with a different color, when doing this. -
Design all the trajectories you need and store them in this file.
-
Now create a keyframes.txt. Each line in the keyframes file is going to contain paramter value for each active trajectory when this keyframe occurs. For e.g., if there are four trajectories - one for the launch vehicle rocket, one for the launch vehicle secondary boosters, one for the payload and one for the camera eye, the keyframe looks like:
T1_Active_Flag T1_Parm T2_Active_Flag T2_Parm T3_Active_Flag T3_Parm T4_Active_Flag T4_Parm
-
Active_Flag are 0/1 values signifying whether the corresponding trajectories are inactive or active. Parm is the parameter along the corresponding Bezier curve.
-
If you generate a fixed number of frames between each keyframe, the timing of your animation can be adjusted using the space between the paramater values on a particular trajectory in successive keyframes.
-
In addition, also add other flags to your keyframes to signal state changes during the animation, like rocket stage separations, entry into orbit, firing of thrusters. Make sure all your keyframe lines are of same length to make parsing easier. The rotation and translation values of the movable parts of the payload must be a part of the keyframe line. Explain the keyframe format in the README file.
-
Creating the animation is now simply a matter of interpolating between keyframes. Note interpolation functions will vary depending upon the kind of variable - e.g., you can linearly interpolate the parameter values, but some state flags may only be 1 or 0.
-
Use the timer readout from GLFW to drive the animation at a particular fps (frames per second) rate. Assign the
P/p
key that starts the playback of the animation when pressed. -
Dump the frames of the animation to a sequence of image files. You can do this by using the functions used to write the canvas to an image from assignment 1. Add a sountrack to your file. You can use avconv on linux to do this. Make sure the sountrack that you use is not violating any copyright.
-
Upload the video to YouTube and submit the link in the README file.
Do NOT do the following:
- Write untidy or unorganized code. This will be penalized.
- Submit a repository that does not conform to the expected structure or has extra files.
Marking
- Interactive Bezier curve editor: 200 marks
- Saving, loading and drawing trajectories: 300 marks
- Keyframe file: 100 marks
- Animation playback: Correct interpolation and timing: 200 marks
- Animation playback: Camera animation: 200 marks
- Youtube movie and link: 100 marks
- Total: 1100 marks
- Deductions: Inconsistently written code: 100 marks
- Deductions: Submitting an unclean or unstructured archive: 100 marks.
Important Note
Please do not put your solution code and report anywhere public. It should not be available online.
To Submit
- Regularly check-in the code into your teams' github repository.
- The last check-in before the deadline will be considered for marking.
- The README.md file in the root folder should contain the names and roll numbers of your partner for the assignment, and a declaration in your own words that the assignment is your own work and that you have not copied it from anywhere. Also cite any sources that you may have used to complete it.