Lighting Workflows

Lighting Workflows

PRMan offers numerous tools and methods for refined control over lighting.

Separable Contributions

Lighting contributions may be restricted in terms of which lobes they contribute to. The contribution can be controlled separately for glossy, diffuse and specular (as color multipliers) using glossycontribution, specularcontribution and diffusecontribution. This permits lights which do not have specular reflections even on otherwise specular materials, and addition of catchlights. This control is global, if a more fine grained tweak is required, blockers provide regional influences.

On the left, full contribution, middle diffuse only and on the right the diffuse has been partially attenuated but the specular/glossy left untouched.

full contribution diffuse only specular / glossy only

Blockers, Gobos, and Portals

Blockers limit the influence of light within a region. The region is specified as a superelipse, via two exponents and a falloff (specified in via blockershape). The point specifying blockershape has two exponents in x and y and a falloff in z.

The blocker can modify the glossy, specular and diffuse contributions within a region via blockerglossymultiplier, blockerdiffusemultiplier and blockerspecularmultiplier.

Here, a blocker which has a blockerdiffusemultiplier of 0 has been used, with a spherical and then rounded rectangular shape. In the final image it was made smaller and it's falloff was increased to give a softer region of influence.

diffusemultiplier 0 for sphere diffusemultiplier 0 for rounded rectangle diffusemultiplier 0 for rounded rectangle with softer falloff

Positive falloff values specify that the region of influence is inside the superquadric shape (here a rounded cube) and fall off to 0 at the specified falloff. Negative values specify that the region of influence is outside the shape and that falloff is applied within the superquadric.

Below the left sphere has a diffuse contribution blocker surrounding it, which blocks diffuse contributions within the shape (using a positive falloff). On the right, the sense is inverted with a negative falloff.

images/lighting/lightTypes_blockerInside0.jpg images/lighting/lightTypes_blockerInside1.jpg

Gobos are planar entities that modulate light that flows through them. The space is defined by the xy plane in the space defined by the matrix supplied to the gobo parameter. A map specified to gobomap specifies the map used to modify the light multiplicatively in the -1,1 space of the xy plane. Both the space (gobo) and the map (gobomap) must be specified.


This shows a gobo being used to emulate a partially gelled practical light.

To special map names are recognized, gobomap == "" blocks all light through the -1,1 region, and gobomap == "!" blocks all light not transiting -1,1. The blank-named map is useful for barn-doors and flags:



By default shadows are black, this may be tweaked using shadowtint.

images/lighting/lightTypes_shadowcol1.jpg images/lighting/lightTypes_shadowcol0.jpg

The shadow opaqueness / density may be altereed using shadowdensity.

images/lighting/lightTypes_shadowcol1.jpg images/lighting/lightTypes_shadowdensity0.jpg

Raytraced shadows by default see all other objects as shadow casters. By using trace subsets, certain objects may be precluded from casting shadows. This may be specified as a set of object membership groups which are allowed to cast shadows, or as a list of object groups which should not cast shadows.

The subset parameter lists objects to cast shadows and excludesubset lists those to be precluded from casting shadows.

Here the ball on the right has a group membership of "noshadow". In the second image exludesubset has been set to "noshadow".

images/lighting/lightTypes_shadowsubset0.jpg images/lighting/lightTypes_shadowsubset1.jpg


Lights may be assigned a named __group which can be used to extract glossy specular and diffuse AOVs resulting from that group using Light Path expressions.

Arbitrary Geometry


Lights may be visible to the camera - in which case the Bxdf specified gathers lights from all lights in the scene (including itself, unless otherwise specified - see below). The emissionbias attribute is used to provide a small offset between the emission of light and the surface itself and helps reduce noise.

Light Linking

The lights relevant to a particular object may be controlled in two ways:

  • Illuminate
  • lighting subset and lighting excludesubset attributes

Illuminate operates similarly to its traditional meaning and permits a given light to be disabled for a particular object.

There are some subtle differences. Traditionally a light is on when "Illuminated", but that enabling of the light is "popped" when the current attribute scope ends. Geometric area lights do not do this. They are globally on by default - meaning that they shine on all objects in the scene, even those declared before the light. Illuminate 0 is instead tracked - and it is this "disabling" that is "popped" when an attribute scope ends.

Here there are three lights, in the second image, the middle sphere has Uses Illuminate to preclude the green light from contributing to it.

images/lighting/lightTypes_illuminate0.jpg images/lighting/lightTypes_illuminate1.jpg

Note that there is no illuminate specified for the ground, so it remains illuminated by all 3.

Additionally, there are two new attributes:

  • Attribute "lighting" "string subset" "subsetspecifier"
  • Attribute "lighting" "string excludesubset" "subsetspecifier"

Lights may be grouped using the normal membership grouping (Attribute "grouping" "string membership" "specifier"). A light may be a member of a number of such groupings, which are also used to control trace subsets. Entire sets of lights may be requested via the Attribute "lighting" "string subset" "subsetspecifier" mechanism and, if set, only lights that match the requested groupings will be considered. Conversely, Attribute "lighting" "string excludesubset" "subsetspecifier" allows a set of lights to be disabled for a given object (even if they otherwise match the subset.

The attribute-based approach allows many individual lights to be controlled at once and is most likely more appropriate for environmental lighting with many lights. Explicit per-light control may be more appropriate for key lights.

In the above example, imagining the lights had groups "red", "green" and "blue" the same effect as illuminate could have been achieved using either green as the excludesubset, or using "red,blue" as the subset.