The Cornell Box Tutorial - Setup
So here is the Cornell Box in all its glory:

And this is the scene we are going to use for the tutorial.
The Cornell Box is probably the oldest scene used for comparing radiosity rendering engines. The most popular configuration is described at the http://www.graphics.cornell.edu/online/box/data.html.
For this tutorial, I invite you to download the Cornell-Demo-Defaults.prj project file. This is the actual Cornell Box data I modeled in A:M from the published specs for both dimensions and surface properties. The Cornell Box was a real box with real blocs inside. A photograph of the inside of the box was taken and the radiosity simulation renders were compared to the real photograph to see if the algorithm was working right. Thus, the Cornell Box have only 3 walls to allow taking a photo of the inside.
Here are a few things to note about this scene:
Small size of the scene
First thing to note is this scene is small. Very small compared to a normal room size. The room itself is 55cm wide by 55 cm high by 57 cm deep.
It is important to note that the Cornell Box is small relative to a normal room. Room size have a major influence on the way Photon Mapping properties should be set so it should always be noted carefully and objects in the room as well as the room itself should be modeled to actual scale.
Light arrangement
Second thing to note is the light arrangement.
The cornell Box is illuminated by a single flat and rectangular luminaire with a white diffuser. This type of luminaire have a very specific lighting characteristics. To simulate the luminaire, I arranged 25 klieg lights in a 4x5 array. This is actually one klieg light instanciated 25 times in the choreography.
I decided on a 4x5 array because I wanted to stay as close as possible to the original rectangle of the luminaire. I could have decided to use one large klieg light instead. But even though the representation of a klieg light face is a square the beam it project is clearly round. The shadow characteristics of a rectangular light fixture is sufficiently different from that of a round fixture that I felt I could use several lights instead of just one. Beside, in order to produce the same nice soft shadows from one large klieg light, I would need to multiply its number of ray cast by the number of lights in the array. In the end, that would not save on render time either. So the choice of using a light array instead of one single large light is a design choice. Not a technical choice. It is entirely based on the type of shadow quality I was looking for.
Light properties
Third thing to note is how the klieg light is setup. To simulate the way a flat diffuse light illuminates a scene, the klieg's Cone Angle is set to 180° and the Width Softness is set to 100%. The 100% Width Softness ensures that illumination falls-off at a cosine rate according to the angle from the light surface. This is how light from a flat surface behaves in reality. That is light emission reduces according to the cosine of the angle between the luminaire plane and the direction it is emited.
Falloff distance
Fourth thing to note is the klieg's Fall-Off distance.
The Fall-Off distance should be set is such a way that it doesn't touch any object in the scene. In this scene, you can see that the Fall-Off stops short of touching the walls and the tall bloc. This is especially important when the light intensity is small to ensure that all objects will be directly illuminated in a natural way.
If the fall-off distance is too long, the parts of the objects that falls inside the falloff distance will receive constant illumination. That is, no illumination gradient will be visible. This is clearly not something we want if wee wish to realistically render the scene.
The Fall-Off distance could be shorter but ideally it just needs to not touch any objects in a scene. If the falloff distance if too short, then light intensity needs to be cranked up very high. Sometime it is not really set a falloff distance that won't touch any objects in the scene. When this is not possible, then there are other rules to take care of.
In radiosity scene, all lights must cast shadows. Ray-traced shadows with 100% darkness, 16 Rays Cast and "Distribute Among Passes" set to ON in the shadows properties. Multi Rays Cast and distributing rays among passes is not only to get softer shadows, it is also to ensure that the shadows are actually black. When a light is setup to cast only one ray, the renderer does its best to simulate indirect lighting which results in non-black shadows. This is useful for normal Ray traced renders but not needed, nor desired for radiosity renders. Light shadow properties sould always be set to raytracing with more than one ray and shadow darkness set to 100% when lighting a scene for radiosity. Z-buffer shadows don't produce realistic shadows and should be avoided for radiosity renders.
Low light intensity
Fifth thing to note is the low light intensity.
The render to the right is a Raytrace render of the Cornell Box for comparison purpose.
For Raytrace render, you would probably want to have higher light intensity. But for Radiosity render, because the surfaces will also contribute light in the scene, light intensity are lower. In fact, light intensity can only really be adjusted by trial and error in Radiosity render mode. But there are ways to do quick preview radiosity renders.
Also, because radiosity renders must be gamma corrected with a gamma of 2.2, the "Preview Gamma" in the Tools-Options-Render pannel should also be set to 2.2 otherwise, it will be very difficult to find the proper light settings by trial and error because the final render will be very different from the preview renders.
On the choreography properties pannel, turn the Radiosity property to ON and render with the default radiosity settings which are: Photon Cast : 10000, Sample Area : 100, Photon Samples : 100, Intensity : 100%, Max Bounces : 15, Caustics : OFF, Final Gathering : ON, Samples : 100, Jittering : 0%, Precompute Irradiance : ON.
|