...
PxrSurface has two added data user lobes. One is used to output World Position (U3) and another can be used to specify a color or pattern for output (U4). Neither of these lobes are rendered to the beauty and rely on the user to specify a Display Channel (AOV) for output. The bulk of this document will cover the use of the U4 lobe for color or patterns, but the LPE given can substitute U3 to get the World Position of the object.
The typical usage scenario is output for post operation and compositing. This data can be extracted from indirect effects. This makes it possible to write an AOV with a matte for an object in a reflection or transmission (refraction). This adds flexibility without having to render in layers. The equivalent would be RGB Mattes or a "Clown Pass", so-called because of the primary colors used.
...
Info |
---|
For data passes we make use of LPE modifiers,
|
User Color
Let's start with the preset defaults.
Code Block |
---|
lpe:nothruput;noinfinitecheck;noclamp;unoccluded;overwrite;CU4L |
...
Using the same LPE I can also connect a pattern to the User Color like PxrVoronoise or even a texture:
World Position
The default LPE for the Position pass results in this render, note that Position is enabled for anything with PxrSurface assigned.
Code Block |
---|
lpe:nothruput;noinfinitecheck;noclamp;unoccluded;overwrite;CU3L |
Using the same LPE as above you can begin to refine these results as well, for example the green ball in the mirror.
Code Block |
---|
lpe:nothruput;noinfinitecheck;noclamp;unoccluded;overwrite;C<RS><.U4'greenBall'>[LO] |
Advanced Thoughts
Since you can use the functions of LPE, you can do some advanced things like selecting the specific bounce of light for an object as well as the object where it's visible (reflected or transmitted).
The default preset gives you this result:
By changing this to indirect reflections we get all the spheres:
Code Block |
---|
lpe:nothruput;noinfinitecheck;noclamp;unoccluded;overwrite;C<RS>+<.U4>[LO] |
Or we can specify just the 3 bounce giving us a specific set of reflected spheres.
Code Block |
---|
lpe:nothruput;noinfinitecheck;noclamp;unoccluded;overwrite;C[<RS><.U4>]{3}[LO] |