Announcement

Collapse
No announcement yet.

Maya Render Setup layer renders all lights in layer - only in mayabatch

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Maya Render Setup layer renders all lights in layer - only in mayabatch

    We've only recently started switching to Render Setup coming from Maya Legacy's renderlayers and we're facing an issue with a specific 'understanding' or 'misunderstanding' as to why a render differs in render output in Mayabatch compared to running it inside the Maya interface.

    It seems in Mayabatch all lights, even when not added in a collection in the Render Setup layer will be used for rendering during Mayabatch even though in Maya running V-Ray in the UI it will only render with the actual lights contained in that particular layer.

    Attached is a scene reproducing the issue.

    The scene has three lights, a dome light, a spot light and a rectangular light. Then we've made three layers each containing only one light (purely as an example - we understand for this case we could use light groups in a single layer but it's just to show the issue.)
    In this case it's done with an expression for the Render Setup layer, but we've seen the same happen when the lights are explicitly added to each layer.

    When rendering through Deadline somehow all layers contain all lights where I'd expect each layer to have only that specific light.

    Tested with:
    V-Ray 5 for Maya version 5.00.20 from Aug 5 2020, 16:06:17
    Autodesk Maya 2020.3

    The only workaround really that works fine in mayabatch is explicitly forcing the layers to disable visibility of the other lights (basically including those lights, but disabling them). However, with the lights not even included in the layer I'd expect, like when rendering within Maya GUI that lights not in the layer are ignored.
    Attached Files
    Last edited by colorbleed; 01-02-2021, 08:56 AM.

  • #2
    It seems the "Include all lights in each renderlayer by default" setting in Render Setup isn't saved with the scene but set for the individual maya session.

    Which is stored in an optionVar
    Code:
    renderSetup_includeAllLights
    or can be set as environment variable:
    Code:
    MAYA_RENDER_SETUP_INCLUDE_ALL_LIGHTS
    . Ugh!
    That is bound to create some inconsistencies.
    We're forcing the variable now to 0 within our pipeline environment so all machines behave the same.
    So, MAYA_RENDER_SETUP_INCLUDE_ALL_LIGHTS=0 is the winner today.

    I guess this solves the issue.
    Last edited by colorbleed; 01-02-2021, 09:56 AM.

    Comment


    • #3
      Its a feature, not a bug.
      But a very poor design decision from Autodesk.
      Florian von Behr
      CG Supervisor
      The Scope GmbH
      Behance

      Comment


      • #4
        hey just ran into this today in 2020.4. For anyone that has the same issue, an easy per scene workaround is adding Pre-Render MEL command in your common render globals. This should force this setting on render nodes and get things rendering as expected. Worked for me when submitting to Deadline.

        Code:
        optionVar -iv "renderSetup_includeAllLights" 0

        Comment

        Working...
        X