Page History
...
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, visually represent their how they work and expand on what are the possible use cases.What are
UI Text Box | ||
---|---|---|
| ||
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 They use regular expression patterns to record selected events of light contribution along the path of a ray.
This can be used for very fine control in compositing by allowing you to change for example only tweak, for example, the GI coming from lights, the environment or self-illuminating objects separately, or each separate GI bounce, or the self-reflections of an object or the way SSS is seen behind refraction without re-rendering. The possible applications are practically endless.
Light Paths
...
Section | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Ray Spawn Events and Scattering Types
...
Section | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Modifiers
and the Arbitrary ray spawn and scattering type?
Object or material select
LPEs can be modified to work as object or materials selects just by adding a label.
For example since C.* will give us the Beauty or Full light select equivalent, C.'m1'.* can be used to separate only the RGB for materials with material label "1". To do so, we must first add an extra attribute called Light path expression label to the materials we want to use. The label can take numeric or text values and needs to be preceded by m and enclosed in single quotes when added to an expression.
Similarly C.'1'.* will filter the RGB only for objects with added VRay User attribute lpe_label=1 and C.'cube'.* will be the RGB for objects with VRay User attribute lpe_label=cube. Note that Maya attributes cannot be used in the same way.
Material and object labels can be added to any valid light path expression and thus are very useful in tricky cases like for example self reflection C<R[GS]'m1'>.'m1'+L or ?
Boolean operations
here
Examples
SSS:
Fancy Bullets | ||
---|---|---|
| ||
|
Self-reflections by material ID 1
Fancy Bullets | ||
---|---|---|
| ||
|
Emissive
Fancy Bullets | ||
---|---|---|
| ||
|
GI
Section | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||
Fancy Bullets | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||