Carousel at Night

by Alex Kozlowski

kman@graphics.ucsd.edu

CSE-168 Rendering Competition


Features of the Renderer:

 Photon Mapping, Spherical Area Lights, BSP Tree, Depth of Field/Supersampling, Glossy Reflections, Tone Mapping, 3D Bump-mapping & Perlin Textures, Soft Shadows

Modeling:


 I was inspired to do a carousel by the story "Something Wicked This Way Comes" by Ray Bradbury.  Since I didn't have (or know how to use) a commercial modeling program, I taught myself Blender.  It is quite an impressive program, though the interface takes a ridiculously long time to learn.  Exporting .obj files is also very slow.  Here are some screen shots:

    

I modeled the horses with subdivision surfaces, then rigged them to a skeleton for posing purposes.  I didn't have time to model different types of horses, unfortunately.  You'll notice that all the horses are identical, except for their colors, poses, and the front part of the mane.

Modeling the carousel was substantially easier than the horses since the carousel is symmetric every 30 degrees.  The only difficulty I had was placing all of the light fixtures.

The final scene has a little over 1.5 million triangles in it.  Each horse has triangle count of about 150,000 .  The carousel has about 200,000 triangles, mostly due to the light fixtures.  The BSP for the final scene took 6 minutes to create, and had an average of 2.2 nodes per leaf.

 


Soft Shadows

To achieve the effect of soft shadows on the roof of the carousel and those on the the center floor, I implemented stratified sampling of the spherical area lights.  The picture below shows the soft shadow effect.  The banding is not an artifact of the process but due to the fact that there are multiple spherical lights in the scene.


Bump Mapping

Originally, each horse was modeled with a brass pole running through its center.  I used a corkscrew sweep to create the pole out of triangles.  To get the degree of smoothness I wanted, I had to subdivide each pole to near 40,000 triangles, which was way too many triangles for such simple geometry.  So I scrapped that idea, and decided to bump-map a cylinder instead.  This worked great, and really lowered the triangle count in the scene.

I also created a 3D bump map for the floor to achieve a cut wood effect. 

 

 


Glossy Reflection

For the floor I added glossy reflections by jittering the reflection normal according to the Phong model presented in class.  I personally think it's the best feature in the scene.  The horses are also glossy, but closer to a perfect specular reflection.

 

 


Perlin Textures

Though unfortunately faint in the final scene, the columns surrounding the center of the carousel were textured with a 3D marble texture using Perlin Noise.  The beams running atop the carousel also have a mild bump map based on perlin noise to give it a painted wood effect.  Here is a screenshot of the marble:

 


Depth of Field / Supersampling

 I implemented depth of field for the final scene using a circular lens with 16 samples per pixel.  I used stratified sampling for both the pixel locations and the lens.  This is one of my early experiments with DOF with the horses in focus.  The final scene has a much fainter depth of field.

 


Photon Mapping

I used photon mapping to do all the indirect lighting in the scene, directly visualizing the photons for indirect lighting. Most of the brown color you see on the floor is due almost entirely to indirect lighting.  Here's the scene rendered with only direct lighting.   

Though I implemented gathering early in my renderer, I wasn't pleased with the noisiness of my results and how long it took to do the gathering.  I chose instead to just use a direct visualization of the indirect lighting from the photon map

 


Tone Mapping

 The final scene has about 500 spherical lights, each emitting about 3 Watts and each attached to a wall fixture.  Just clamping color values at 1, I got a very unrealistic bloom effect with a very rapid falloff.  Reflections from the poles appear too bright and spotted, and the white horse looks more gray.  To fix that, I implemented tone mapping based on an ad hoc formula by Reinhard et al.(2002) and described in the book Physically Based Rendering by Pharr and Humphreys.  Unfortunately, it wipes out the bloom effect almost completely, which is also a bit unrealistic.  I wrote my own python script which employs a quadratic bloom filter on the nearest 3 pixels.  I has the nice effect of brightening up the scene but doesn't really recreate the bloom effect from the lights.

The left shot shows clamping from [0,1] right shows tone mapping, bottom shows bloom filter.


- Alex Kozlowski