Versions Compared

Key

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

...

Section
Column
width65%

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 capturing only self-reflections, or the 1st bounce of GI, or the SSS that's only seen behind glass and similar for compositing control of only this aspect of the image.

The LPE syntax is based on regular expressions. Expressions describe a light path that starts from the camera and bounces around the scene until it reaches a light source.

The scene setup is similar to the Light Select workflow. As LPEs are a mode of the Light Select, the expression will capture contributions of the light that is added to the Light Select set. If the Light Select is empty, the expression will extract contributions from all scene lights. LPEs also allow extracting information from the environment, for example allow capturing the GI that comes from the environment only.

We’ve added a list of the basic symbols for constructing a Light Path expression.

UI Text Box
typetip

Тhere is a dedicated LPE Builder available to help you compose expressions and track exactly which ray paths they capture.

Additionally, you can see what expression should get you the equivalent of some of the already available render elements (like Beauty, Lighting, GI, Light Select types etc.).

UI Text Box
typetip

It is 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.

Finally, there's some Misc and masking LPE examples, e.g. to capture the GI coming from the environment or to get the GI coming from a given light bounced off of a given object marked by an extra attribute.

Column
width5%
 
Column
width30%

Image RemovedImage Added


LPE Symbols

...

The LPE alphabet consists of the symbols representing a ray event/type and additional regular expression symbols (“.”, “+”, “*”, “<”, “>”, “[“, “]”, “|”, “?”, “^” and additional label strings).  

...

Section
Column
width50%

Symbol

Description

Type

Final

Initial ray spawn event

C

Camera ray

Initial ray spawn event

No

Ray spawn events

R

Reflection ray

Ray spawn event

No

T

Transmission ray

Ray spawn event

No

V

Volume ray

Ray spawn event

No

Scattering types

D

Diffuse scattering

Scattering type

No

G

Glossy scattering

Scattering type

No

S

Singular scattering

Scattering type

No

s

Straight (no) scattering

Scattering type

No

Ray termination events

L

Light hit

Ray intersection event

Yes

O

Emitting object hit

Ray intersection event

Yes

B

Background hit

Ray intersection event

Yes

Column
width5%
 
Column
width45%

Image RemovedImage Added


Render Elements

...

Section
Column
width50%

Preset

Light 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.*
Column
width5%
 
Column
width45%

Image RemovedImage Added

 

Light Select

...

Section
Column
width50%

Preset

Light path expression
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
Column
width5%

 

Column
width45%

Image RemovedImage Added

 

Misc

...

Section
Column
width50%

Preset

Light path expression
Misc

Self-illumination, no lights

CO
GI from self-illuminationC<RD>.*O
GI from environmentC<RD>.*B
Column
width5%
 
Column
width45%

Image RemovedImage Added

 

Object/material select

...

Section
Column
width50%

Preset

Light path expression
Object/Material select

Indirect for the object label "obj1"

CR'obj1'.+L
Indirect for all object labels but "obj1" and "obj2"CR[^'obj1''obj2'].+L
RGB for material "Material #01"C.'mMaterial #01'.*
UI Text Box
typetip

In order to use Object select, an object label can be set in the LPE label field in V-Ray Object Properties window. When Material select is used, materials names are used as labels.

Image RemovedImage Added

Column
width5%
 
Column
width45%

Image RemovedImage Added