Go to: Related nodes. Attributes.

Surface Luminance is a utility node that tells you the luminance (brightness) of a point on a surface as it is being rendered. This luminance takes into account all the light sources shining on the object, and the angle at which they shine on the object. It does not take into account the specular properties of the object itself, such as 'hotspots'.

You can use this node to make interesting shaders that change based on the light in the environment.

Example: Say you are modelling a windscreen of a car, made of a special glass that becomes darker (more opaque) in bright light. To do this, create a Surface Luminance node, and connect its output to all three input channels of a Reverse node. Then connect the output of the Reverse node to the Transparency attribute of a shader.

In the table below, important attributes have their names listed in bold in the description column.

This node is MP safe

Node nameParentsClassificationMFn typeCompatible function sets
surfaceLuminancenodeutility/color:drawdb/shader/operation/surfaceLuminancekSurfaceLuminancekBase
kNamedObject
kDependencyNode
kSurfaceLuminance

Related nodes

blendColors, clamp, lightInfo, gammaCorrect, contrast, luminance, rgbToHsv, hsvToRgb, samplerInfo, setRange, resolution, renderQuality, renderGlobals, renderGlobalsList, baseShadingSwitch, singleShadingSwitch, doubleShadingSwitch, tripleShadingSwitch

Attributes (20)

lightAmbient, lightBlindData, lightDataArray, lightDiffuse, lightDirection, lightDirectionX, lightDirectionY, lightDirectionZ, lightIntensity, lightIntensityB, lightIntensityG, lightIntensityR, lightShadowFraction, lightSpecular, normalCamera, normalCameraX, normalCameraY, normalCameraZ, outValue, preShadowIntensity

Long name (short name)TypeDefaultFlags
normalCamera (n) float30.0, 0.0, 1.0outputinputconnectablehidden
The input normal
normalCameraX (nx) float0.0outputinputconnectablehidden
The X component of the input normal
normalCameraY (ny) float0.0outputinputconnectablehidden
The Y component of the input normal
normalCameraZ (nz) float0.0outputinputconnectablehidden
The Z component of the input normal
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 light's blind data.
outValue (o) float0.0outputconnectable
Out Value is the surface luminance of the surface being rendered.