= Light linking and shadow linking = You can choose which objects are illuminated by a [Icon:OBJ/light][light|/light], and which objects cast [Icon:VIEW/shadow_quality_medium][shadows|/light/shadows] from a light. For example, you can assign individual lights to different [characters|/char]. The _light mask_ on an object, and the _shadow mask_ on a light control the association of lights and objects. You can link [lights|/light] and [shadows|/light/shadows] interactively using the [Light Linker pane|/ref/panes/linker], individually for each object and light directly in the [parameter editor|/ref/panes/parms], or by specifying categories. == Linking lights and shadows with the Light Linker == To use the light linker, you must create a [Icon:PANETYPES/linker][Light Linker|/ref/panes/linker] tab. You can do this by clicking the [Icon:BUTTONS/new_tab] new tab icon in the [network editor|/ref/panes/network] and selecting __New Pane Tab Type > Light Linker__. You can also change an existing pane to a light linker pane by clicking ((RMB)) on an existing pane and selecting __Light Linker__. tasks>> Illuminate objects: # Choose Light Mask from the __Link Type__ drop-down menu. # Choose a mode from the __Mode__ drop-down menu. # Select the lights from the __Light Sources__ pane. # Select the objects to light from the __Lit Objects__ pane. Cast shadows from objects: # Choose Shadow Mask from the __Link Type__ drop-down menu. # Choose a mode from the __Mode__ drop-down menu. # Select the lights from the __Light Sources__ pane. # Select the objects which will cast shadows from the __Shadow Casters__ pane. Reflect objects in other objects: # Choose Reflection Mask from the __Link Type__ drop-down menu. # Choose a mode from the __Mode__ drop-down menu. # Select the objects that are reflected from the __Reflection Sources__ pane. # Select the objects to reflect from the __Reflector Objects__ pane. == Linking lights and shadows directly == tasks>> Illuminate objects: On the __Render__ tab of an object, set the __Light Mask__ on the __Shading__ sub-tab in the [parameter editor|/ref/panes/parms] to determine which lights will illuminate your object. Cast shadows from objects: # On the __Shadows__ tab of a light, choose the __Shadow Type__ from the drop-down menu. The default is No Shadows. # Set the __Shadow Mask__ to determine which objects will cast shadows from your [light|/light]. Reflect objects in other objects: On the __Render__ tab of an object, set the __Reflection Mask__ on the __Shading__ tab in the [parameter editor|/ref/panes/parms] to determine which objects will be reflected by your object. == Linking lights and shadows using categories == (categories) === Overview === You can specify _categories_ on an object using the [parameter editor|/ref/panes/parms] (__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. NOTE: 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|/props/] to an object to use categories for linking. You can also use categories as an optional argument in an [illuminance loop|/vex/functions/illuminance] 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) }}} table>> tr>> th>>Symbol th>>Meaning tr>> td>>`<>` td>>Matches objects tagged with the <> category. tr>> td>>`-<>` td>>Matches objects which _are not_ tagged with the <> category. tr>> td>>`*` td>>Matches all objects. tr>> td>>`-*` td>>Matches no objects. tr>> td>>`+` td>>Matches objects which have any categories defined. tr>> td>>`-` td>>Matches objects which don't have any categories defined. tr>> td>>`<>|<>` td>>Matches objects which match `<>` *or* `<>`. tr>> td>>`<>&<>` td>>Matches objects which match `<>` *and* `<>`.