Anyone Using LPE?

ShawnBoothShawnBooth Posts: 465
edited December 1969 in The Commons

I just discovered this while going through the "Show IRAY Renders 2" thread... https://www.youtube.com/watch?v=2M-nDVUDD1c

Seems to me, this is the way to go.

Any thoughts? Pros/Cons? Workflow?

«1

Comments

  • StrixowlStrixowl Posts: 301
    edited December 1969

    WoW !!! :)

  • algovincianalgovincian Posts: 2,664
    edited December 1969

    I just discovered this while going through the "Show IRAY Renders 2" thread... https://www.youtube.com/watch?v=2M-nDVUDD1c

    Seems to me, this is the way to go.

    Any thoughts? Pros/Cons? Workflow?

    I use a similar workflow now with 3DL in DAZ Studio, only it's not just a on a per light basis. I apply different shaders to everything in the scene (color, shadows, ao, fresnel, z-depth etc.), and then render each pass separately.

    Somebody was nice enough to point out LPE to me in a previous thread, though I had difficulty finding much documentation (especially with respect to using it in DAZ).

    In general, I prefer a more non-linear/non-serial workflow utilizing separate render passes for the following reasons:

    1. processing each pass independently (I can filter out the grain on an AO pass without adversely effecting any of the other passes, for example)

    2. processing the fresnel and z-depth passes independently to create edge masks for use in processing of other passes (impossible to create the same masks if the passes aren't kept separate)

    3. the system resources required to render is drastically reduced

    There are other considerations, and some of these may not apply to Iray. I've tried to adapt my workflow to use Iray instead of 3DL (so I can take advantage of the cuda cores on my video card), but the way I use Shader Mixer to author custom shaders for use in 3DL doesn't really translate to Iray - at least not that I've been able to figure out yet.

    - Greg

  • ShawnBoothShawnBooth Posts: 465
    edited December 1969

    There's this:
    Render Settings Pane

    The Render Settings pane now includes an NVIDIA Iray render engine option1). The Editor and Advanced pages offer the option to choose which render engine to use; the active renderer.

    The Render Settings pane also now provides access to Light Path [removed]LPE), when NVIDIA Iray is set as the active engine. LPEs allow light contributions in the scene to be isolated, or even on a per object basis, which provides full creative control in post production to achieve the desired look.

    With NVIDIA Iray set as the active engine, the Advanced page now includes options for choosing which hardware to use. Under both Photoreal and Interactive Devices, there is the option to choose if the CPU or video card does the work or splits it, as well as the option for which card will render a scene, if more than one is available.

    From here: http://docs.daz3d.com/doku.php/public/software/dazstudio/4/new_features/start

    Anyway, I've done a few renders in 3Delight using separate passes, to include fake DoF and AO. I stopped because it wasn't doing enough for me and I'm quite happy with most of my renders out of 3Delight. LPE though... I'll be tackling that today/tonight if I can.

  • algovincianalgovincian Posts: 2,664
    edited December 1969

    There's this:
    Render Settings Pane

    The Render Settings pane now includes an NVIDIA Iray render engine option1). The Editor and Advanced pages offer the option to choose which render engine to use; the active renderer.

    The Render Settings pane also now provides access to Light Path [removed]LPE), when NVIDIA Iray is set as the active engine. LPEs allow light contributions in the scene to be isolated, or even on a per object basis, which provides full creative control in post production to achieve the desired look.

    With NVIDIA Iray set as the active engine, the Advanced page now includes options for choosing which hardware to use. Under both Photoreal and Interactive Devices, there is the option to choose if the CPU or video card does the work or splits it, as well as the option for which card will render a scene, if more than one is available.

    From here: http://docs.daz3d.com/doku.php/public/software/dazstudio/4/new_features/start

    Anyway, I've done a few renders in 3Delight using separate passes, to include fake DoF and AO. I stopped because it wasn't doing enough for me and I'm quite happy with most of my renders out of 3Delight. LPE though... I'll be tackling that today/tonight if I can.

    I'll be following this thread - I'd love to hear about any progress you make!

    - Greg

  • algovincianalgovincian Posts: 2,664
    edited December 1969
  • ShawnBoothShawnBooth Posts: 465
    edited July 2015

    I'm waiting on a render to complete and then I'm going to use the same image to try this process. I'll post the images as IRAY-Photoreal, IRAY-LPE post worked together and my final image with post work for color correction/grading and FX. I'm excited to jump in! (Hence this post)

    EDIT: the image concept is borrowed from one found here: Link removed

    Post edited by Richard Haseltine on
  • ShawnBoothShawnBooth Posts: 465
    edited July 2015

    Here's that render - 6 hours into, I just decided to stop it. First is the straight render, second with post work (color grading/FX).

    I can't find much under render setting in terms of LPE. I changed setting to make it a linear render and set it off.

    EDIT: Do we have to enter script into the scripts pane? Anyone know how to utilize LPE in DS?

    GHOST-.jpg
    2000 x 750 - 370K
    GHOSTSHELL-nopost.jpg
    2000 x 750 - 417K
    Post edited by ShawnBooth on
  • wizwiz Posts: 1,100
    edited December 1969

    I've done that sort of thing before in DAZ, with Dreamlight's "LightDome Pro" tool. That's basically a set of scripts that renders the scene with each light separately, then lets you redo the intensity and color of each light separately in Photoshop.

    The NVidia solution looks slicker, since doing it in the raytracer should be faster, and no extra dodads to play with.

    I also do this sort of stuff in real product and architectural photography, with a little box that fires all my flashes in sequence and takes a separate raw photograph of each (8 frame/second DSLRs are wonderful. The clients tend to go "what the heck was that" the first time I fire off a sequence) then comp all the separate shots into Photoshop.

  • ShawnBoothShawnBooth Posts: 465
    edited July 2015

    wiz said:
    I've done that sort of thing before in DAZ, with Dreamlight's "LightDome Pro" tool. That's basically a set of scripts that renders the scene with each light separately, then lets you redo the intensity and color of each light separately in Photoshop.

    The NVidia solution looks slicker, since doing it in the raytracer should be faster, and no extra dodads to play with.

    I also do this sort of stuff in real product and architectural photography, with a little box that fires all my flashes in sequence and takes a separate raw photograph of each (8 frame/second DSLRs are wonderful. The clients tend to go "what the heck was that" the first time I fire off a sequence) then comp all the separate shots into Photoshop.

    I have the Light Dome thing. It's gathering dust though.
    I'd really like to figure this out and most of the info I have found is in regards to 3D Studio Max IRAY.

    No one has any info? Like where do you enter the expressions?

    Post edited by ShawnBooth on
  • wizwiz Posts: 1,100
    edited December 1969

    wiz said:
    I've done that sort of thing before in DAZ, with Dreamlight's "LightDome Pro" tool. That's basically a set of scripts that renders the scene with each light separately, then lets you redo the intensity and color of each light separately in Photoshop.

    The NVidia solution looks slicker, since doing it in the raytracer should be faster, and no extra dodads to play with.

    I also do this sort of stuff in real product and architectural photography, with a little box that fires all my flashes in sequence and takes a separate raw photograph of each (8 frame/second DSLRs are wonderful. The clients tend to go "what the heck was that" the first time I fire off a sequence) then comp all the separate shots into Photoshop.

    I have the Light Dome thing. It's gathering dust though.
    I'd really like to figure this out and most of the info I have found is in regards to 3D Studio Max IRAY.

    No one has any info? Like where do you enter the expressions?
    Light Dome is, in my opinion, a tool that would only appeal to a photographer or gaffer, someone used to physical lights.

    Sorry, no experience with IRAY expressions yet.

  • ShawnBoothShawnBooth Posts: 465
    edited December 1969

    wiz said:
    wiz said:
    I've done that sort of thing before in DAZ, with Dreamlight's "LightDome Pro" tool. That's basically a set of scripts that renders the scene with each light separately, then lets you redo the intensity and color of each light separately in Photoshop.

    The NVidia solution looks slicker, since doing it in the raytracer should be faster, and no extra dodads to play with.

    I also do this sort of stuff in real product and architectural photography, with a little box that fires all my flashes in sequence and takes a separate raw photograph of each (8 frame/second DSLRs are wonderful. The clients tend to go "what the heck was that" the first time I fire off a sequence) then comp all the separate shots into Photoshop.

    I have the Light Dome thing. It's gathering dust though.
    I'd really like to figure this out and most of the info I have found is in regards to 3D Studio Max IRAY.

    No one has any info? Like where do you enter the expressions?


    Light Dome is, in my opinion, a tool that would only appeal to a photographer or gaffer, someone used to physical lights.

    Sorry, no experience with IRAY expressions yet.

    Loved light dome but can it be used with IRAY engine?

    Still trying to figure out how to do LPE in DS...

  • SzarkSzark Posts: 10,634
    edited December 1969

    Loved light dome but can it be used with IRAY engine?

    That would be a big NO
  • algovincianalgovincian Posts: 2,664
    edited December 1969

    No one has any info? Like where do you enter the expressions?

    Check Render Settings->Alpha->Default Alpha LPE

    Select "custom"

    You can then browse for a "Custom Alpha LPE"

    This is the only place that I have seen LPE, but unfortunately, I have limited time to blindly play with things with zero documentation.

    Hope this helps you figure something out, Shawn.

    - Greg

  • EsemwyEsemwy Posts: 578

    I recently posted a help desk response here. I got a couple of useful links out of the deal. As mentioned above, the controls are under Advanced -> Canvases, but the page for entering actual expressions is a bit wonky (the cursor doesn't advance as you type). I did manage to get it to render EXR files for both depth and "E.*L" (complete scene). I haven't had the time to play with it since then. It's something I'm actively looking at, though, so if I come across anything useful, I'll post it here. 

  • ShawnBoothShawnBooth Posts: 465

     

    ShawnBooth said:

    No one has any info? Like where do you enter the expressions?

     

    Check Render Settings->Alpha->Default Alpha LPE

    Select "custom"

    You can then browse for a "Custom Alpha LPE"

    This is the only place that I have seen LPE, but unfortunately, I have limited time to blindly play with things with zero documentation.

    Hope this helps you figure something out, Shawn.

    - Greg

    Esemwy said:

    I recently posted a help desk response here. I got a couple of useful links out of the deal. As mentioned above, the controls are under Advanced -> Canvases, but the page for entering actual expressions is a bit wonky (the cursor doesn't advance as you type). I did manage to get it to render EXR files for both depth and "E.*L" (complete scene). I haven't had the time to play with it since then. It's something I'm actively looking at, though, so if I come across anything useful, I'll post it here. 

    Big Mahaloz!!Now  I have to go play in DS soon... Been lost in ZBrush...

  • EsemwyEsemwy Posts: 578
    edited July 2015

    Well, I did some tests. It sort-of works. Iray/DAZ have some weird pathological cases when computing convergence it seems. The example render used here ran to completion on only a couple of minutes, but clearly it was not done cooking. I'd even increased the quality from 1.0 to 2.0 and set the converged ratio to 97% instead of 95%. Clearly it either needs larger values or there's something strange going on (or both). Tone-mapping on/off doesn't seem to make a great deal of difference if any.  Either way, I think it gets the point across. All the canvases were written as EXR files, and I tone-mapped them in Photoshop using "Local Adaptation". This may or may not be "the right thing to do ™".

    Here are my canvases:

    Canvases

    I used the expressions from Instant Relighting & Nonphysical Effects mentioned earlier in this topic.

    Caustics "La .* S (D|G) E":

    Caustics

    Non-Caustics "La (.* (S | [^S] .) | .?) E":

    Non-caustics

    Here's the composite.

    Composite

    Depth (Canvas.Depth):

    Depth

    Scene "L .* E":

    Normal

    This one rendered direct to screen and was less than 5% converged and already looks better in many ways:

    5 Percent

    I guess my point is Light Path Expressions work, but there are some strange interactions that I need to work out before I can use them in my work flow. If anybody has any ideas with regard to the quality problem, please share.

    Post edited by Esemwy on
  • ToborTobor Posts: 2,300

    Have you tried the Beauty built-in canvas render style? I had assumed this was really just a preset to the equivalent light path expression. When I tried it (tone mapping off), I got a render that went all the way. Maybe someone at Daz will drop by and share the expressions they used for these built-in setting styles.

     

  • ToborTobor Posts: 2,300

    Following up after a closer look at these docs on canvas names:

    http://www.migenius.com/doc/realityserver/latest/resources/general/iray/manual/index.html#/concept/canvas_names_in_render_targets.html

    I don't see something called "Beauty," so I assume this is L .* E, and the canvas name is extrapolated for end-users. Is that what you meant for your L .* P entry, or did you mean something else?. What does "P" signify in this case? I may be referring to old or incomplete docs, and haven't seen the type of examples you used (e.g., on your caustics, the order of precedence and ORing is fairly different).

  • EsemwyEsemwy Posts: 578
    edited July 2015
    Tobor said:

    Following up after a closer look at these docs on canvas names:

    http://www.migenius.com/doc/realityserver/latest/resources/general/iray/manual/index.html#/concept/canvas_names_in_render_targets.html

    I don't see something called "Beauty," so I assume this is L .* E, and the canvas name is extrapolated for end-users. Is that what you meant for your L .* P entry, or did you mean something else?. What does "P" signify in this case? I may be referring to old or incomplete docs, and haven't seen the type of examples you used (e.g., on your caustics, the order of precedence and ORing is fairly different).

    Thanks, fixed. "P" was a typo.

     It's not clear what "Beauty" is, but it's mentioned a lot in Compositing with Light Path Expressions, which I just re-read, and have some new ideas as a result. There's one awkward phrase in the section you reference in The Iray Programmers Manual where it says, "Color or Float32<3> canvas that contains the rendered image with all contributions, the beauty pass, including the alpha channel." That seems to imply that "L .* E" and the "Beauty" pass are the same.

    It's the tone mapping discussion in Compositing with Light Path Expressions that I think may be particularly useful. I've been turning off tone-mapping, which I read was important elsewhere on these forums, but it's clearly not necessary to activate the canvas functionality. Using it to get the EXR into linear space (0.0 to 1.0) would make the Photoshop workflow I'm using much more certain. 

    The caustics expression is from Instant Relighting & Nonphysical Effects, referenced above from iray dev blog. I'll check all my expressions before I give it another try.

    Post edited by Esemwy on
  • ToborTobor Posts: 2,300

    At the bottom of this page:

    http://www.migenius.com/doc/realityserver/latest/resources/general/iray/manual/index.html#/concept/light_path_expression_grammar.html

    there are some examples of typical expressions with caustics. I haven't played much with these, and I don't even know if you have to enable the caustics sampler first. That looks to be a separate setting to the Iray API apart from the LPE string.

    Some tidbits in that blog post were updated by another post a little later on where the author says to just use the Enable Tone Mapping function, which Daz thoughtfully included in the UI. It also mentioned fiddling with Nominal Luminance, which in the D|S UI appears to be off (0.0) by default.

    The reason I'm suspecting LPE is functioning properly in D|S is that, from how I'm interpreting the docs, it's LPE that's being used for all the renders anyway. The docs do say that L .* E is the same as no expression at all, but then many of the other default canvas styles are coming out OK.

  • Joe.CotterJoe.Cotter Posts: 3,362
    edited July 2015

    I haven't played with LPE with IRay, but here is a Light Path Node Explanation for Blender. Looking at the programming manual section on LPE for IRay it looks like the basic constructs are there for a Light Path node. Has anyone found a node prebuilt for IRay?

    Here is another explanation of the Light Path Node by BlenderCookie and here is a link that shows some examples of Light Path expressions that may be available in IRay also but aren't necessarily obvious from the sketchy documentation available.

    I haven't had time to play with this yet and won't for a bit as I am working on other projects at the moment but It might be worth it to see how much of this applies to the IRay environment.

    Post edited by Joe.Cotter on
  • EsemwyEsemwy Posts: 578
    Gedd said:

    I haven't played with LPE with IRay, but here is a Light Path Node Explanation for Blender. Looking at the programming manual section on LPE for IRay it looks like the basic constructs are there for a Light Path node. Has anyone found a node prebuilt for IRay?

    Here is another explanation of the Light Path Node by BlenderCookie and here is a link that shows some examples of Light Path expressions that may be available in IRay also but aren't necessarily obvious from the sketchy documentation available.

    I haven't had time to play with this yet and won't for a bit as I am working on other projects at the moment but It might be worth it to see how much of this applies to the IRay environment.

    Similar concept, but not the same thing. Light Path Expressions in Iray are regular expressions (think grep). They control light paths in a similar manner to Blender light path nodes, but are lower level constructs. I can use a LPE to do things like separate contributions from individual lights or reflections from individual objects and output them to different buffers (EXR files). When my render is complete, I can composite the results using different weights to get the appearance I want.

    There are pretty concise explanations in Compositing with Light Path Expressions and Instant Relighting & Nonphysical Effects from iray dev blog as well as Get a grip (1): separating objects using LPE handles and Get a grip (2): instant color change, which I just realized hadn't been linked in this discussion.

     

  • ToborTobor Posts: 2,300

    What Esemwy said.

    I think the concept behind Iray is that they want to avoid this type of nodal inferrence for lighting, as it takes a biased approach. They talk about making the lighting simulation "push button," so nodal setups like these aren't necessary, or desirable. LPE provides a way to set up a scene, then process it on a per object/material/light basis, while keeping the influence of all the scene objects in mind. The physical properties of the light, and how it interacts with the objects in the scene, can then be added together. When saved as full-tone EXRs, you can adjust each contribution in post, saving yourself the time of making tweaks and re-rendering.

    That's my understanding of it, at least. And, for the EXR part, I'm finding my workflow tools don't fully support it. Something about limited EXR features in CS5 Extended, which is what I have. I may have to splurge and get Creative Cloud (the PS/LR combo, at least). More money to Adobe, I suppose.

     

  • EsemwyEsemwy Posts: 578
    edited July 2015

    On an slightly different note, I still can't figure out the quality problem. In fact, it seems to get worse with longer runtimes. I'm not sure if it has to do with fireflys or something else, but it absolutely hates the wax cylinder in the background. Tonemapping is set to that suggested in Compositing with Light Path Expressions, Rendering Quality is set to 16.0 and Rendering Converged Ratio is set to 99%. They were black in my earlier renders, now they tonemap to white. This render ran for almost an hour.

    Full Size   Zoomed

    Suggestions?

    Post edited by Esemwy on
  • Joe.CotterJoe.Cotter Posts: 3,362
    edited July 2015
    Esemwy said:

    Similar concept, but not the same thing.

    Yes I was just going over the programmer's guide and saw there were no methods for many of the functions in the Blender LP node setup, such as ray length, etc... It seems much more limited.

    Post edited by Joe.Cotter on
  • Joe.CotterJoe.Cotter Posts: 3,362

    Blender's LP node is used to separate out different outputs that can be saved as an .exr file also for compositing. The difference, besides having much more functionality from my cursory look at it, is that Blender has a built in compositor that handles said .exr files and is very capable. You might want to look at Blender's composite functionality as you should be able to import an .exr file from IRay and it's both free and very extensive in it's capabilities.

    Tobor said:

    What Esemwy said.

    I think the concept behind Iray is that they want to avoid this type of nodal inferrence for lighting, as it takes a biased approach. They talk about making the lighting simulation "push button," so nodal setups like these aren't necessary, or desirable. LPE provides a way to set up a scene, then process it on a per object/material/light basis, while keeping the influence of all the scene objects in mind. The physical properties of the light, and how it interacts with the objects in the scene, can then be added together. When saved as full-tone EXRs, you can adjust each contribution in post, saving yourself the time of making tweaks and re-rendering.

    That's my understanding of it, at least. And, for the EXR part, I'm finding my workflow tools don't fully support it. Something about limited EXR features in CS5 Extended, which is what I have. I may have to splurge and get Creative Cloud (the PS/LR combo, at least). More money to Adobe, I suppose.

     

  • EsemwyEsemwy Posts: 578

    Regardless of the relative strengths, LPEs are what we have in Iray. Personally I prefer to write short expressions than to drag blocks around a node editor, and as far as post goes, Photoshop layers seems more than capable of handling my needs and doesn't place me in node editor hell. 

    BTW, Gedd, you're mistaken about the ray-length limitation. LPEs support it as part of the expression (as do normal regexes). The expression "L .* E" is zero or more interactions, "L .+ E" is one or more, "L .{2,} E" is two or more, etc. I'm sure I could do the same thing in Blender with a couple dozen nodes, but I'd really rather not. 

    The only real limitation I can see in LPEs is that a lot of people don't understand regular expressions. I do (former Perl programmer), so for me it's a win. 

  • Joe.CotterJoe.Cotter Posts: 3,362

    Well that's good information about the ray length. It would be nice to see a brick (node) made that exposed the capabilities of LPEs as there are many people who don't have the background to make use of expressions but given a node setup could come up with some creative uses for LPEs. While I do have a programming background, I don't like to strain my brain more then I have to as I find it interferes with my creative side, only so many brain cells to go around at any one time. I know that's just me, but I'm guessing there are some out there who share this. Personally, I love node based environments over text based as I find them much more intuitive, faster, and not prone to syntactical errors that text based environments are. My personal use for text when possible is to create nodes/bricks, whatever you want to call them for the environment, then use the graphical representation for doing the large scale stuff.

  • EsemwyEsemwy Posts: 578
    Gedd said:

    Well that's good information about the ray length. It would be nice to see a brick (node) made that exposed the capabilities of LPEs as there are many people who don't have the background to make use of expressions but given a node setup could come up with some creative uses for LPEs. While I do have a programming background, I don't like to strain my brain more then I have to as I find it interferes with my creative side, only so many brain cells to go around at any one time. I know that's just me, but I'm guessing there are some out there who share this. Personally, I love node based environments over text based as I find them much more intuitive, faster, and not prone to syntactical errors that text based environments are. My personal use for text when possible is to create nodes/bricks, whatever you want to call them for the environment, then use the graphical representation for doing the large scale stuff.

    Different strokes for different folks. I've been really enjoying the programming aspects of Iray (MDL, LPE). It's where they meet the GUI (and are thus undocumented) that I have my problems. The nodes to me look like a visual representation of spaghetti code. 

Sign In or Register to comment.