One of the initial problems I was encountering was that given the default settings of the occlusion shader, I was getting renders that were completely black except for the window. Additionally, the renders would still take about a minute to calculate even at 400x225. I figured that it had something to do with the fact that my scene was nearly completely enclosed. After talking to a graduate of my program, Ben Hendricks, it turned out that this was partly the case, but he said that understanding how the shader was working would allow me to control it.
The camera shoots out rays at the geometry that then bounce off. Samples determine how many rays are shot out from the point on the geometry hit by the camera.

If they hit another surface, they return black. If they don't hit another surface, they return white. Since multiple rays are being shot out, the resulting pixels can be anything between black and white. The Max Distance determines how far each ray will radiate (i.e. look) from the geometry for another surface. A value of 0.000 is actually infinity; this explained why my renders for my interior space were turning out black. The window did provide an opening to infinity (which would give a white pixel), but since the return values for the rays were being averaged, the resulting pixels were almost completely black.
Ben said that to determine what setting I should use for Max Distance, I should use a value of about 1/3 the longest distance in the scene. I used the Distance Tool in Maya to figure this out:

I got a value of about 21, so I used a Max Distance of 6 (hey I know it's not 1/3 of 21, I can count) and rendered out my occlusion passes successfully. Additionally, my render time was drastically reduced to about 1 1/2 minutes for a 1920x1080 frame. Because I was exporting 32-bit EXRs, it was easy to crush values and adjust the contrast without degrading the quality of the image.
Ambient Occlusion (Wikipedia)
No comments:
Post a Comment