Task 062: RT animation with panoramic camera

Your task is to implement animated panoramic camera (implemented in the task 022) and use it in an animation RT scenario. Ray-tracing scene geometry can be animated as well (for bonus points), e.g. translation / rotation movements of some objects, texture animation, free falls / throws, bouncing objects..
Ideal solition would be to design a simple animation script format and implement its interpretations into our ray-tracer. Animation scripts could be stored in external text files, which would be very convenient.

Camera animation - ideas

In the task 046 there already was an animated camera, it was included into the main repository branch, see the project 062animation. You can be inspired from it or even start your solution from the class AnimatedCamera : StaticCamera, ITimeDependent. Key animation properties are defined in the interface ITimeDependent (general dependency of any object on the time). In case of animation, you have to encapsulate the whole scene data into builtion class AnimatedScene : AnimatedRayScene, which will take care of all the time settings (propagation of the double Time changes).

Interface ITimeDependent

Current time (in seconds, type double) is set using this interface. Any reasonable object in ray-tracing data set can implement this interface, thereby it announces dependency on time (i.e. "it can be animated"). Attention: because frame rendering is usually parallelized in multiple threads, you have to abide the re-entrancy rules of your code. Especially animated object instances must not be shared, therefore the time-dependent objects (interface ITimeDependent) must be able to clone itself (interface IClonable - see the AnimatedRayScene.Clone() function). The idea is to separate all the parts which are actually dependent on time, static parts of a scene need not be cloned.

Ideas

Animated scene node (which is able to translate/rotate itself) has to use proper interpolating curves (with C2 continuity for the best). For a scripted (i.e. not based on physical simulation) animation I recommend Hermite interpolation curves (e.g. Catmull-Rom splines or TCB splines), for interpolated orientation quaternions are the best (for both see the hw-08-math.en.pdf presentation).
Implementaion: some of the mentioned curves are already implemented in C language in the ogl repository, as well as quaternions. There are usable quaternions in the OpenTK library, too.

What to change

Modify the class RayScene scene-definition class in the RayTracingAnim.cs source file. Add your animated 360°/180° camera together with all eventual new classes.
Devise some interesting animation scenario and implement it statically ("hard-wire") or implement some simple animation script format. Scripts can be included in your source file or can be put in independent text files. Do not forget to present abilities of the panoramic camera.

What to hand in

You must send the modified file RayTracingAnim.cs. Declare the supposed time interval and FPS.
In addition to that you have to make panoramic video and upload it to some public video-server, YouTube or Vimeo, .. You must send the URL of the video.

Production of the video file

Instruction page for video encoding. Windows executable of ffmpeg can be downloaded from this page. Sample batch file for AVI video encoding from sequence of disk images is in the repository (encode.bat).

Panoramic video - see YouTube instructions or general Google instructions.

Animations camera-animation examples

Deadline

Hand in the assignment until: 21. 5. 2017. Some of the best results will be screened at the last lecture.

Points

Basis: 25 points (reasonable animation, panoramic camera animation, produced and uploaded video file),
bonus for invention, soundtrack, etc.
competition: all solutions will be displayed on a web page after the deadline. There will be short public voting period, winners will receive additional bonus points.

Project

Visual Studio project: 062animation

Source file

Modify and hand in the source file: RayTracingAnim.cs
As a comment in the first line, please include your name!

Competition

Vote on the result page, deadline is xx. 6. 2017.


Copyright (C) 2012-2017 J.Pelikán, last change: 2017-04-10 00:03:40 +0200 (Mon, 10 Apr 2017)