Preliminaries

As well as anything related to raytracing with Blender, because of the supplementary calculus time required by your computer, raytracing is only an option that you should feel free to activate and deactivate. This is done by the mean of the Scene menu (F10 key). The Render tab shows a button labeled Ray you will have to activate in order to use raytracing in your pictures.

01.png

Soft shadows

When you add a new lamp in a scene, the Shadow and Spot panel reveals interesting features for the realism of your lighting.

  • Ray Shadow:

This button enables shadows computed according to the raytracing methods: the shadows are exact and the borders are perfectly sharp (contrary to the the shadows that are obtained to the shadow buffers scanline method, that are more approximate, with varying quality, but easily turned into soft shadows).

  • Shadow:

This color picker lets you choose the color of the shadows. The purpose of colored shadows is to simulate ambient light more quickly than using radiosity or ambient occlusion.

09-soft-norayshadowpng.png09-soft-rayshadowpng.png09-soft-coloredshadowpng.png

The soft shadows are obtained through the use of the other parameters of the same panel, making the assumption that the light source is not any more a point, but has a size and a surface.

  • Adaptive QMC and Constant QMC:

There we specify the sampling mode of the soft shadows. The Constant mode is more realist, but requires a greater number of Samples in order to get a better visual result (less noise and grain). Adaptive enables sampling variation, so that the sampling is increased where it is the most useful. Works well with a low Samples value, but provides poorer visual result (more noise and grain).

The choice between the two modes results from a compromise between visual aspect and render time.

09-soft-QMC_constant.png 09-soft-QMC_adaptative.png

With the same Samples value, the shadow is more grainy in Adaptive mode than in Constant

  • Soft Size:

This parameter sets the virtual size of the area lamp that is to generate fost shadows. The more the size is close to zero, the more it tends toward a point light with sharp shadows. On the other hand, the more the size is high, the more the shadows become diffuse. This parameter is only useful with Samples greater than 1.

09-soft-Size_0.01.png09-soft-Size_1.0.png09-soft-Size_3.0.png09-soft-Size_5.0.png

Softness of the shadows accordingly to the Soft Size parameter

  • Samples:

The more diffuse the shadows, the more you have to increase the sampling to get an attractive result. Be careful with high Samples values, because of the render times!

09-soft-Samples3.png09-soft-Samples5.png09-soft-Samples8.png

Increasing the number of Samples produces less noisy and grainy shadows

Area lights

The area lights are older, and offer more complete settings. Because of this, we will pay them a special attention.

Basic settings

Let's start by downloading our working scene (please check attached files). After unpacking and opening the file, select the only lamp, go to the Shading (F5 key) menu, and then in the Lamp buttons.

01-bis.png

In the Preview tab, with your lamp selected, activate the Area button. The Lamp tab is automatically updated in order to show new slightly different options: choose a Square shape and increase the size of the edge of the square up to 2 (Size 2.00). In the Shadow and Spot tab, activate the Ray shadow button, and note that new options appear: increase the number of Samples up to 8 (less if you only have an old computer).

02.png

You will immediately suffer from the first issue concerning the Area lamps: with the very same Energy and Dist values, a lamp Area and a regular Lamp don't have the same lighting potential. Of course, you can lower the Energy of the lamp to correct this, but a better way is to lower the Dist value, because the lighting of Area lamps is known to be more sensitive to the distance. A value of 10.00 is generally a good start.

02-bis.png 02-ter.png

The Dist parameter controls the lighting intensity

Tip: The Exp slider from the World panel, in the World buttons of the Shading menu F5 can also help to adjust the exposure of the image.

Fine tuning of the lamp

The first tests with this kind of lamp already give satisfactory results, but you can achieve more realist lighting with more adjustement of the lamp's parameters. In particular, you can define more precisely its shape and its dimensions so that it is the closer to the kind of light source to be simulated. For example, in order to simulate the lighting coming through a window, you would change the shape of the lamp to Rect, and set accordingly its dimensions.

03.png

You will note that in the 3D views, you can not only move the lamp using the G key, as for every other lamp, but also rotate it using the R key, so that you can translate and orient the lamp and make the lighting more realist.

  • Shape:

You can set an appropriate shape to your area light: either Square, either Rectangular. Try as much as you can to stick to the shapes and dimensions of the "real" entites producing the lighting in order to get more believable results.

  • Size:

The Square shape comes with a unique Size setting button, while the Rect shape come with two settings buttons, Size X and Size Y. These buttons give you control over the dimensions of your area light.

Dealing with the shadows

We already saw in the basic settings that you only need to increase the Samples value in order to soften the borders of the shadows. Everything else is a matter of finding a compromise between visal impact and supplementary time spent into computation of the picture. Of course, the more you increase Samples, the longer it will take to render the picture.

  • Umbra:

This button let you emphasize the intensity of shadows in the area fully protected by the direct rays shot by the lighting source. Used with softened shadows, the lighting conditions between fully shadowed areas and fully lit areas change more quickly. 02-ter.png04.png

The influence of the Umbra button

  • Dither:

This is a sampling applied over the borders of the shadows, quite the same way anti-aliasing is applied by the OSA button on the borders of an object. It helps to soften a little more the borders of shadows when the Samples is set low. It is not useful with high Samples values. The following test is made with Samples 2.00.

05-nodither.png05-dither.png

The influence of the Dither button

  • Noise:

The shadow samples are offsted from each other in a pseudo-random way, which artificially soften the borders of the shadows. Once again, this option is not very useful when you use a high Samples value, the drawback is that this button generates a quite visible grainyness.

05-nodither.png 06-noise.png

The influence of the Noise button

To sum up things, if your computer has a low computing power and if you want to use Area lamps and raytracing anyway, you could find useful to set a low Samples value (like 2.00) and activate the buttons Dither and/or Noise in order to simulate slightly softer shadows. It stays obvious that these results will never be better than the same lighting with high Samples values.

Resize your scene

You will note that changing the Size parameter of your Area lamp doesn't effect the lighting intensity of your scene. On the other hand, rescaling the lamp using the S key could dramatically increase or decrease the lighting intensity of the scene. This behavior has been coded this way so that you can fine tune all your light setting and then decide to scale up (or down) the whole scene without suffering from a drastic change in the lighting intensity. If you only want to change the dimensions of your Area lamp, without messing with its lighting intensity, you are strongly invited to use the Size buttons instead.

08.png

Article written on January the 2nd, 2005.

Updated on November the 30th, 2008 for Blender 2.48a. Comments re-initialized