Light layer

The above example uses a directional light layer to cast shadows from the kraken on the sea floor and itself. It is based on a template from BixPack 29.

What can I do with the light layer?

With the light layer you can lighten your scene, add flares, shadows and light beams.


How do I add a light layer?

Choose LAYER > Add layer > Add light layer... to add a new light layer.

The new light layer can be selected from the layers dropdown to make it the active layer.

Examples

The installer comes with shows demonstrating the possibilities of the light layer. Choose FILE > Open show... and select a show from the BluffTitler/Media/Shows/Light folder.

To quickly switch between your own shows and the ones that came with the installer, click on the Personal and App buttons in the upper right corner of the file dialog.

Point light

With the first layer style dropdown you can set the light type.

This example uses a Point light


Shadows

With the shadow properties you can make layers cast shadows over themselves and other layers.

Mark the Never cast shadows checkbox in the LAYER > Active layer properties... dialog to prevent a layer from casting shadows.

Learn more

Light flare

Make the light itself visible by using a flare texture by pressing the Change texture... button.

By default, the light is behind the camera so you might have to move it to make it visible.

This example uses the flare16.jpg texture and the Flare effect.


Lightbeams

With the Beam length property you can add lightbeams to text, vector, picture, model and sketch layers. Place the light at the other side of the text to make maximum use of this effect.

Mark the Never cast lightbeams checkbox in the LAYER > Active layer properties... dialog to prevent a layer from generating lightbeams.

The current version has 1 limitation: transparent pictures can't generate lightbeams.


Multiple lights

You can create up to 4 point lights. This example uses a red, green and blue light.



Light layer style 1

Ambient light

An ambient light has no position and no direction: it illuminates everything the same way. The colour of the ambient light determines the background colour of the scene. You can override this by choosing FILE > Set background colour....


Directional light

Directional lights have a direction and no position: they cast light in a single direction. A very distant point light, like the sun, is practically a directional light.


Point light

Point lights have a position and no direction: they cast light in all directions, like a light bulb.


Light layer style 2

Flare is always visible

The light is always visible, even when it is behind another layer.

Click on the Change texture... button to load a flare texture. The default light position is behind the camera, so you might have to move the light to make it visible.


Flare is visible if light is visible

This is the realistic situation.

Click on the Change texture... button to load a flare texture. The default light position is behind the camera, so you might have to move the light to make it visible.


Flare is visible if light is invisible

This unrealistic option can be used for special effects.

Click on the Change texture... button to load a flare texture. The default light position is behind the camera, so you might have to move the light to make it visible.


Flare is always invisible

The light is never visible.

Click on the Change texture... button to load a flare texture. The default light position is behind the camera, so you might have to move the light to make it visible.


Light layer style 3

Projected shadows on floor

Shadows are turned on with the Shadow intensity property. The 3rd style sets the shadow algorithm.

Projected shadows (also known as fast or fake shadows), are super fast, can handle transparent textures and morph effects, but only render shadows on the floor. Set the vertical position of this floor with the Shadow plane position property.

When using a picture layer as the floor, use the 3D in background style.

When using a mirror layer as the floor, use the Not clipped style.


Projected shadows on wall

Shadows are turned on with the Shadow intensity property. The 3rd style sets the shadow algorithm.

This is the same as Projected shadows on floor style, except it projects the shadows on the wall. Set the depth position of this wall with the Shadow plane position property.


Shadow volumes

Shadows are turned on with the Shadow intensity property. The 3rd style sets the shadow algorithm.

Shadow volumes (also known as stencil shadows) can render shadows on other layers, but are slower, can't handle transparent textures and can't handle morph effects.

In contrast to projected shadows, shadow volumes need other layers. And the layer that receives the shadow must write to the depth buffer. For example, picture layers must use the 3D in 3D space style to receive shadows.

Shadow volumes are rendered incorrectly when the camera stands in the shadow. This is a patent issue (Carmack's reverse).


Shadow maps

Shadows are turned on with the Shadow intensity property. The 3rd style sets the shadow algorithm.

Shadow maps solve the 3 biggest limitations of shadow volumes: transparent textures are supported, morph effects are supported and the camera can stand in the shadow!

But this algorithm is not perfect either. It only works with directional lights and it suffers from aliasing issues because of the limited resolution of the shadow map. Press <F2> to inspect the shadow map.


Techniques to improve the quality of the shadow maps

  • Switch to a higher quality: Choose SETTINGS > High quality.
  • Keep the rectangular box containing all the layers that cast shadows as small as possible. Mark the Never cast shadows checkbox in the LAYER > Active layer properties... dialog to prevent a layer from casting shadows. Floors and mirrors normally do not have to cast shadows.
  • Fight shadow acne with the Shadow map bias propery.
  • Increase fog: use the Fog range property of the camera layer.

Cascading shadow maps

Cascading shadow maps (CSM) is an advanced version of the simple shadow maps (SSM) algorithm offering higher quality shadows, especially with bigger scenes. To protect the render speed and memory use, CSM is only used when the following criteria are met:

  • A single camera layer
  • A single light layer casting shadows
  • No cube map layers

Shadow algorithm comparison matrix

No shadow algorithm is perfect...

 Projected shadowsShadow volumesShadow maps
Directional lights
Point lights
Sharp shadows without aliasing
Flat objects
Super fast
Does not require much memory
Camera can stand in the shadow
Transparent textures
Morph effects
Layer option Do not receive shadows
Mirror layer
The shadows fall on other layers
Soft shadows

Light layer properties

Position

The position of the point light.

1st slider: horizontal (x) position

2nd slider: vertical (y) position

3rd slider: depth (z) position

Press <F2> to render the coordinate system.


Direction

The direction of the directional light.

1st slider: horizontal (x) direction

2nd slider: vertical (y) direction

3rd slider: depth (z) direction


Colour

The diffuse colour of the light.

1st slider: red

2nd slider: green

3rd slider: blue

When you press <F3> and the mouse is inside the tool window, the standard Windows colour dialog is presented. When the mouse is outside the tool window, the colour of the current mouse position is copied: it's a colour picker!

The colour an object appears to have is the result of the combination of the light colour and the material colour. For example when you light a yellow object (255, 255, 0) with a purple light (255, 0, 255) it appears red (255, 0, 0) because that's the colour component they have in common.


Specular colour

The colour used for specular highlights.

1st slider: red

2nd slider: green

3rd slider: blue

When you press <F3> and the mouse is inside the tool window, the standard Windows colour dialog is presented. When the mouse is outside the tool window, the colour of the current mouse position is copied: it's a colour picker!

When this property is (0, 0, 0), the specular light colour is used.


Intensity

The light intensity. The neutral value is 1. A high value simulates overexposure.


Beam length

The length of the lightbeams. The length of the lightbeam also depends on the distance to the light.


Beam range

The minimum distance to the light necessary to generate a lightbeam.


Beam colour

The colour of the lightbeam.

1st slider: red

2nd slider: green

3rd slider: blue

When you press <F3> and the mouse is inside the tool window, the standard Windows colour dialog is presented. When the mouse is outside the tool window, the colour of the current mouse position is copied: it's a colour picker!


Shadow intensity

The darkness of the shadows:
0: no shadows
0.2: subtle shadows
1: pitch black shadows


Shadow softness

1st slider: cast shadow softness

2nd slider: self shadow softness

Shadow softness requires the Directional light style and the Shadow maps style.

Fix artifacts with the Shadow map bias property.


Shadow map bias

This property is only used when using the Shadow maps style. It is used to fight the phenomenon called shadow acne.

1st slider: adds a fixed offset

2nd slider: adds an offset depending on the angle between the surface normal and the light direction.

Play around with the sliders until the shadow acne is gone. Switching to a higher quality also helps: choose SETTINGS > High quality.


Shadow plane position

This property is only used when using Projected shadows on floor style or the Projected shadows on wall style. It sets the position of the plane the shadows fall on.


Flare size

The size of the flare.

Click on the Change texture... button to load a flare texture. In the same dialog, the effect can be selected. The Flare effect works great with lights.


Flare colour

The colour of the flare.

1st slider: red

2nd slider: green

3rd slider: blue

When you press <F3> and the mouse is inside the tool window, the standard Windows colour dialog is presented. When the mouse is outside the tool window, the colour of the current mouse position is copied: it's a colour picker!


Shadow intensity

Black shadows

If the Shadow intensity property is set to 1, the shadows are pitch black.


Subtle shadows

If the Shadow intensity property is set to 0.2, the shadows are more realistic.


Shadow softness

Hard shadows

When the Shadow softness property is set to 0, the shadows have hard edges.


Soft shadows

When the Shadow softness property is set to 1, the shadows have soft edges.


Shadow acne

Shadow acne

If the Shadow map bias property is too low, ugly aliasing artifacts are visible. This is called shadow acne.


Peter Panning

However if the Shadow map bias property is too high, the shadows no longer connect to the model and it seems to be floating. This is called Peter Panning.


With the right Shadow map bias values, the shadows are perfect!