Announcement

Collapse
No announcement yet.

is it possible to have different object render sets per render layer?

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

  • is it possible to have different object render sets per render layer?

    Hi,

    I am trying to set up a shot using different object render sets per render layer using layer overrides but it doesnt seem to be working as expected. It sets up and renders correctly but when you change render layer it loses the connection and it seemingly has to be remade.

    Is there a fool proof way of getting this to work?

    Thanks in advance

  • #2
    Just to understand it correctly, you're trying to move objects between different object properties sets when switching render layer?
    Normally you'd just override the options inside them, I think that's what you'd do in 90% of cases. That being said, I think you might be able to switch between sets in a way by nesting your objects inside two groups, one inside the other and creating an object properties set for each of those groups. Then override the General > Disable option to switch between them. Haven't tested it though, don't know if it would work.

    Edit: oh I completely misunderstood this, don't know how that happened
    Last edited by dgruwier; 24-05-2019, 07:33 AM.
    __
    https://surfaceimperfections.com/

    Comment


    • #3
      Hi, thanks for the reply.

      i am not trying to switch objects memberships between render layers.

      what I am trying to achieve is to use different ‘render mask - object sets’ per render layer using something like a render layer override. It doesn’t seem to be possible using a tradional set up so am wondering if there are other solutions to achieve the same result
      many Thanks

      Comment


      • #4
        Are you using the "render mask" + Object sets? This hasnt worked with overrides for a while I think. It looks like its worked in the UI but when you switch layers it doesnt change.
        Website
        https://mangobeard.com/
        Behance
        https://www.behance.net/seandunderdale

        Comment


        • #5
          Yeah that’s exactly what I am experiencing. I was just wondering if there was an alternative setup that would allow for the same result.

          Thanks in advance

          Comment


          • #6
            It seems that this doesn't work for some reason. We'll see what if there's something we can do about it. In the meantime, it might work if you have different sets for each layer and use a pre-render-layer script to change which set is connected as a render mask object.
            Alex Yolov
            Product Manager
            V-Ray for Maya, Chaos Player
            www.chaos.com

            Comment


            • #7
              that's a good idea. do you have an example of what that pre-render-layer script would look like?

              many thanks!

              Comment


              • #8
                Something like that works for me:

                Code:
                string $currentLayer = `editRenderLayerGlobals -q -crl`;
                if ($currentLayer == "rs_layer1") {
                    setAttr "vraySettings.renderMaskMode" 2;
                    connectAttr -f set1.usedBy vraySettings.renderMaskObjectSet;
                } else if ($currentLayer == "rs_layer2") {
                    setAttr "vraySettings.renderMaskMode" 2;
                    connectAttr -f set2.usedBy vraySettings.renderMaskObjectSet;
                } else {
                    setAttr "vraySettings.renderMaskMode" 0;
                }
                Basically matching the current layer (as a string), enabling the render mask in object set mode and force-connecting different sets (which I've created and added objects to beforehand).
                Then the else statement is for all other layers to disable the render mask.
                All scene objects are added to all render layers.

                Attaching an example scene. It's for Maya 2018 and V-Ray Next, using the new render setup system. The same script is pasted in the pre render layer MEL field in render settings > common tab > MEL/Python callbacks
                renderMask_layerOverride.zip
                Attached Files
                Alex Yolov
                Product Manager
                V-Ray for Maya, Chaos Player
                www.chaos.com

                Comment


                • #9
                  this is great, thanks!

                  Comment

                  Working...
                  X