Ray Tracing Projects

Assignment 12b: Motion Blur

Return to Ray Tracing Assignment Overview
 

Yes, the pool balls are back!  Unfortunately, the texture of the 13 ball is still wrong....

A real camera has the ability to alter the time that the shutter is open to take a picture.  If you leave the shutter open while the object you're photographing is moving, the resulting image will have a blurred object.  The amount of the moving object you'll see in the image is dependant on how long the object was in view of the camera, relative to how long the shutter was open.  If the shutter was open for 1 second, but for half a second the object didn't move, you'll see more of the image where it was stationary, before it moved.

In my renderer, I allow rays to have times.  Rays are given pesudo-random times in the range [0.0, shutter), where shutter is the amount of time the shutter is open.  When a ray hits a moving object, the intersection is calculated based on where the object is at the time the ray hits it. 

For moving objects, two center points (for spheres) have to be entered (the start and end points) and two times (the time that the object is at the start point and the time the object is at the end point).  The motion will be linear between the start and end points.  Objects are in motion only between the start and end times.  That is, if the shutter is open for 1 second, and I have an object with start and ends times, 0.5 and 1.0, respectively, then the object doesn't start moving until time 0.5.  This means that in the final rendered image, we'll see "more" of the object at it's start point.

In the examples below, the cue ball is in motion between time 0.0 and 0.25.  The '1' ball is in motion between times 0.2 and 1.3.  The cue ball starts slightly off to the left of the image and stops just after "hitting" the '1' ball.  The '1' ball begins moving when it is "hit" and doesn't stop until it's way off the right side of the image.  There is no attenuation of speed, so that's why I'm allowing the '1' ball to go way off the image before it stops...the part that we see should be about the right speed.  The cue ball stopping immediately after hitting the '1' ball is fairly realistic.  The motion is linear only, so the balls do not rotate, which is very unrealistic.  The images shown are all of the same scene, with different shutter times.
 


Pool Balls in Motion
450 x 300 JPG converted from PPM output
Shutter time: 0.1 sec.
 


Pool Balls in Motion
450 x 300 JPG converted from PPM output
Shutter time: 0.25 sec.
 


Pool Balls in Motion
450 x 300 JPG converted from PPM output
Shutter time: 0.5 sec.
 


Pool Balls in Motion
450 x 300 JPG converted from PPM output
Shutter time: 0.75 sec.
 


Pool Balls in Motion
450 x 300 JPG converted from PPM output
Shutter time: 1.5 sec.
 

The above images are all rendered with 144 samples per pixel.  Each took about 3 minutes to render.

I would like to add more times and object locations to "moving objects" so I could have balls change direction if they don't hit a ball dead on.  It would be fairly simple to do...figuring out at what times and the direction change would be the harder modeling problem.  Maybe someday when I have more time.

Executable compiled with Microsoft Visual Studio .NET Professional and run on a Dell desktop with an Intel Pentium 4 1.8 GHz processor with 1.0GB of RDRAM running Microsoft Windows XP.
 

email at jasonwaltman dot com

(c) 2000-2007 jason waltman