On this page

Previous Geometry

Overview

Lighting in Karma heavily relies on USD’s built-in features related to lights. This chapter describes the basics of USD lighting, and Karma-specific properties.

USD lights

USD supports the following standard light types. Karma may not support all of the following lights, but should provide an alternate approach to mimic their effect.

CylinderLight

Cylindrical shaped light source.

DiskLight

Circle shaped light source.

DistantLight

Infinitely distant light source.

DomeLight

Omni-directional, environment light source.

GeometryLight

Meshes or other geometry providing illumination.

Point

An infinitely small light source.

Portal

Geometry provides a portal for dome lights.

RectLight

Rectangular shaped light source

SphereLight

Spherical light source.

Common properties

Lights have various properties to mimic real-world lighting and provide artistic control. Directional lights are aligned to emit light along their local -Z axis by default. All lights can be moved, rotated, and scaled.

Cylinder light

Height

  • Length of the light along local X axis.

Radius

  • Radius around the tube around the local X axis.

Transform

  • Fully transformable.

DiskLight

Radius

  • Radius of the disk.

Transform

  • Fully transformable.

DistantLight

Angle

  • Angular size of light in degrees.

Transform

  • Fully transformable, but only rotations affect the light.

DomeLight

Transform

  • Fully transformable, but only rotations affect the light.

GeometryLight

Transform

  • Fully transformable.

Other

  • Emission and Emission Color are controlled on the shader.

  • Render Geometry Settings marks the prim as a light source, so Karma can sample more efficiently.

  • See Emissive Materials for details.

Point Light

Transform

  • Fully transformable, but rotations/scales require applied shaping properties (such as spotlight).

Portals

Transform

  • Fully transformable.

Other

  • Render Geometry Settings marks the prim as a portal source.

  • Render Geometry Settings can also specify which dome lights the portal affects.

RectLight

Width

  • Size along local X axis.

Height

  • Size along local Y axis.

Transform

  • Fully transformable.

SphereLight

Radius

  • Radius of the sphere. Use the transform to get non-uniform spheres.

Transform

  • Fully transformable.

KarmaSkyDomeLight

Solar Altitude

  • Angle of the sun in the sky.

Solar Azimuth

  • Position of the sun around the up-axis.

Turbidity

  • The amount of dust and dirt in the atmosphere.

Transform

  • Fully transformable, but only rotations affect the light.

Karma Physical Sky

Combination of a KarmaSkyDome and Distant lights and special properties.

See the node helpcard for more details.

Light Tree

Karma automatically builds a light tree to make rendering scenes with many lights more efficient. This helps Karma efficiently decide which lights should be sampled the most, and are most likely to resolve faster. Setting this to Uniform on a light will force it to always be sampled.

Some types of lights, or lights with certain configurations, are never added to the light tree. Dome lights, and lights with IES profiles and light filters are excluded from the light tree.

See Sampling > Light Tree for more details.

Instances

No per-instance changes.
Randomized intensity.
Randomized color and intensity.

Beginning with Houdini 20.5, the USD library passes instanceable lights through Hydra to Karma. This allows lights to be instanced alongside geometry, and works both with instanceable references and point instancers. Currently Karma allows controlling lights via primvars or light filters setup to read primvars.

By default Karma will match primvars in the light namespace to corresponding inputs on the instanced lights:

Primvar

Light Input

Type

primvars:light:intensity

inputs:intensity

float

primvars:light:color

inputs:color

color3f

Light filters can also be setup to read primvars, if you wish to use differently named primvars to drive your lights.

LPE tags

Karma supports custom tags for Light Path Expressions. For lights, these can be set using the Light LOP’s Karma properties. The LPE Tag LOP can also be used to add LPE tags.

See Light Path Expressions for more details.

Light filters

Light filters can be added to lights to provide artistic modifications to lighting elements. These are created with a Light Filter Library. Karma supports using MaterialX shaders in light filters. The Karma Light Project is essential for these workflows.

Karma Light Filter Attenuation

Controls how the light intensity/color changes over distance.

Karma Light Filter Barndoor

Adds barndoors to a cone light.

Karma Light Filter Gel

Adjusts the color, intensity, or diffuse/specular of a light source.

Karma Light Filter Gobo

Projects the light source through a texture.

Karma Light Filter Projection

Provide the depth and UV coordinates of the “current ray” in the light’s projection space

Warning

  • Lights with light filters applied are not automatically added to the light tree.

  • It is not advised to use light filters on dozens or hundreds of lights in the same scene.

Viewport lighting

By default the viewport reflects the lights found in the scene. If no lights are found, Hydra produces a head light. The head light type can be a distant light along the camera view or dome light. Along the right side of the viewport are buttons to override the scene lights.

  • Available lighting modes change based on the chosen render delegate.

  • Disable Lighting disables all scene lights, in order to visualize emissive shaders. With the Houdini Viewport, it produces an unlit appearance.

  • The automatic dome light is a uniform white color. A map can be applied using the HOUDINI_DEFAULT_DOMELIGHT_TEXTURE environment variable.

Karma light properties

Global properties can often be control on a per-light basis. These controls live in the inputs:karma:light: namespace, and are usually multipliers on their global counterpart. If a property does not specify that it multiplies or scales, then it acts as an override.

Spread

Spread 1.0
Spread 0.5
Spread 0.2
Spread 0.05

For rectangle lights only, Karma has a special spread parameter. This can focus an area light projection, to get a sort of “blend” between distant lights and simple area lights.

Next Cameras

Karma User Guide

Appendices