Current stable version: 0.1.1

Background Settings

Table of content:

How backgrounds work

There are five types of backgrounds in YafaRay. The main purpose of the background is not only to map the scene background, but to work as a light source as well. The background lights the scene as a spherical area light casting light inside. However, background lighting is only possible with a limited set of Lighting Methods & Background types:

 

Direct lighting

Pathtracing

Caustic photons

Direct lighting
Path tracing

Photon mapping

diffuse and caustics

Bidirectional

Single color


(1) (5)

Gradient

(1) (5)

Texture (2)

(1) (5)

Texture - IBL (3)

Darktide SunSky (4)

SunSky (4)

(1) Use background button enabled in path tracing settings.
(2) Use IBL button disabled or a RGB texture is used.
(3) Use IBL button enabled and a HDR texture is used.
(4) Skylight and Sun options enabled.
(5) Use background button enabled in photon mapping settings.
Related articles: Lighting Methods Overview.

Single color

This background casts light in a single color. It can be useful for tests and simple setups. This background type works as a light source only in path tracing and photon mapping, by enabling the Use background option in the Settings section. Power of the background lighting can be controlled by the background color alone, or by a combination of background color and background power. Power setting is in fact a multiplier for background color.

Related articles:

Gradient

This option calculates a background composed of four colors: two sky colors above the horizon and two ground colors below it. The horizon position is calculated on camera specifications. Each pair of colors blend softly one each other to form a gradient. However, colors next to the horizon are not blended so a clear horizon line can be defined. This background can be very useful for:

  • Calculating the correct horizon line based on camera specifications, for compositing works.
  • Working out a 'fake' ground plane that extends the real ground mesh till the horizon line, as in the example below:


In this image, the background ground colors and the mesh used as a ground don't match.

In this image, the background ground colors have been corrected so it forms a continous plane till the horizon line.

Background ground colors are given the same color as the ground mesh. The color used is not the mesh diffuse color, but the rendered one.

This background type works as a light source only in path tracing and photon mapping, by enabling the Use background option in the Settings section. Power of the background lighting can be controlled by the background colors alone, or by a combination of background colors and background power. Power setting is in fact a multiplier for background colors.

Related articles:

Texture

The main point of this background type is using HDR images to light the scene. Supported formats are hdr and exr.

The HDR images are loaded using Blender Texture buttons (F6) in World mode [1].

Once a texture is loaded, in the Blender World buttons (F8), we select the background coordinates in the Texture and Input panel, depending on the HDR image loaded (see images below). Supported coordinates are AngMap and Sphere.

Typical look of an angular HDR map, from http://www.debevec.org/

Typical look of a spherical HDR map, from http://hdri.3dweave.com/library/park1.php

YafaRay will use the texture datablock set in the Blender World buttons (F8). The other parameters needed to configure the HDR backgrounds are located in the YafaRay settings UI, under the World tab:

  • Use IBL: Enable this option to use the background as a light source. A HDR image is needed.
  • Rotation: Rotates the background.
  • Power: A multiplier for background colors.
  • IBL Samples: Defines the amount of samples taken to calculate the soft shadows. The more samples, the less noisy the shadows but the longer it will take to render. The total amount of light sampling depends as well on the anti-aliasing settings, as explained in this section.

Related articles:

Works with:

Darktide Sunsky

Sunsky is a background type that approximates the full spectrum of daylight for various atmospheric conditions.  The main concepts of the Darktide sunsky model are:

Turbidity

Turbidity is the haziness of a fluid caused by individual suspended particles that are generally invisible to the naked eye, similar to smoke in air. In another words, amount of dirtiness in the sky, the higher the more yellowish/reddish the sky becomes. Recommended ranges are:

  • (2, 3)= exceptionally clear sky
  • (3, 5)= normal day
  • (5, 12)= foggy day
Turbidity= 2 Turbidity= 5 Turbidity= 10

Horizon brightness

Brightness of horizon gradient controls brightness of the horizon relative to the sky.

Luminance of the horizon defines width of the gradient separating the horizon from the sky. Use similar values for both settings. Recommended ranges are:

  • Use (0, 1.2) when turbidity is (2, 4).
  • Use (0.9, 1.5) when turbidity is ≥ 5.
  • Turbidity= 2
  • Horizon Gradient= 0.1
  • Luminance of Horizon=0.1
  • Turbidity= 2
  • Horizon Gradient= 0.5
  • Luminance of Horizon=0.5
  • Turbidity= 2
  • Horizon Gradient= 1
  • Luminance of Horizon= 1

Sun disk

Solar region intensity and Width of circumsolar region are settings to control brightness and size of the sun disk, respectively. The bigger these values are, the brighter and smaller the sun disk will be. To see the sun disk, use similar values for both settings in a range of (10, 40). You can achieve other results though, like a small sun disk but not so bright, by using different values in each setting.

