Assignment 2 – Ray Tracer with Motion Blur

 

This assignment included making the basis for a ray tracer as well as adding motion blur.  The main part of getting the ray tracer working was doing the ray-object intersections.  After that adding motion blur just meant giving the objects a way to change position over time and then sampling different times for every pixel.

The first images are just getting the ray-object intersections to give back the right time.  So when a triangle goes behind a sphere it doesn’t show up on top and so on.

         

The next picture shows motion blur, where the objects move with constant speed with regard to time.  Notice, however that the velocity vector does change.

I then changed the velocity entirely over time to get a weighting of the object at one end of the time interval and this is what I ended up with.