James Whiteside    CSE168 Final Project

Final Image -
Cats in a Hallway

Final Image

Fur Rendering

The hardest task in creating this image was the creation of the cats' fur. Fur is a complicated rendering topic and many complex algorithms have been developed to handle its rendering. I determined that the easiest way for me to generate good looking results was to create each hair out of triangles and then randomly place large numbers of these geometric hairs throughout the model. While this method is easy to implement, the major problem with it is that very large numbers of hairs must be drawn in order to make a fur pelt look realistic. To help alleviate this problem, I devised an algorithm to generate less hairs when the triangle is farther from the camera and also to make those hairs thicker to avoid loss of volume. Another technique being implemented is to only generate hairs for triangles that are facing the camera. I also added random curving to each hair and length variation to make them look more natural. The hairs in this scene each have 20 triangles in them.

Curly furStraight fur

These two pictures show the difference between curly fur and straight fur.

A difficult problem I faced in generating hair is that hair that is facing the camera has very little volume and the surface underneath can be seen through it. This problem can be observed in both cat pictures shown above. To deal with this, I give the hair a direction to point in and all fur is rotated so that it stays close to the traingle it is attached to.

Regular sphereFurry sphere

This is a 120 triangle sphere with and without fur. This fur is pointing in somewhat random directions based on the orientation of the triangles. This also shows how fur can look good even on low polygon meshes. The rotated fur is better at covering up the base sphere than fur sticking straight out.

Anti-Aliasing

A problem with rendering fur and hair is that hairs are very thin and will likely be missed by a ray tracer shooting only one ray per pixel. To deal with this problem, I implemented anti-aliasing to take multiple samples of each pixel and average the resulting color values. I used stratified sampling that takes ray positions that are uniformly distributed and randomly jitters them to prevent patterns from forming. I allow the number of sampled pixels to be set so that the anti-aliasing can be optimized for quality or speed.

Aliasing

Thin hairs on a triangle. This is a good example of why we need anti-aliasing.

Depth of Field

To make my picture look more like a photograph, I implemented a depth of field technique which focuses the virtual "camera" on a plane at a specified distance. The amount of blurring can be modified depending on the desired effect.