Results 1 to 8 of 8

Thread: LPE for rendering only objects on a specific layer

  1. #1
    Join Date
    Dec 2017
    Posts
    136

    Default LPE for rendering only objects on a specific layer

    hello, i had notes that said to render an object(s) on a layer, the LPE would be: E 'layer' .*L ( have tried it without the spaces too)

    however this is not working for me. i have 3 objects on a layer called "layer". i'd like to render just those 3 objects. thanks.

    PS - rendering a specific single object on any layer works: L * 'Sphere' E

  2. #2
    Join Date
    Nov 2017
    Posts
    209

    Default

    Hi,

    Unfortunately this isn't currently possible. It's something we have looked at adding, but it's complicated by the fact that true underlying structure in the scene graph that 3ds Max passes over to the renderer does not always (or even usually) match up with the layer structure that is displayed in the 3ds Max UI, therefore we can't simply apply a handle/label to all the objects in a Max layer, as they are not necessarily grouped together in the scene graph.

    But yes this is a future improvement that is on our list, so this helps us assess priority.

    Thanks,
    Michael
    QA Engineer, Lightworks

  3. #3
    Join Date
    Dec 2017
    Posts
    136

    Default

    ah ok! thanks... what's good is i can do single objects, so i suppose if i need to i can do multiple LPE for them. thanks!

    PS - I FREAKING LOVE the iray render window!

  4. #4
    Join Date
    Dec 2017
    Posts
    136

    Default

    not to be a pest, but is it possible to use a wildcard for an object name? for example if 4 objects are named "base_01" "base_02" "base_03" etc. the LPE might be: L.'base_.'*E

  5. #5
    Join Date
    Nov 2017
    Posts
    209

    Default

    It doesn't look as though the LPE syntax supports wildcards in that way. You can use the "." wildcard for complete events, but not within handle strings. This does make sense as a feature request though so I will look into that.

    To go back to the first question, there is actually an additional issue that stops that being easy to implement. In Iray terms, LPEs can refer to "handles" which are attached to instances of geometry. Each instance can only have one handle applied to it, but will inherit the handle from the parent if it is not set on it specifically.

    So for example, assume you have two objects called "Sphere1" and "Box1", and you have put them in a layer called "Layer1". You may want to construct LPEs that reference the objects directly, or reference the layer to get both objects. Unfortunately the sphere can only have one handle applied to it, which can be either "Sphere1" if we set this handle directly, or "Layer1" if we don't set it and allow it to inherit from the parent. It's not possible to support both simultaneously, and it's not obvious which method the user would prefer as a default. This also gets even more complicated with nested layers.

    It's possible we could provide some controls to allow users to select different options for how the handles are applied, but I don't think there's an obvious elegant solution to this, and it still would not be able to support multiple mehtods simultaneously.

    And on top of this there is the issue I mentioned before where, even though "Sphere1" and "Box1" are played in "Layer1" in the Max UI, the actual scene structure that gets passed to Iray doesn't necessarily reflect this at all.

    So for all of these reasons we took the decision to always set the handle on the instance to be the same as the object name in Max. This keeps things simple and allows fine control, but unfortunately doesn't make it easy to reference large groups of objects/lights at the same time.

    If you can think of an interesting solution we'd be glad to hear it

    In fact the wildcard functionality would be one way of providing a possibly solution to this, whereby we could construct a long handle based on the object name + any layer names it is grouped under. The user could then use the wildcards to specify the part of this long handle they are interested in. So this is definitely something worth looking into (although not currently possible).

    Michael
    Last edited by MichaelBellamy; 31st May, 2019 at 11:50.
    QA Engineer, Lightworks

  6. #6
    Join Date
    Dec 2017
    Posts
    136

    Default

    oh boy, i'm sure this might be some type of problem, but it appears that if i instance an object and give it the same name "teapot001" then do an LPE to render just "teapot001" then it renders two teapots. then i randomly started to rename other objects in the small test scene i have going and the LPE's would render more and more things - all of the same name, the floor i changed the name to teapot001, other teapots i changed all their names to teapo001. ha!

  7. #7
    Join Date
    Nov 2017
    Posts
    209

    Default

    Hi,

    That's expected behaviour. You can use the same handle on multiple object instances and if you create an LPE to reference that handle then it will capture all the relevant light paths for all those objects.

    I'm planning to add a "Knowledge Base" section to the documentation in the not-too-distant future which will go into more depth about how to use certain aspects of the plugin, or achieve certain things, and I think use of LPEs is a good topic to include in that

    Thanks,
    Michael
    QA Engineer, Lightworks

  8. #8
    Join Date
    Dec 2017
    Posts
    136

    Default

    thanks michael. yeah LPE's have always been wierd for me. some documentation i've found in the past doesn't apply anymore to today's releases. others are confusing as heck. i have read a lot about "it uses regular expressions" - i've extensively used regulalr expressions in programming in the past and database work etc... but none i don't know all the words LPE's use. I know things like L = light E = eye R = reflection D = Diffuse = etc... but not sure how it all comes together. i also used to write documentation and procedures.

    my approach would be similar to the blog posts i've seen about compositing with LPE's, or Relighting, but rather than focus on photoshop stuff, i'd stick with and hammer home the language/syntax of what all can be done. "i want to render all the light that Teapot A contributes to the scene, from all lights, from just interior lights" " i want to render wall B with all lights, with just interior lights" "i would like to render everything EXCEPT wall B".

    thanks!

Posting Permissions

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