Lighting Light linking and shadow linking
You can choose which objects are illuminated by a
light, and which objects cast
shadows from a light. For example, you can assign individual lights to different characters. The light mask on an object, and the shadow mask on a light control the association of lights and objects.
You can link lights and shadows interactively using the Light Linker pane, individually for each object and light directly in the parameter editor, or by specifying categories.
Linking lights and shadows with the Light Linker
To use the light linker, you must create a
Light Linker tab. You can do this by clicking the
new tab icon in the network editor and selecting New Pane Tab Type > Light Linker. You can also change an existing pane to a light linker pane by clicking
on an existing pane and selecting Light Linker.
| To... | Do this |
|---|---|
|
Illuminate objects |
|
|
Cast shadows from objects |
|
|
Reflect objects in other objects |
|
Linking lights and shadows directly
| To... | Do this |
|---|---|
|
Illuminate objects |
On the Render tab of an object, set the Light Mask on the Shading sub-tab in the parameter editor to determine which lights will illuminate your object. |
|
Cast shadows from objects |
|
|
Reflect objects in other objects |
On the Render tab of an object, set the Reflection Mask on the Shading tab in the parameter editor to determine which objects will be reflected by your object. |
Linking lights and shadows using categories
Overview
You can specify categories on an object using the parameter editor (Render tab, Shading sub-tab, Categories parameter). Objects can belong to more than one category – separate multiple categories with commas and/or spaces. Categories are similar to tags in Web applications; you can “tag” lights and objects, and use the unions and intersections of tags to control light linking.
For example, a light might have Categories set to keylight, shadower, distant. This makes the light part of the keylight set, the shadower set, and the distant set. You can then use these categories.
Categories will probably supplant masks as the preferred method for light/shadow/reflection linking in a future version of Houdini, but support for categories in the UI is currently limited.
You must manually add the Houdini 9.1/Light selection, Houdini 9.1/Shadow selection, and/or Houdini 9.1/Reflection selection properties to an object to use categories for linking.
You can also use categories as an optional argument in an illuminance loop in VEX to loop over the lights based on categories.
Specifying objects by categories
Category expressions are one or more category names. When specifying multiple name, join them with the & (and) or | (or) symbols. For example, keylight|distant would specify all objects which have either the keylight or distant categories, while keylight|distant would specify only objects that have both keylight and distant categories.
Category expressions currently do not support grouping with parentheses. Category expressions are processed left to right with & (and) at a higher precedence than | (or). So:
a & b & c | d & e | f | g & h
…is equivalent to:
(a & b & c) | (d & e) | f | (g & h)
| Symbol | Meaning |
|---|---|
name | Matches objects tagged with the name category. |
-name | Matches objects which are not tagged with the name category. |
* | Matches all objects. |
-* | Matches no objects. |
+ | Matches objects which have any categories defined. |
- | Matches objects which don’t have any categories defined. |
a|b | Matches objects which match a or b. |
a&b | Matches objects which match a and b. |