Foreground Shader Properties

Rendering

The Foreground shader can be used to add various effects to a model. Foreground types and their shader properties are as follows:

  • Depth cue
  • Fog
  • Fog light
  • Forefoto
  • Ground fog
  • Light scattering
  • Scattering medium
  • Scforefoto
  • Snow

Depth cue

The Depth cue option can be used to add a depth cue to the model. The effect has the following parameters:

Note: The scale of the model affects the parameter values.

In the example, the start point distance is 7,000, the end point distance 12,000 and the effect color (90,170,245).

Fog

The Fog option is used to add a fog effect to the model. The effect has the following parameters:

In the example, the start point distance is 8,000, the fog color (90,170,245), the fog density 0.8 and the background visibility value FALSE .

Fog light

This option can be used to create an effect where a light source seems to be surrounded by fog. The light source can only be a point light. The effect has the following parameter:

  • Fog density
Note: The effect can only be used when the light source’s Scattering parameter value is TRUE.

In the example, the value of the fog density is 60. The light source intensity is 0.8.

Forefoto

This property sets a photograph as the foreground of the model. Following parameters are defined for the image:

  • File name - Image file name and path.
  • Mask file name - Mask image file name and path. The transparent parts of a foreground can be defined with a mask image file.

Selecting an Image File in the Background/Foreground Edit dialog box

Create a Transparent Foreground from a Photo

Ground fog

This option is used to create a fog effect in the model where the fog seems to rise from the surface. This fog effect provides a more subtle result than the normal fog effect. The effect has the following parameters:

  • Fog distance - Radius of the fog area, i.e. the area over which the fog is spread.
  • Fog height - Fog dispersion factor.
  • Fog color

    Select a Color Property for a Background or Foreground

  • Ground point - Point on the surface.
  • Ground normal - Point on the axis in which direction the fog disperses
  • Max density - Fog density, values 0-1.
  • Ignore background - Visibility of the model’s background, options TRUE and FALSE
Note:
  • The scale of the model affects the parameter values.
  • By entering the value zero or a negative value for the Fog height parameter, you can create an effect similar to normal fog.

In the example, the fog area radius is 2,000, the dispersion factor 1,300 and the fog color (255,255,255).

Light Scattering

This option is used to add an effect to the model where the light seems to be shining through dusty, smoky or foggy air. The light source can be a spotlight. The effect has the following parameters:

  • Scattering model - Light scattering type. The options are: isotropic, Rayleigh, hazy Mie, murky Mie, Henyey-Greenstein.
  • Fog density - Fog or smoke density.
  • Samples - Number of fog areas per ray of light. The value must be great enough.
  • AA threshold - Threshold value for adaptable softening, values 0–100.
  • AA level - Adaptable softening, values 0–10, at values above zero the function is on.
  • Max depth - Maximum distance for ray of light, outside of which the ray is ignored. The value is highly dependent on the image size. The default is 1000.
  • Falloff threshold - Cropping for the area influenced by the light source. The value is highly dependent on the intensity of the light source and the image size. The default is 0.001.
  • Source attenuation - Parameter for softening the attenuation of light from the light source. The value depends on the image size. If the value is too high, the whole effect will disappear, so try lower values first.
  • Surface attenuation - Parameter for surface color attenuation. The higher the value, the more the “fog” absorbs light and the darker the surfaces. You should begin with very low values.
  • Volume attenuation - Attenuation factor for the rays of light. When the value is high, the rays are only visible when very close to the viewing point, and attenuate when moving further.
  • Eccentricity - Ellipse eccentricity parameter, only used with the Henyey-Greenstein scattering type, values -1–1.
  • Noise octaves - Degree of detail of the noise, values 1–25.
  • Noise amplitude - Noise factor.
  • Noise scale - Proportional scale factor of the noise.
  • Noise gain - Noise contrast, values 0–1.
  • Bounds - Value FALSE.
Note: The effect can only be used when the light source’s Scattering parameter value is TRUE. You can define the parameter, when you are creating a new light.

The parameter values in the example. The light source intensity is 0.8.

Scattering model=Isotropic

Density=0.00095

Samples=45

AA threshold=0

AA level=0

Max depth=21500

Falloff threshold=0

Source attenuation=0.1

Surface attenuation=0

Volume attenuation=0

Eccentricity=0.4

Noise octaves=2

Noise amplitude=0.3

Noise scale=1

Noise gain=0.6

Bounds=FALSE

Snow

This option is used to add the effect of snowflakes falling in front of the viewing point. The effect has the following parameters:

  • Near scale - Scale factor of the flakes near the viewing point.
  • Far scale - Scale factor of the flakes far from the viewing point.
  • Flake size
  • Flake density - Distance between flakes.
  • Noise amplitude - Noise factor of flake edges, values 0–1.
  • Noise scale - Noise scale factor, values 0–1.
  • Flake color

    Select a Color Property for a Background or Foreground

In the example, the scale factor of the flakes near the viewing point is 0.08 and that of those far from the viewing point 0.02,the flake size is 0.4, the flake density 0.4, the edge noise factor 0.2, the noise scale factor 0.03, and the flake color (255,255,255).