Friday, December 12, 2008

Overcast Lighting - Photon Mapping

Given the massive failure of my testing with Incandescence and Colorbleeding in RmF, I knew that I should pursure other options. I talked to Eric and he told me to use Slim (the actual RenderMan interface for shading and lighting) for photon mapping. I tried using it but due to software issues (and software issues alone - it was not in anyone's control), I was unable to get very far. I knew that I had to switch over to Mental Ray to get the job done. Luckily, Eric had taught us how to control photon mapping in our lighting class last semester. Here I'm regurgitating what I have in my notes, so if anything is wrong or unclear, it's all me.

I used just one single light in the entire scene. I created an Area Light with an Intensity of 0.000 and under the Mental Ray tab, checked on Emit Photons:





















I gave the Photon Color a light, desaturated blue hue to match the color of a cloudy afternoon. Leaving everything else at default values, and using the render preset Preview: Global Illumination in my Mental Ray render globals, I ran a test render at 400x225:

The light looked as if it had been placed directly next to the window instead of far away, out in the sky. I felt that things were too bright near the window and did not look like the even diffuse light I had observed in my reference photos. Photon Intensity determines how hard the light is "thrown" from the Area Light, so I decreased it to 4000 because the default value of 8000 was causing the lighting to be too intense where the source was. I ran another test render and got more satisfactory results:
The lighting was darker overall, but the falloff was not as drastic coming from the window, which I liked. Just as a test, I decreased the Exponent from its default at 2.0 to 1.5 in order to increase the "intensity" of the "light" (I know this gets contradictory quickly.) Decreasing the Exponent allows the "light" to travel farther from the source; my goal was the brighten up the foreground. I got this render:

I felt that the foreground had been brightened nicely but not enough, and that the area surrounding the window was starting to get a bit blown out. I figured that between values of 2.0 and 1.5, there would definitely not be a happy medium to give me a brighter foreground and a background that was not too hot. I knew that I would ultimately be rendering out an EXR, and in turn I would be able to color correct and brighten things easily without degrading the image quality, so
I decided to return the Exponent's value to 2.0.

The splotchiness on the walls and ceiling was partly due to the shader (which had a fractal mapped to its spec color), but I also knew that some of it was due to the photon mapping. In the render globals, Caustics and Global Illumination > Global Illumination Options, I increased the Radius from its default 0.000 to 2.000:





















Increasing the radius serves to help smooth out the splotchiness and other rendering artifacts. The result was very similar to the one before it (the second render in this post):

The only discernable differences were that I could see a bit more occlusion in the corners of the walls, and things looked a little bit darker. However, some of the blobs had been smoothed away. Knowing I was going to be rendering at full 1080, I felt that it was worth keeping the Radius at 2.

The important thing to know about adjusting the Radius is that it can smooth things out at the expense of accuracy. Increasing the Accuracy can help fix light leaking (i.e. where lights seems to be passing through objects) and also help get rid of splotchiness. However, I chose to leave it at 500 because I was fairly satisfied with the results (the only leak I noticed was where the shower wall facing us joins the ceiling ), and I knew I was going to be rendering an ambient occlusion pass to help darken crevices and hide any leaks.

The most recent render image in this post ended up satisfying what I had been looking for in a beauty pass, so I rendered out an EXR at 1920x1080.

No comments:

Post a Comment