|
Plasma like fog, that is, fog which is self illuminating, can be simulated by the following VSL structure:
|
![]() |
In the Volume properties shader, a constant value is assigned to the illumination channel. The Illumination channel represents the total result of shading. This material assigns an illumination value directly. This means that light sources or shadows will not affect the fog, it appears self-illuminating.
A Noise object defines the Turbidity property. Use a parallel mapping to map this fog material, then noise uses continuous coordinates without seams. Noise is not centered at zero because negative values would result in empty patches in the fog.
Turbidity, the density of fog, is the strongest fog attribute in the sense that other illumination properties define the properties of one single fog particle, and the final result (color in the rendered image) is after all defined by turbidity. This makes sense: one tiny fog particle does not change the shading much, no matter how bright it is. There must be many such particles (=some amount of turbidity) before the contribution becomes noticeable.
Remember to check Volumetric effects in the Render settings/Ray tracing options, to get the effect visible.
Example file: tutorprojects/material/vsl/plasma
The rendering system handles the blending of fog effects to other illumination automatically. The blending ratio is defined by the Turbidity property, which defines the density of the fog. The blending process is not linear: The longer the distance, which the light travels inside the fog, the stronger the influence of the fog becomes, but the fog never stops the ray completely.
|
The example image shows the structure of a material, which overrules this default fog shading. The fog effect defined by it is linear: if a layer of say 1 meter changes the illumination traveling through it by 50 %, then two meters of fog hides the background completely. The density of the fog defines the distance, which is required for full impenetrability.
Example file: tutorprojects/material/vsl/linearfog |
![]() |
The two fog types presented above are self-illuminating: light sources do not affect them at all. A fog that reacts with light can be obtained by the following VSL code:
|
![]() |
Ensure that Volumetric effects and Lighting in volume are set in the Render settings/Ray tracing options.
Only the light sources having the Volumetric option set (set by default) create volumetric effects.
Example file: tutorprojects/material/vsl/shadowfog
The Linear fog example above explained how to define custom fog shading for a self-illuminating plasma fog using the Volume properties shader. It is possible to customize the default fog shading of fog that reacts with light in the Volumetric shading shader, which is evaluated after fog illumination computations.
The material below shows one such example, additive fog. The fog is diffusely illuminated. It has the special property that it never darkens the illumination behind it. A normal fog does this: black smoke can hide flames of fire.
![]() |
|
Example file: tutorprojects/material/vsl/additivefog
This example demonstrates how to use the Volume filtering shader. In this shader, it is possible to define how the interior of a material creates shadows. The shadowing property is defined by assigning suitable values to the VFilter:Transparency channel in the Volume filtering shader.
|
The VSL hierarchy is:
|
![]() |
Example file: tutorprojects/material/vsl/shadowbyfog |
![]() |