Timothy Martin
CSE168 Final Project

   For my final project, I chose to render a car, specifically a Lamborghini Murcielago.
I found the model when I was browsing turbosquid, and it was free and very detailed so I decided it would be a good model to attempt to render.

The Car Model

   I broke up the car model itself into individual smaller pieces using 3ds max. I exported each of the pieces of the car into OBJ files which would be assigned specific material properties

Finally got the car rendered. I had to fix my BVH because the car has over 2 million triangles in it. My BVH worked fine for smaller poly count models but 2 million triangles caused terribly long build times.

Working on breaking up the car

Materials on car pretty much finished. You can see the specularly reflective body as well as the rims on the tires. You can even see inside the car through the windows (side window here). In total, there were 13 different OBJ files that made up the car, each comprised of all the parts of the car that I believed belonged to a certain material. (Shiny metals, painted body, headlights, glass, tires, etc...).

Depth of Field

   To simulate the depth of field effect, I chose to have the focus plane on the middle of the car. I then took several random samples at each pixel, moving the camera but keeping its focus on the focal point. This way, most of the car is in focus and its farther and closer parts are slightly blurred. The cacti behind the car are also blurred more because they are farther away.

Depth-of-field test. Low number of samples, so, quality is much lower.

Another Depth-of-field test

My attempt at implementing motion blur. I didn't continue with this because it took away from the overall look of the car. This was implemented by moving the camera and taking snapshots of the scene which were blended together for the final image. I employed Adaptive Sampling here to lower the number of samples in obvious areas of the scene where movement was minimal. I checked the first and last frames of the motion blur at each pixel and thresholded the contract between the pixel colors of these frames.


   To get rid of any aliasing effects, as well as smooth out some of the blur caused by the depth-of-field effect, I anti-aliased the final image with supersampling. I chose to go with strict 2x2 samples per pixel instead of doing adaptive sampling here. If I had the time, I would have implemented adaptive sampling here to increase rendered speed and image quality at the same time.

HDR Environment Map

   I found a light probe HDR/PFM map that better suited my scene and added it also. This map provides a very nice background and also reflects off the reflective surfaces in the scene. Anything that is reflective will reflect the environment map also. I attempted to also apply Bilinear Texture Filtering on the environment map to produce a clearer texture map. This did lower the pixelation a bit and produced a slightly cleaner map. This was a little weird to implement because it isn't a regular square/rectangular texture.

Because access to the environment map was with a vector, I used rotations on that vector to grab neighboring texels for the filtering process. With a lightprobe map, 360 degress is represented horizontally across the map and 360 degrees is represented vertically. So, an estimation for pixel steps could be (360 degrees/pixel width) and (360 degrees/pixel height) respectively for the width and height of the light probe map. I used this to access the necessary texels to filter the background.

Without DOF, but with Antialiasing

   I actually like this image a lot because the anti-aliasing really cleaned up some artifacts with the metallic rims to really give them a realistic look. And you can also very clearly see the streaking reflection of the environment on the side of the car's red body.

Pre-Final Image(shown at rendering competition)


Real Final Image

Some Notes about the final image:
32 Depth of field samples and 2x2 Antialiasing done at every pixel
Hard shadow rays were cast onto the ground(no visible shadows casted by objects onto other objects).

The depth of field focus plane is through the middle of the car, as the nearest and farthest parts of the car are out of focus. The cacti in the background really express the use of depth of field in this image, as each progressively farther cactus is blurred slightly more.
Hard shadows were added in to give a last realistic touch to the final image. I didn't use area lights because the depth of field and anti-aliasing were enough to soften up the shadows and also computing soft-shadows with depth of field and anti-aliasing makes rendering take unbearably longer, given I only had 2-3 days to complete this project because of CSE 125 (final demo the Friday before).   
I'm happy with my final image, but I'm not happy that I couldn't implement more effects than I did. If I could have added more, I would have prolly also done photon mapping or path tracting with the interior of the car. Maybe next time when I don't have CSE125 to finish up the week before :). Overall, I've learned a lot, and I will continue to fiddle with the ray tracer I was able to make in this class.