1. 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 Render menu. The Shading panel shows two options labeled Ray Tracing and Shadows you will have to activate in order to use raytraced shadows in your pictures.

Good to Know:

The following options are found in the Shadow panel of the Object Data menu, when any lamp is selected.

  • 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).

  • Color of Shadows cast

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

Comparison between No shadow, raytraced shadows, and colored raytraced shadows

2. Soft shadows

When you add a new lamp in a scene, the Shadow panel reveals interesting features for the realism of your lighting. The soft shadows are obtained through the use of the following parameters. They actually fake the lighting so that even point light sources spread their luminosity as if they were surfaces.

2.1 Adaptive QMC and Constant QMC

There we specify sampling mode of 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.

With the same Samples value (5), the shadow is more grainy in Adaptive (left) mode than in Constant (right)

2.2 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.

Softness of the shadows accordingly to the Soft Size parameter: from top left to bottom right: values of 0.01, 1.0, 3.0 and 5.0

2.3 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!

Increasing the number of Samples produces less noisy and grainy shadows. From left to right, values of 3, 5 and 8

3. Area lights

The area lights are an older way to produce soft shadows, and offer more complete settings. Because of this, we will pay to them a special attention.

3.1 Basic settings

Let's start by downloading our testing scene attached to this article. Open the file, and with the only lamp selected, go to the Object Data menu, and then in the Lamp buttons.

In the Lamp panel, activate the Area option. The others panel are automatically updated to show new different options: in the Area Shape panel, choose the Square option and increase the size of the edge of the square up to 3 (Size 3.000). In the Shadow panel, make sure that the Ray Shadow option is active, and note that slightly different sampling options are available: increase the number of Samples up to 8 (less if you only have an old computer).

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.

The Dist parameter controls the lighting intensity

Tip: The Gamma value from the Lamp panel, in the Object Data menu of the Area lamp can also help to adjust the exposure of the image.

On the left, an area lamp with a Gamma equal to 1.000 ; on the right, the very same one with a Gamma of 0.100

3.2 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.

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.

3.2.1 Shape

You can set an appropriate shape to your area light: either Square, either Rectangler, using the proper option buttons. 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.

3.2.2 Size

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

Hint: 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.

3.3 Dealing with the shadows

You are know fairly knowledgeable with the Adaptive QMC and Constant QMC methods for soft shadows. But the Constant Jittered method introduces a few more parameters you might like to explore.

3.3.1 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.

The influence of the Umbra check option

3.3.2 Dither

This is a sampling applied over the borders of the shadows, quite the same way anti-aliasing is applied 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.

The influence of the Dither check option

3.3.3 Jitter

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.

The influence of the Noise check option

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.

Article written on January the 2nd, 2005.
Updated on November the 30th, 2008 for Blender 2.48a. Comments re-initialized.
Updated on June the 21st, 2010 for Blender 2.50 Alpha 2.