A brighter bigger sun means that highlights will be bigger and brighter on specular surfaces.

  • Turbidity= 2
  • Solar region intensity= 10
  • Width of c. region= 10
  • Turbidity= 2
  • Solar region intensity= 20
  • Width of c. region= 20
  • Turbidity= 2
  • Solar region intensity= 40
  • Width of c. region= 10

Backscattered light

Backscattered light is the light scattered back by the atmosphere turbidity. In practice, higher values produce a brighter sky around a consequently smaller sun disk. The backscattered light contributes less the lower the Turbidity values are, though.

  • Turbidity= 2
  • SCI=15
  • WCR=20
  • Backscattered light= 1
  • Turbidity= 2
  • SCI=15
  • WCR=20
  • Backscattered light= 5
  • Turbidity= 2
  • SCI=15
  • WCR=20
  • Backscattered light= 10

Sun position controls

  • From (get angle): Takes sun angle from a selected sun lamp in the Blender scene.
  • From (get position): Takes sun position from a selected sun lamp in the Blender scene.
  • From (update sun): Exports Sun position and angle to a selected sun lamp in the Blender scene.
  • Direction Sphere: Drag your mouse cursor over this sphere to interactively select the direction of the sun rays.
  • Direction coordinates: Coordinates for direction of the sun rays.

Altitude

With this setting, we can give the camera a different altitude relative to the background center. If Altitude increases, the background horizon lowers. This option can be useful to render objects from a camera which is above the ground level, while still getting a correct position of the background horizon.

Altitude= 0 Altitude= 0.25 Altitude= 0.50

Night

This feature renders the scene at night, with the Sun acting as the Moon.

Example of a Darktide Sunsky in Night mode.

Other Settings

  • Add real sun: A realistic Sun model is added to the scene, taking into account Sun position and power settings.
  • Sun Power: Power of the Sun added.
  • Samples: Samples for both the Sun and the Skylight. The more samples the less noise and the better glossy reflections, but the more render time as well.
  • Add Skylight: The sky casts light.
  • Sky Brightness: Independent brightness control for background sky colors; it does not affect amount of cast light.
  • Power: Multiplier for background sky colors.

Related articles:

Works with:

Sunsky

Sunky is a similar concept to Darktide Sunsky, albeit simpler and handling colors in a different way. It is also a background type that approximates the full spectrum of day light for various atmospheric conditions. In these tests we have used Sun power= 0.50 and Skylight power= 1.0:

Turbidity

Turbidity is the haziness of a fluid caused by individual suspended particles that are generally invisible to the naked eye, similar to smoke in air. In another words, amount of dirtiness in the sky, the higher the more yellowish/reddish becomes the sky.

Turbidity= 3 Turbidity= 6 Turbidity= 12

Horizon brightness

A (HorBrght) controls brightness of the horizon relative to the sky.

  • Turbidity= 3
  • A (HorBrght)= 0.10
  • Turbidity= 3
  • A (HorBrght)= 0.60
  • Turbidity= 3
  • A (HorBrght)= 1.30

Luminance of gradient near the horizon

B (HorSprd) defines width of the gradient separating the horizon from the sky.

  • Turbidity= 3
  • A (HorBrght)= 1.00
  • B (HorSprd)= 0.50
  • Turbidity= 3
  • A (HorBrght)= 1.00
  • B (HorSprd)= 1.00
  • Turbidity= 3
  • A (HorBrght)= 1.00
  • B (HorSprd)= 1.50

Sun Brightness and Size

C (SunBrght) and D (Sunsize) are settings to control brightness and size of the sun area, respectively. The bigger these values are, the brighter and bigger the sun area will be.

A brighter and bigger sun means that highlights will be bigger and brighter on specular surfaces.

  • C (SunBrght)= 0.2
  • D (Sunsize)= 0.2
  • C (SunBrght)= 0.6
  • D (Sunsize)= 0.2
  • C (SunBrght)= 1.0
  • D (Sunsize)= 0.2

Back scattered light

E (Backlight) is the light scattered back by the atmosphere turbidity. In practice, higher values produce a brighter sky around the sun disk. The backscattered light contributes less the lower the Turbidity values are, though.

  • Turbidity= 5
  • E (Backlight)= 0.5
  • Turbidity= 5
  • E (Backlight)= 2
  • Turbidity= 5
  • E (Backlight)= 5

Sun position controls

  • From (get angle): Takes sun angle from a selected sun lamp in the Blender scene.
  • From (get position): Takes sun position from a selected sun lamp in the Blender scene.
  • From (update sun): Exports Sun position and angle to a selected sun lamp in the Blender scene.
  • Direction Sphere: Drag your mouse cursor over this sphere to interactively select the direction of the sun rays.
  • Direction coordinates: Coordinates for direction of the sun rays.

Other Settings

  • Add real sun: A realistic Sun model is added to the scene, taking into account Sun position and power settings.
  • Sun Power: Power of the Sun added.
  • Samples: Samples for both the Sun and the Skylight. The more samples the less noise and the better glossy reflections, but the more render time as well.
  • Add Skylight: The sky casts light.
  • Power: Multiplier for background sky colors.

Related articles:

Works with: