The above example uses 2 directional light layers to cast shadows on the kraken and the sea floor. It is based on a template from BixPack 29.
With the light layer you can lighten your scene, add flares, shadows and light beams.
Choose LAYER > Add layer > Add light layer... to create a new light layer.
The new light layer can be selected from the layers dropdown to make it the active layer.
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 come with the installer, click on the Personal and App buttons in the upper right corner of the file dialog.
With the first layer style dropdown you can set the light type.
This example uses the Point light
With the shadow properties you can make layers cast shadows over themselves and other layers.
You can prevent a layer to generate shadows by marking the Never cast shadows checkbox in the LAYER > Active layer properties... dialog.
You can make the light itself visible by loading 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.
With the Beam length property you can add lightbeams to text, vector, picture, model and sketch layers. Note that you have to position the light at the other side of the text to create this effect.
You can prevent a layer to generate lightbeams by marking the Never cast lightbeams checkbox in the LAYER > Active layer properties... dialog.
The current version has 1 limitation: transparent pictures can't generate lightbeams.
You can create up to 4 point lights. This example uses a red, green and blue 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 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 lights have a position and no direction: they cast light in all directions, like a light bulb.
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.
The light is always visible, even when it is behind another layer.
This is the realistic situation.
This unrealistic option can be used for special effects.
The light is never visible.
Shadows are turned on with the Shadow intensity property. The 3rd dropdown 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.
This is the same as Projected shadows on floor, except it projects the shadows on the wall. Set the depth position of this wall with the Shadow plane position property.
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 if the camera stands in the shadow. This is a patent issue (Carmack's reverse).
Shadow maps solve the 3 biggest limitations of shadow volumes: transparent textures and 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. To increase the effective use of the shadow map, remove as many layers as possible from the shadow map by marking the Never cast shadows checkbox in the LAYER > Active layer properties... dialog. For example, floors do not have to be rendered in the shadow map because nothing receives shadows from the floor. If the layer is rendered bigger in the shadow map, its shadow is rendered sharper.
Fight shadow acne with the Shadow map bias and Shadow softness properties.
Another shadow maps phenomenon is called Peter Panning. This happens when an object stands on a surface and its shadow gives the illusion it is floating. This can be solved by adding depth to the object and using a smaller Shadow map bias.
Choose SETTINGS > High quality to increase the resolution of the shadow maps.
No shadow algorithm is perfect...
|Projected shadows||Shadow volumes||Shadow maps|
|Sharp shadows without aliasing|
|Does not require much memory|
|Camera can stand in the shadow|
|Layer option Do not receive shadows|
|The shadows fall on other layers|
The light position of the point light.
The light direction of the directional light.
The diffuse colour of the light.
Note that the colour an object appears to have is the result of the combination of the light colour and the material colour. For example if 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.
The colour used for specular highlights. If this property is (0,0,0), the diffuse colour is used as the specular colour.
The light intensity. The neutral value is 1. A high value simulates overexposure.
The length of the lightbeams. The length of the lightbeam also depends on the distance to the light source.
The minimum distance to the light necessary to generate a lightbeam.
The colour of the lightbeam,
The darkness of the shadows the light creates.
If the Shadow intensity property is set to 1, the shadows are pitch black.
If the Shadow intensity property is set to 0.2, the shadows are more realistic.
This property is only used when using Projected shadows. It sets the position of the plane the shadows fall on.
This property is only used when using Shadow maps. It is used to fight the phenomenon called shadow acne.
If the Shadow map bias property is too low, ugly aliasing artifacts are visible. This is called shadow acne.
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!
The softness of the shadows. The 2nd slider controls the self shadowing softness.
This property is only used when using Shadow maps.
The size of the flare.
Click on the Change texture... button to load a flare texture. In the same dialog, the Flare effect can be selected.
The colour of the flare.