A light filter is a USD prim which can be assigned to a light, similar to assigning a material to a geometry object.
Karma runs the light filter “shader” on each light ray emitted by the light the filter is assigned to, allowing the filter to modify the rays cast by the light.
To... | Do this |
Create one or more light filter prims
|
-
In a LOP network, add a Light Filter Library node.
Set up the Light filter path prefix parameter on the Light Filter Library to specify where want the light filter prims to be created in the scene tree. The default creates a light filter prim at /lightFilters/‹nodename› for each light filter node in the embedded network that has its output flag turned on.
-
Dive inside the Light Filter Library node into the embedded VOP network inside.
-
Create one (or more) of the available light filter nodes:
-
Gel adjusts the tint, intensity, and diffuse or specular components of the light.
-
Gobo projects the light through a texture.
-
Barndoor shapes the light output, as if you used traditional swinging metal gates in front of the light lens. (It also lets you change the light tint, intensity, and diffuse and specular components.)
|
Vary the output across the light source surface
|
-
You can use the parameters on a light filter as constants, for example, set the Tint parameter to purple on a Gel filter to tint the light purple in all directions.
-
Or, you can wire VOP nodes into the light filter node to compute a different filtered value for each ray.
The filter’s inputs are re-computed for each ray sent from the light the light filter is assigned to. You can build a network of Material X VOP nodes to calculate values, noise, etc.
Tip
You can use the Karma Light Projection to generate UV coordinates for the “current ray” to vary the light output across the light’s field of view.
|
Assign a light filter to a light
|
-
When you create a light filter in a Light Filter Library node, you can use a multiparm on the Library node to assign each created prim to a light.
-
You can specify a space-separated list of light filter prims to apply to the light in the light’s Light filters parameter.
-
You can assign an existing light filter to a light by authoring a new light:filters relationship on the light prim with the Edit Properties LOP.
|