Lighting Tutorial

Faking radiosity without adding lights

We left the previous Lighting tutorial page with the render to the right

Recall that all images in this tutorial have been Gamma corrected with a gamma of 2.2.

As it is now, the render looks a liitle unnatural because of the lack of indirect illumination coming from light bouncing around on objects, walls, floor and ceiling. The objects in the room are strictly illuminated according to the inverse square law. The shadows are very dark and even though all the walls are red, which should cast a trong reddish tint all over the scene, the table and the dishes as well as the food don't have any red tint on them.

We need to fake indirect illumination and in this room, the first thing we need to do is add some red tinting to the scene. Although the walls are red, we can nevertheless assume that the ceiling is white so we don't really need to cast a strong red tint. Just a slight tint should do the trick.

In the following render to the right, the candle light color was changed to RGB(255,192,192) to give them a redish tint. Note that the light color change was made on the light model and not on the 5 choreography light shortcuts individually.

The rendered scene is already warmer. The turkey, in particular is much more appetizing. The red tint could probably be pushed further to suit mood and personal taste but for now, I don't want to push that too far because I have other tricks to add to that scene.

The next aspect that bothers me in the illumination of that scene is that the shadows are very dark, even black in some places. This is very unnatural. Even in such a scene, the indirect illumination bouncing off the walls would add considerable illumination in the shadow parts such as the back of the chairs.

In Computer Graphics, there is a trick that is available for many many years that was designed as a very cheap fake for GI. This is the ambiance color. The ambiance color adds a color to all the pixels in the rendered scene.

So we will add an ambiance color to the choreography. And ambiance of RGB(255,192, 192) aet at 20% intensity will give a render similar to the one at the right.

As can be observed, the whole scene illumination have brightened due to the added ambiance color. There are no more black shadows in the scene.

Ambiance color is a very cheap trick that adds virtually no CPU cycles to the rendering process. The Ambiance color, though, should be used with parcimony because it tends to flatten the image. An ambiance of 20% is already quite a lot.

Still, the illumination is a little bit too uneven. If indirect illumination was taken into account, the credence at the back would be a little bit brighter due to light coming from the ceiling and the walls.

We can control how light attenuates with distance with the light "Attenuation" property. At 100% attenuation, we have the standard inverse square attenuation. At 50% we have a linear attenuation. That is light intensity decreases linearly with distance. In other words, it decreases much more slowly. And at 0%, light intensity is constant just as if the whole scene was enclosed inside the light falloff distance. And of course, any values between 100% and 50% produces an attenuation which is slower than inverse square but faster than linear and any value between 50% and 0% produces a falloff which is yet slower than linear.

Reducing light attenuation will make the scene illumination less harsh and more pleasant. More comfy too because it does not give the impression that the scene is located in a void.

I set the light attenuation to 66% and this produced the render to the right.

That is much better. The credence does not seem to be hiding in the shadow anymore. I selected an attenuation of 66% by trial and error. An attenuation of 50% (linear attenuation) did not produce enough contrast in shading between the table and the credence to be credible.

I find the table, the chairs and the credence a little floaty over the floor. That is because the shadows are not dark enough. So the next aspect we need to take care of is the shadows. Their strength and quality.