Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Overview

...

Section
Column
width45%60%

Light Path Expressions or LPEs are a very powerful and advanced tool for extracting specific lighting events from the scene to a separate channel. This allows for a very fine control of the image in compositing.

For example, LPEs allow breaking the GI down to different types of light sources like lights, the environment and self-illuminating objects, or breaking down the GI to its separate bounces, or capturing only self-reflections, or the SSS that's only seen behind glass and similar for compositing control of only this aspect of the image.

UI Text Box
typetip

Read our Introduction to Light Path Expressions article.

The drop-down menu available in the LPE option offers a list of all symbols in LPEs, as well as presets to get you started.

UI Text Box
typenote

Light Path Expressions that capture specific events after the second GI bounce will work correctly only with Brute Force as a secondary GI engine

Column
width10%
 
Column
width33%35%
 Image RemovedImage Added

Scene Setup

...

The scene setup is similar to the Light Select workflow. As LPEs are a mode of the Light Select render element, the expression will capture contributions of the light(s) added to the Light Select set. If the Light Select is empty, the expression will capture contributions for all scene lights.

...

UI Expand
titleLPE Symbols
Section
Column
width45%

Symbol

Description

Type

Initial ray spawn event

C

Camera ray

Initial ray spawn event

Ray spawn events

R

Reflection ray

Ray spawn event

T

Transmission ray

Ray spawn event

V

Volume ray

Ray spawn event

Scattering types

D

Diffuse scattering

Scattering type

G

Glossy scattering

Scattering type

S

Singular scattering

Scattering type

s

Straight (no) scattering

Scattering type

Ray termination (final) events

L

Light hit

Ray intersection event

O

Emitting object hit

Ray intersection event

B

Background hit

Ray intersection event

 

PresetLight path expression
Render Elements
RGBC.*
Self-IlluminationC[OL]
BackgroundCB
LightingC<RD>L
SpecularC<R[GS]>L
GIC<RD>(.+L|.*[OB])
SSSC<TD>.+L
ReflectionC<R[GS]>.+L
RefractionC<T[GS]>.+L
AtmosphereCV.*
Light Selects
Direct IlluminationCRL
Direct DiffuseC<RD>L
Direct SpecularC<R[GS]>L
FullC.*L
IndirectCR.+L
Indirect DiffuseC<RD>.+L
Indirect SpecularC<R[GS]>.+L
Misc

Self-illumination, no lights

CO
GI from Self-IlluminationC<RD>.*O
GI from EnvironmentC<RD>.*B
Object/Material Select

Indirect for Object ID 1

CR'1'.+L
Indirect for all Object IDs but 1 and 2CR[^'1''2'].+L
RGB for Material ID 1C.'m1'.*
Self-Reflections by Material ID 1C<R[GS]'m1'>.'m1'+L
SSS
Scattering from Objects directly visible to the CameraC<TD>.+L
Scattering from Objects occluded behind reflections and refractionsC<[RT][SG]>+<TD>.+L
Scattering from Objects both directly visible or occluded behind reflections and refractionsC<[RT][SG]>*<TD>.+L


UI Text Box
typetip

It will be faster and more efficient to use the already available render elements instead of their LPE equivalents in the presets, of course - the examples are there as a point of reference.

Column
width5%
 
Column
width50%

Image RemovedImage Added