Square Enix © Goodbye Kansas

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Table of Contents

This page provides information about the Light Path Expressions RE mode.

 

Overview


Light Path Expressions or LPEs are a very powerful and advanced tool for extracting specific lighting contribution events from the scene to a separate channel. This allows for 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.


<note>we recommend using BF+BF for GI with LPEs</note>


LPE Symbols

 

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

 a valid expression needs to start from the camera C capture ray spawn or scattering events and end at Light, emissive object or the environment (LO or B).
 

Ray spawn events other than C can be combined with scattering types (e.g. <RD> - capture only diffuse reflection) to get a more specific ray event or they can be used directly (e.g. R - capture reflections of any scattering type. This is also equivalent to <R.>)

 

 

 

Ray termination events can also be combined with each other when you want to capture the contribution of a light together with emissive objects, e.g. C<RD>.*[LO] will capture the GI coming from lights or emissive objects.

 

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