Versions Compared

Key

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

...

Section

LPE labels for objects


Column
width60%

If we take C.* as as an example, which give gives us the Beauty, C.'1'.* will filter the Beauty only for objects with LPE label 1.

C.'cube'.* will be the Beauty only for objects with LPE label cube.

LPE labels to objects are added with V-Ray User Attributes, added from the extra V-Ray attributes menu. The user attribute name needs to be lpe_label and its value can be text or numbers: for instance

lpe_label=1 or lpe_label=cube.

 

UI Text Box
typetip

LPE labels can be anything. You can label an object or material 1, or 2, or myObject, or myMaterial.

When used in expressions, labels need to be placed inside single quotes: C.'cube'.*

UI Text Box
typenote

Note that Maya attributes cannot be used as for LPE labels.

Column
width5%

 

Column
width35%

Adding a Light Path Expression label to geometry

Section

LPE labels for materials


Column
width60%

Similarly, C.'m1'.* can can be used to separate the Beauty only for materials with material label 1.

C.'mmyMaterial'.* will be the Beauty only for materials with LPE label myMaterial.

LPE labels are added to materials with the Light Path Expression Label attribute from the extra V-Ray attributes menu. The label can take numeric or text values and when used in an expression it needs to be preceded by m and placed inside in single quotes.

 

UI Text Box
typetip

LPE labels can be anything. You can label an object or material 1, or 2, or myObject, or myMaterial.

When used in expressions, material labels require prefixing the label with m and placing the label inside single quotes:  C.'m1' or C.'mmyMaterial'.

Column
width5%

 

Column
width35%

Adding a Light Path Expression label to materials

...

GI can be broken down to different types of light sources: lights, self-illuminating objects and the environment. If we need to control each of these separately in compositing, we can use the built-in presets, respectively: C<RD>.+L, C<RD>.*O and C<RD>.*B. The combination of these in compositing (with a plus) replaces the GI channel in a back-to-beauty composite. However, if we only need to grade the GI from Lights, we can render a GI render element and C<RD>.+L. Then, we subtract C<RD>.+L from the GI in compositing, grade C<RD>.+L and add it back to the composite.

Alternatively we Alternatively we can render GI and an LPE for GI minus C<RD>.+L. In this way, we'll only need to add the graded C<RD>.+L channel to the GI in compositing, saving us some compositing complexity.

...

Let's look at a simple example with direct lighting. V-Ray already has a render element for this (Lighting) and the equivalent expression is C<RD>L. If we additionally want to capture direct lighting falling onto object(s) labeled cube, we need to render an LPE for C<RD'cube'>L. We can then subtract C<RD'cube'>L from the Lighting channel in compositing, grade it and add it back in.

Alternatively, we can e render the C<RD'cube'>L expression and a second one that does the subtraction right in the renderer: (C<RD>L)-(C<RD'cube'>L). We then grade each channel as needed and simple add them with a plus in the composite.

...