Page tree

Versions Compared

Key

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

...

Using LPE and the User Color attribute I you can begin to isolate the mattes. Let's start with the reflected mattes and see if we can isolate them using the following expression:

...

The above LPE (if you're familiar enough with the tokens on the main documentation page) collects only the reflected specular contribution of the User Color lobe after a bounce of like (the + denotes indirect) and I you get the following result:

...

Removing the + used for indirect bounces Iyou've asked instead to be given the first and only the first reflection of the user lobe. The result is a bit more what you might expect given the beauty render:

So now I you can retrieve the user color from the reflection for all three materials using the a user color. However, you may need to isolate just a single object for more...extreme art direction. Using an LPE Group on the objects can help you achieve this with the standard LPE syntax. So lets let's grab the lower green ball which has been tagged with an LPE group. You'll see this LPE is quite similar:

...

Now, about that pane of glass, it presents a different set of issues we'll look at. Some of these LPE can be quickly adjusted to handle transmission (refraction) but note that the glass itself as has a user color. If we render the transmission of the user lobes using the below LPE, we you get a result that follows:

Code Block
lpe:nothruput;noinfinitecheck;noclamp;unoccluded;overwrite;C<TS>U4[LO]

Well, quite obviously we you get the glass pane's user color as it refracts itself. But we can extend this to capture the indirect response, meaning after we've struck the glass with a primary ray. This means we use the + modifier for indirect again.

...

The end result misses the front of the pane of glass (since we want indirect +) and gives me you the transmitted balls and the backside of the glass against the environment. The ground plane has no user color so is rendered black.

...

This could work, but we really want just the balls. So we you can now use the exclude token, the caret ^, to remove the glass pane that was tagged in an LPE group.

Code Block
lpe:nothruput;noinfinitecheck;noclamp;unoccluded;overwrite;C<TS>+<.U4[^'glassPane']>[LO]

Again, I you can refine this to just the lower green ball by saying I you only want the greenBall

Code Block
lpe:nothruput;noinfinitecheck;noclamp;unoccluded;overwrite;C<TS>+<.U4'greenBall'>[LO]

I You can also somewhat indiscriminately grab all the specular <.S> effects of the matte from the green ball using the following LPE where * means all the bounces of light based on my your render settings:

Code Block
lpe:nothruput;noinfinitecheck;noclamp;unoccluded;overwrite;C<.S>*<.U4'greenBall'>[LO]

Using the same LPE I you can also connect a pattern to the User Color like PxrVoronoise or even a texture:

...

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). In this example, only the balls are using an assigned User Color to make this more obvious.

The default preset gives you this result:

...

By changing this to indirect reflections we you get all the spheres in the reflection:

Code Block
lpe:nothruput;noinfinitecheck;noclamp;unoccluded;overwrite;C<RS>+<.U4>[LO]



Or we you can specify just the 3 3rd bounce giving us a specific set of reflected spheres.

...