Context(s) | displace fog light shadow surface |
int [] getlights(...)
int [] getlights(vector P, ...)
"categories
",
string
="*"
Specifies lights to include/exclude by their "category" tags.
This is the preferred include/exclude lights rather than pattern matching
light names with the "lightmask"
keyword argument.
For example:
diff = diffuse(nml, "lightmask", "hero | fill");
See light categories for more information.
"lightmask
",
string
="*"
When evaluating light and shadow shaders, objects have pre-defined light masks. This mask is usually specified in the geometry object and specifies a list of lights which are used to illuminate a surface or fog shader. It is possible to override the default light mask by specifying a "lightmask" argument.
For example:
diff = diffuse(nml, "lightmask", "light*,^light2");
…will cause all lights whose names begin with "light" except for a light named "light2" to be considered for diffuse illumination.
All Houdini scoping patterns, excepting group expansion, are supported:
-
*
- wild-card match -
?
- single character match -
^
- exclusion operator -
[list]
- character list match
int [] getlights(material mat, vector P, ...)
With this signature, the light mask is determined solely by the material (the
lightmask
and categories
keyword parameters are ignored).
This version also accepts PBR keyword arguments to limit lights based on their Light Contribution parameter.
"label",
string
A specific label. This keyword argument may be specified multiple times.
"direct",
int
0 = limit lights to indirect contributions, 1 = limit lights to direct contributions.
Examples
getlights("lightmask", "light*,^light2"); getlights("categories", "shadow|occlusion"); getlights(material(), P, "direct", 0);
See also | |
light | |
pbr |
|