Page tree

Versions Compared

Key

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

...

Code Block
Diffuse (All types, direct and indirect): lpe:C<[RT]D>*[<L.>O]
Specular (All types, direct and indirect): lpe:C<[RT]S>*[<L.>O]


Lights and Emissive Objects

Lastly there are the L and O tokens for lights and visible lights/emissive objects respectively. If you omit the O token you will not store emissive objects (light glowing PxrSurface materials) or visible light sources like mesh lights. Instead you would only see their effects. 

Direct and Indirect Light

...

[ ] are used to define events of any/either/or. So in the example above I could say [RT] meaning one Reflection or Transmission type and [DS] which means Diffuse or Specular event. This is pretty common when you need to collect light along a path with many different possibilities. An example might be <[RT][DS]> which means a single event (note the angle brackets) with either a reflective or transmissive type (first set of square brackets) of a diffuse or specular event (the second set of square brackets).

Parenthesis

Pipe

The pipe, | means "or" and can be used to say you want either/or inside an event. This is often used in conjunction with the parenthesis explained below but there are many uses.

Parenthesis

() are used to encapsulate a series of events. This operates most like the purpose of parenthesis in a mathematical operation, grouping items to be considered together. Such an example would be to have two different sets of events you want to collect but placing a pipe, | to say "or" between these encapsulated events. C(DS)|(TD)L would be Camera to Diffuse to Specular event or Camera to Diffuse Transmission event.or Camera to Diffuse Transmission event. I can also use these for things like LPE groups to say something like ('eyeball'|'tooth') where I would store the path if it interacted with either the eyeball or the tooth groups.

Caret

The caret ^ is used to exclude something. Sometimes your light path may have an event you want to avoid. In many cases this could even be an LPE group (explained later) you wish to omit. Let's say you want all the light paths exceptf or a couch

Shorthand

Above we are explicitly stating what we want using the tokens. We can use shorthand and some following examples will use it. I can substitute a . (period) for the events and types.

Instead of writing out the tokens, just use a . for "whatever" if you need not be specific. The period is the way to shorthand an expression while other ways may simply omit a token, only the period is used in place of a token.

Code Block
Diffuse (All types, direct and indirect): lpe:C<.D>*[<L.>O]
Specular (All types, direct and indirect): lpe:C<.S>*[<L.>O]

...

Code Block
A longer beauty LPE can be seen as
Beauty: lpe:C<[RT][DS]>.*[<L.>O]
 
Can be written as a shorter version belowCan be written as a shorter version below (notice the omission before the asterisk meaning we'll accept anything)
Beauty: lpe:C<..>*[LO]

This can be shrunk even further (you notice we remove a couple things where "any" or the . just gets omitted) but we'll go over what the LPE parser assumes later. For now we'll keep it tidy and readable.

...

Code Block
lpe:C<[RT][DS]>{1}[<L.>O]
lpe:C<[RT][DS]>{2}[<L.>O]
lpe:C<[RT][DS]DS]>{3}[<L.>O]


Shorthand:
lpe:C<..>{1}[LO]
lpe:C<..>{2}[LO]
lpe:C<..>{3}[<L.>OLO]

 

Carousel Image Slider
stretchfalse
dotsfalse
infinitefalse
sliderHeight300
arrowsfalse
labelsFilterlpebounce
gutterSize2
slidesToScroll0
captionstrue

...

Code Block
Collect just the 4th through 8th bounce
lpe:C<[RT][DS]>{4,8}[<L.>O]
 
Collect all the bounces until you reach the 5th bounce
lpe:C<[RT][DS]>{,5}[<L.>O]
 
Start at the 3rd bounce and go until the path is finished
lpe:C<[RT][DS]>{3,}[<L.>O]


Shorthand:
lpe:C<..>{4,8}[LO]
lpe:C<..>{,5}[LO]
lpe:C<..>{3,}[LO]

The following examples show these actions. Note that when we leave the beginning or ending blank, the renderer makes that decision on where to begin or end the collection.

...