Go to: Related nodes. Attributes.

Light Fog nodes are used to fill a spotlit region with the appearance of fog or mist.

In the table below, important attribute have their names indicated in bold in the description column.

This node is MP safe

Node nameParentsClassificationMFn typeCompatible function sets
lightFogdependNode
shader/volume/fogkLightFogMaterialkBase
kNamedObject
kDependencyNode
kLightFogMaterial

Related nodes

envFog, lightLinker, lightList

Attributes (40)

color, colorB, colorBasedTransparency, colorG, colorR, density, fastDropOff, filterSize, filterSizeX, filterSizeY, filterSizeZ, lightAmbient, lightBlindData, lightDataArray, lightDiffuse, lightDirection, lightDirectionX, lightDirectionY, lightDirectionZ, lightIntensity, lightIntensityB, lightIntensityG, lightIntensityR, lightShadowFraction, lightSpecular, matteOpacity, matteOpacityMode, outColor, outColorB, outColorG, outColorR, outMatteOpacity, outMatteOpacityB, outMatteOpacityG, outMatteOpacityR, outTransparency, outTransparencyB, outTransparencyG, outTransparencyR, preShadowIntensity

Long name (short name)TypeDefaultFlags
filterSize (fs) float30.0, 0.0, 0.0inputconnectablehidden
The current sample size that has to be shaded
filterSizeX (fsx) float0.0inputconnectablehidden
The x component of the current sample position
filterSizeY (fsy) float0.0inputconnectablehidden
The y component of the current sample position
filterSizeZ (fsz) float0.0inputconnectablehidden
The z component of the current sample position
lightDataArray (ltd) lightDataNULLarrayinputconnectablehidden
The lighting information this node computes.
lightDirection (ld) float3inputconnectablehidden
The light direction.
lightDirectionX (ldx) float1.0inputconnectablehidden
The x component of the direction.
lightDirectionY (ldy) float1.0inputconnectablehidden
The y component of the direction.
lightDirectionZ (ldz) float1.0inputconnectablehidden
The z component of the direction.
lightIntensity (li) float3inputconnectablehidden
The light intensity (its a colour).
lightIntensityR (lir) float1.0inputconnectablehidden
The red component of the intensity.
lightIntensityG (lig) float1.0inputconnectablehidden
The green component of the intensity.
lightIntensityB (lib) float1.0inputconnectablehidden
The blue component of the intensity.
lightAmbient (la) booltrueinputconnectablehidden
The boolean that indicates if the light has an ambient component.
lightDiffuse (ldf) booltrueinputconnectablehidden
The boolean that indicates if the light has a diffuse component.
lightSpecular (ls) boolfalseinputconnectablehidden
The boolean that indicates if the light has a specular component.
lightShadowFraction (lsf) float0.0inputconnectablehidden
The visibility fraction to the light. value is in [0,1]
preShadowIntensity (psi) float0.0inputconnectablehidden
The light intensity without taking shadow into account.
lightBlindData (lbd) addrNULLinputconnectablehidden
The pointer to the light's blind data.
color (c) float31.0, 1.0, 1.0outputinputconnectablestorable
Color is the basic color of the fog.

To make the fog appear more smoke-like, connect the Out Color attribute of a Cloud texture to this attribute, and turn on Color Based Transparency.

colorR (cr) float0.0outputinputconnectablestorablekeyable
The red component of the fog color.
colorG (cg) float0.0outputinputconnectablestorablekeyable
The green component of the fog color.
colorB (cb) float0.0outputinputconnectablestorablekeyable
The blue component of the fog color.
density (d) float1.0outputinputconnectablestorablekeyable
Density controls the apparent density of the fog. The higher this value, the denser the fog. It becomes brighter, and more completely masks whatever is behind it.
fastDropOff (fd) boolfalseoutputinputconnectablestorable
When Fast Drop Off is turned on, the fog transparency changes with the fog depth. This means that the more fog you have in front of an object, the more hidden and masked the object will be. This is what happens in real fog. As a result, objects closer to the camera are more visible than objects farther away.
colorBasedTransparency (cbt) booltrueoutputinputconnectablestorable
When Color-Based Transparency is turned on, the fog is is more opaque where its color is brightest. White areas are completely opaque; black areas are completely transparent.

This setting is particularly effective when used in conjunction with Fast Drop Off.

matteOpacityMode (mom) enum2outputinputconnectablestorable
Matte Opacity Mode controls how the system will use the Matte Opacity attribute (below). When you are rendering with a matte (i.e. an alpha channel, or mask), these two attributes are used to control how this material will show up in the matte. This is useful if you will be compositing your rendered images later on.

There are three settings, used for different purposes:

    Opacity Gain: (the default). Matte values are calculated in the normal way (based on the transparency of the object) then multiplied by the Matte Opacity. (Matte Opacity has a default value of one, by default these attributes have no effect.) With Opacity Gain, you can animate the Matte Opacity value to change the overall transparency of the object when it is later composited.

    Solid Matte: This is like Opacity Gain, except that the normally-calculated matte values are ignored in favor of the Matte Opacity setting. The entire matte for the object is set to the value of the Matte Opacity attribute. If there are transparent areas on the object, their transparency is ignored in the matte. Use this setting to composite an object with transparent parts, when you don't want the background to show through them.

    Black Hole: The value of Matte Opacity is ignored, and all the matte for this material is set to be transparent. Use this when you are creating substitute geometry in a scene, which is standing in for objects in a background image that you will be compositing with later. Your stand-in objects will 'punch a hole' in the matte. This allows other computer-generated geometry to pass behind your stand-in objects. Later, when foreground and background are composited, the results will be correct, with the background object showing through the 'black hole' areas.

matteOpacity (mog) float1.0outputinputconnectablestorablekeyable
Matte Opacity is used (along with Matte Opactiy Mode) to affect how the matte (i.e. alpha channel or mask) for this material will be calculated. See Matte Opacity Mode above for full details.
outMatteOpacity (omo) float3outputconnectable
output Matte Opacity
outMatteOpacityR (omor) float0.0outputconnectable
output Matte Opacity red value
outMatteOpacityG (omog) float0.0outputconnectable
output Matte Opacity green value
outMatteOpacityB (omob) float0.0outputconnectable
output Matte Opacity blue value
outColor (oc) float30.0, 0.0, 0.0outputconnectable
The fog output color.
outColorR (ocr) float0.0outputconnectable
The red component of the fog output color.
outColorG (ocg) float0.0outputconnectable
The green component of the fog output color.
outColorB (ocb) float0.0outputconnectable
The blue component of the fog output color.
outTransparency (ot) float30.0, 0.0, 0.0outputconnectable
The fog output transparency.
outTransparencyR (otr) float0.0outputconnectable
The red component of the fog output transparency.
outTransparencyG (otg) float0.0outputconnectable
The green component of the fog output transparency.
outTransparencyB (otb) float0.0outputconnectable
The blue component of the fog output transparency.