Versions Compared

Key

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

...

Section
Column
width45%

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 right-click menu offers a list of all symbols in LPEs, as well as presets to get you started.

There are preset equivalents to already available render elements (like Beauty, Lighting, GI, Light Select types etc). There are also Misc and masking presets for the GI coming from the environment or for the GI coming from a specific object.

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

Also available is a list of boolean operations that allow more complex expressions to be rendered in a single channel. For example, in this way some compositing operations like union or subtraction can be done in the renderer, instead of in the compositing application.

UI Text Box
typetip

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

Column
width10%
 
Column
width33%
 



Scene Setup

...

UI Expand
titleLPE Presets: Object/Material select

 

 

Section
Column
width60%

Preset

Light path expression
Object/Material select

Indirect for object label 1

CR'1'.+L
Indirect for all object labels but 1 and 2CR[^'1''2'].+L
RGB for material label 1C.'m1'.*
UI Text Box
typetip

To use object labels, add V-Ray User Attributes to you object, where the attribute name is lpe_label and equals your custom label. For example, lpe_label=myLabel.

To use material labels, add Extra V-Ray Attributes > Light Path Expression Label to your material. When used in expressions, material labels require the m prefix.

See the examples below on how to set up object and material labels.

Column
width5%

 

Column
width35%

 

 

Section
Column
width25%

 

Column
width20%

LPE Object/Material select

LPEs can record information for only specific objects or materials by adding a label.

Read more about capturing LPEs for specific objects and materials in the Advanced Light Path Expressions article.

UI Text Box
sizemedium
Align
aligncenter
Column
width10%

 

...

width20%

...

...

sizemedium

...

Align
aligncenter

Coat and Sheen material labels

The coat and sheen material labels are reserved for the additional VRayMtl Coat and Sheen layers.

Read more about using the coat and sheen labels in the Advanced Light Path Expressions article.

Column
width25%

 

 

 

Boolean operations

...

Boolean operations allow us to combine expressions. We can complement (^), intersect (&) or unite (|) expressions, or we can subtract (-) one expression from another.

Boolean operations can also be very useful in a number of scenarios to simplify the compositing workflow.

...

sizemedium
typetip

...

 

UI Expand
titleBoolean operation symbols
Section
Column
width60%

Boolean operation

Symbol
Operations between expressions

Complement

^
Intersection&
Union

|

Subtraction-
Column
width5%
 
Column
width35%