Houdini 20.5 Nodes VOP nodes

Illuminance Loop VOP node

Only available in Surface VOP networks.

On this page

This operator is only available in Surface VOP networks. It contains other VOP operators, and executes the code for the contained operators once for every light that affects the surface being shaded.

This operator should only be used by advanced users with a good understanding of shading and rendering. For most purposes, the Lighting Model operator will provide all the functionality necessary to generate convincing and realistic materials. Within the illuminance loop, the Global Variables operator will change slightly. Two additional outputs will be available: the Color of the current light (Cl) and the direction from the point on the surface being shaded to the light (L). As is always the case within an illuminance loop, the values of these global variables are reset for each iteration through the code.

Any value that you wish to modify inside the illuminance loop must be provided as an input. The outputs of the Illuminance Loop operator will contain the modified versions of the inputs once the loop exits. The actual values wired into the Illuminance Loop inputs are never modified, and so can be connected to other operators in the network; but remember that the values from these operators will always be the values unmodified by the Illuminance Loop operator.

Note

Mantra uses the length of (L) to represent the distance to the light source. So if you normalize (L), the light is considered to be one unit away and only objects within this distance will cast shadows.

Inputs

All connected inputs mimic the properties of the output wired into them. They adopt the same help label and name as the output connected to them. If multiple outputs with the same name are connected, the names of the inputs are automatically incremented to make them unique.

Surface Position

The position of the point on the surface being shaded. If no input is connected, the default is the global P.

Surface Normal

The normal of the point on the surface being shaded. If no input is connected, the default is the global N.

Permitted Lighting Angle

The range of angle (in radians) away from the Surface Normal from which lights can influence the surface. Any light outside the cone defined by this value and the Surface normal is not part of the illuminance loop. If no input is connected, the default is PI/2 (i.e. 90 degrees in radians).

Light Type Mask

Specifies the types of lights that are allowed to influence the surface. This is a bit mask, where:

LIGHT_AMBIENT  = 0x01
LIGHT_DIFFUSE  = 0x02
LIGHT_SPECULAR = 0x04

If no input is connected, the default is LIGHT_DIFFUSE | LIGHT_SPECULAR.

Light Mask

Specifies a string listing names of light objects that can influence the surface. If no input is specified, the light mask specified in the parameters for the object being rendered is used.

Next Input

Any number of inputs can be connected here. Each time an input is connected, a new input slot is added.

Outputs

The list of outputs depends on the inputs connected to the Subnet Output operator contained in this operator. The data type and name of each output will match the corresponding input of the Subnet Output operator.

Parameters

Surface Position

The position of the point on the surface being shaded. If no input is connected, the default is the global P.

Surface Normal

The normal of the point on the surface being shaded. If no input is connected, the default is the global N.

Permitted Lighting Angle

The range of angle (in radians) away from the Surface Normal from which lights can influence the surface. Any light outside the cone defined by this value and the Surface normal is not part of the illuminance loop. If no input is connected, the default is PI/2 (i.e. 90 degrees in radians).

Light Type Mask

Specifies the types of lights that are allowed to influence the surface. If no input is connected, the default is LIGHT_DIFFUSE | LIGHT_SPECULAR. This is a bit mask, where:

LIGHT_AMBIENT

0×01

LIGHT_DIFFUSE

0×02

LIGHT_SPECULAR

0×04

Light Mask

Specifies a string listing names of light objects that can influence the surface. If no input is specified, the light mask specified in the parameters for the object being rendered is used.

Next Input

Up to 64 inputs can be connected here. Each time an input is connected, a new input slot is added.

See also

VOP nodes