Results 1 to 6 of 6

Thread: LPE quetion Lp <R.>.E vs Lp <R.>E

  1. #1
    Join Date
    Apr 2014
    Location
    Wisconsin, USA
    Posts
    249

    Default LPE quetion Lp <R.>.E vs Lp <R.>E

    hello. trying to figure out why i get too different results with the following LPE's

    Lp <R.>.E

    and

    Lp <R.>E

    the "dot" is a wildcard character, that result looks like maybe a specular. without the "dot" it looks more like a diffuse.

    .E vs just plain E

    thanks,

  2. #2
    Join Date
    Jul 2015
    Location
    Santa Clara
    Posts
    250

    Default

    the 'dot' is a wildcard character that represents an event, though strictly it could be written <...> to include wildcards for the event type (R reflection, T transmission or V volume), scattering mode ( D diffuse, G glossy or S specular) and an object/light handle.

    If we only use one of the components, such as <R..>, we can simplify down to R.

    If you don't care what the event, scattering or handle is, you can use the wildcard ' .'.

    If you don't care how many of these events occur before reaching the camera, use the number wildcard *, such as in the beauty pass LPE , L <...>* E which is of course shortened to L .* E.

    The 2 LPE's give different results because they describe 2 different events:

    Lp <R.> E can also be written as Lp <R..> E or simplified to Lp R E, and describes any light ray from a point light that directly hits and reflects off an object then goes straight to the camera (2 bounces- light to object to camera)

    Lp <R.> . E can also be written as Lp <R..> <...> E or simplified to Lp R . E , and describes any light ray from a point light that directly hits and reflects off an object then hits another object (or the same one in a different place) and THEN goes straight to the camera (3 bounces- light to object to another object to camera)
    Last edited by rossh; May 24th, 2016 at 02:12.

  3. #3
    Join Date
    Apr 2014
    Location
    Wisconsin, USA
    Posts
    249

    Default

    thank you rossh! i haven't been able to devote much more time to this lately, busy with other things, but your response helps me understand now more!

  4. #4
    Join Date
    Jul 2015
    Location
    Santa Clara
    Posts
    250

    Default

    Glad I could help. Once you get to grips with the basic REGEX syntax and how the expressions can also be written in a simpler way, it soon becomes much clearer how to write these expressions and how powerful they are.

    It's fun just to experiment and see what results yo can come up with by tweaking the expressions slightly.

  5. #5
    Join Date
    Apr 2014
    Location
    Wisconsin, USA
    Posts
    249

    Default

    Digging up an old thread!

    The basic format of an LPE is: L(ight) < type mode handle > E(ye) -or- L < t m h > E

    type and mode can be expressed as single letters:
    type can be R(eflection) T(ransmission) V(olume interaction)
    mode can be D(iffuse) G(lossy) S(pecular)

    handle can be a named object in the scene or a dot wildcard (.) or left out if not using one.

    in long form you can have: L <R D .> E

    the t & m can be replaced by square bracketed combos representing one or more of the types or modes. so [RTV] or [DGS]. the long form format of the LPE would be like this: L <[RTV] [DGS]> E -or- another example would be: L <[R..][.G.].> E if you are using a dot (.) as a handle placeholder. Basically any combination of R T V or D G S in those two square bracket sets.

    in your response, you have Lp <R.> . E can also be long form written as Lp <R..> <...> E but how does this adhere to the L < t m h > E format? <R..> is the type, <...> is the mode (or all modes in this case) but why no square brackets which define a set? why does: L <[R..][...]> E give me an error? I think i'm mixing up "sets" in the context of L < t m h > E

    AH - or is your <R..> <...> representing two completely different things like an "either or" or "both"?

    Lp <R.> . E can also be written as Lp <R..> <...> E or simplified to Lp R . E , and describes any light ray from a point light that directly hits and reflects off an object then hits another object (or the same one in a different place) and THEN goes straight to the camera (3 bounces- light to object to another object to camera)

  6. #6
    Join Date
    Jul 2015
    Location
    Santa Clara
    Posts
    250

    Default

    Lp <R..> <...> E adheres to the format by being in the format: L <t m h> <t m h> E. Each <t m h> is a separate event.

    Lp just specifies a point light, whereas L stands for any time of light.

    You can't use placeholders in sets, so [R..][...] is invalid. Technically [...] would include all events anyway. You need to specify the sets required. So for instance you could write an expression like:

    L <[RT][GS]> E

    which will match reflection and transmission rays of types glossy and specular. If you use the carat '^' symbol you could rewrite it to do the opposite of what is written (giving the same result):

    L <[^V][^D]> E

    (the first expression ignored volumetric and diffuse rays, so we can instead of specifying the other rays simply write an expression to say NOT these rays)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •