Versions Compared

Key

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

...

If you are not familiar with using Light Path Expressions (LPEs), this page is a good place to start. The sections below will try to explain what LPEs are, how they work and what are the possible use cases.

UI Text Box
typetip

The Advanced Light Path Expressions article goes into greater detail about complex LPE usage and concepts.

 

 

What are LPEs?

...

Light Path Expressions are a special type of render element with advanced capabilities. They use regular expression patterns to record selected events of light contribution along the path of a ray.

...

Section
Column
width60%

When a ray hits a surface, it can reflect, refract (transmit), or pass through a volume. These are the ray spawn events which we can record with LPE symbols.

We use the R symbol for reflection and T for refraction and sub-surface scattering.

They can be used directly, e.g. R captures reflections of any scattering type and is also equivalent to <R.>.

 

We can further specify the kind of hit we want to trace by combining R and T with one or more scattering types - diffuse (D), glossy (G), or singular (S). If we don’t specify that, all scattering types are assumed for our R or T events.

This allows us to filter the results only from diffuse reflection, for example with <RD> or combine glossy and singular reflection <R[GS]> .

 

By using ray spawn events and scattering types, we can recreate some familiar render elements or create custom single or multiple event expressions.

UI Text Box
typetip

Press the arrow next to the expression field to access a list of the available expression symbols and some presets to get you started.

Column
width5%

 

Column
width35%
Image slider
Panel

A single diffuse reflection hit.

C<RD>L (Lighting)

Panel

A single hit for glossy and singular reflection.

C<R[GS]>L (Direct Specular)

Panel

Glossy and specular refraction.

C<T[GS]>L (Refraction)

Panel

A single volumetric event.

 CVL

Panel

Multiple events: Glossy and specular refraction followed by diffuse reflection.

 C<T[SG]><RD>L



Section
Column
width30%

 

Column
width10%

 

Column
width20%
UI Text Box
sizemedium
Align
aligncenter

Read next

The Advanced Light Path Expressions article goes into greater detail about complex LPE usage and concepts.

Column
width10%

 

Column
width30%