Starting with the Miro codebase I first wanted to implement a relatively sophisticated BRDF - Schlick features anisotropy, micro-facets and even a simple roughness parameter that auto-balances diffuse and specular. I thought it would be particularly useful due for the materials in the scene— sand + water material and thin beach ball plastic.


Glossy Schlick Teapot


An outdoor scene has a lot of scattered light which meant that a single point/square light would be inadequate for my scene. As a result I implemented an IBL directional light loader. I found some software to perform a median cut sampling of a light probe, and output directional lights and their intensity. Rendering many lights per ray was killing my performance so I had to Russian roulette the lights, choosing a random light per path based on its power. With 128 possible lights one sample per pixel produced very noisy results, but at 50 samples/pixel the image was already acceptable (teapot above rendered with 64 lights and 100 samples/pixel). The IBL setup provides a good balance of glossy direct light reflections and soft diffuse lighting.


Next, I focused on creating the scene itself. I purposefully chose a scene with little geometry so that I could spend my time on procedural texturing and bump mapping. A perfect sphere to represent the beach ball looked too perfect so I added support for scaling a parametric sphere. This allowed me to warp it while still benefiting from fast BVH intersection and normal computation.


Procedurally textured and bump-mapped sand.


The sand texture as well as the bump map are generated exclusively with Perlin noise mixtures.



Working with a sphere is fairly convenient for procedurally generating colors and normals. I tried to match the color and bumps on the photo reference. With the texture in place I focused on getting the right level of translucency in the sphere. This proved to be a BRDF tweaking marathon which was all the more frustrating due to the coupled nature of index of refraction and translucency of dielectrics.



I left BRDF tweaking for a moment to implement some wet sand. I procedurally masked off a section of sand polygon and began reading up on how to perform proper scattering with wet materials. The  idea was to use the two layer Schlick BRDF to simulate the presence of a thin film of liquid on the sand surface. This model takes into account the interaction of light with both the air-liquid interface and the liquid-material interface. Unfortunately I ran out of time and was only able to have a rudimentary wet sand implementation where I modify the index of refraction on the top layer of wet sand.




Finally I integrated a photon map and implemented (glossy) blurry caustics. To visualize the translucent plastic shell of the ball I needed to have a dense estimate of photons from the light penetrating into the interior of the ball. For emitting photons from a directional light source, I find a bounding box of my scene in the perspective of the light direction and perform random position sampling to generate the origin of each ray. To complete the look of the beach ball I randomly drop and guide along the normal (x, z), some variable sized spheres onto the surface of the beach ball to represent water droplets.


Final Result



The final image is generated using path tracing with 64 sky lights and 1 sun light, with special handling of photon map statistics to handle caustics and color bleeding on backfaces of the beach ball. The inspiration image is used as the background. Overall I am pleased with the image - the way that the sand came out and the red color off the top of the ball bleeding through and illuminating the shadowed right side. If I had fewer black pixels to debug I would have liked to implement a more physically accurate scattering simulation for the wet sand. Also a big lesson learned is not to implement complicated effects while still working out bugs with the BRDF.


 No background composite and photon map irradiance amplified




Oleg Bisker

My inspiration for this project was the much loved San Diego beach. I wanted to do an outdoor scene with some water, sand and a geometrically simple but visually sophisticated beach ball.

u  Schlick multi-layer brdf

u  Image-based lighting

u  Caustic photon  map

Final Project

cse168 Spring