Crystal Star Animation



  • 4 Second Video
  • 30 Frames / Second
  • 120 Frames


  • Rendered in 720 x 480
  • 64 Rays / Pixel
  • 10 Bounces

The total rendering process (120 frames) took my two computers to run 7 hours.

Side Images

Caustics With Area Light
2500 Rays (50 * 50) Test
Combining with Depth of Field

Motion Blur

I have done the motion blur in Project 3. But now it is more refined. Actually I met a lot of problem using motion blur, since the scene is changing every single time and since the time sample is generated randomly, I have to reconstruct the scene every single time and I cannot cache anything (bounding-box, transformation matrix and so on). So the rendering process is very slow.

Here's some sample image I rendered back to Project 3.

(Dragons with different speed)


The reason why the animation could be this complecated is that I have an animatable class. If we are using this class, instead of storing vec3 position, we will store Animatable<vec3> position. And when setting the values we will use position.set([VALUE], [TIME]), meaning that we are going to set the position to VALUE at TIME. So in the code I wrote for the animation is simply

crystal.rotateY(-26, 0);
crystal.rotateY(116, 120);
crystal.rotateZ(60, 0);
crystal.rotateZ(0, 120);
crystal.rotateX(12, 0);
crystal.rotateX(0, 120);

meaning that I'm going to set y to -26 in time 0 and 116 in time 120 (frame). And the animatable will interpret the value for me at arbitrary time.

It is noticable that since this is very general so I can make any parameter into an Animatable. This is what I did for the CircularCloner. I'm also animating the radius of the CircularCloner in this animation too.

Also you might have realized that the speed of the motion is changing. That's because there's a per-keyframe-parameter called INTERPOLATION. It can be LINEAR, QUAD_IN, QUAD_OUT, QUAD_IN_OUT. I'm using QUAD_OUT in this animation. As you can see the speed is fast and it's easing out in the end.


The Cloner class is intuitive in its word – it is just cloning things around. In my implementation there are two kinds of cloners, one is GridCloner and the next one is CircularCloner. Obviously I'm using the CircularCloner in my animation.

Here are some sample images for each cloners:

Grid Cloner Circular Cloner

Fresnel Dielectric

It is quite obvious that I used Fresnel Dielectric for my crystals. And it's quite good obviously. As I showed before, there's already some caustics for this while we are using AreaLights. Here are some images that can showcase the Fresnel Dielectric Material:

Simple Caustics with Area Light Fresnel Dielectric with Sun Light
Fresnel Dielectric with Grid Cloner Fresnel Dielectric with Circular Cloner