To Use Lights and Geometry in Light Path Expressions

  1. Create a layer.
  2. Place the lights or the geometry on that layer.
    Tip: If you don't see layers listed in the Scene Explorer, click to activate (Sort By Layer). This button is at the bottom of the Scene Explorer panel or window.
  3. In the Light Path expression, refer to the light or the geometry object by the name of the layer it is on, enclosed in single quotes.

    Examples:

    1. A layer named light top contains the light at the top of the scene.

      The following LPE generates an image of the scene as illuminated by the top light only:

      <L'light_top'>.*E
    2. A layer named tube contains two objects that comprise a tubular jar of cosmetics.

      The following LPE generates reflections from the tube objects only:

      L.*'tube'RE
Caution: It is important to make sure that a given light path is not present in two or more render elements, because when you add these together while compositing, the result will be incorrect because that particular light contribution will be doubled. See "Avoiding Light Duplication in Custom Light Path Expressions" for tips on how to achieve this.
Tip: For more information about creating composite images from rendered iray elements, see http://blog.irayrender.com/post/76948894710/compositing-with-light-path-expressions.