Announcement

Collapse
No announcement yet.

Vray 5 VFB - Composite Source when rendering with backburner

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

  • Vray 5 VFB - Composite Source when rendering with backburner

    Hi there,

    I use a composite tree in the VFB. Bute when rendering in the network the source is always switched to LightMix and the resulting render does not have the composite layers baked into it. Is there any way to change this? Maybe with maxscript?

    Thx

  • #2
    For anyone interested:

    I got this to work with a preRenderFrame callback script which executes: "((vfbControl #getlayermgr)[1].sourceLayer).src_type = 1"

    Comment


    • #3
      I tried this script but it doen't seem to be working on my network renders. The script works when I press the execute now, so I know it's not the words themselves. I always get the LightMix render, either through the vrayimage file save or through the standard 3ds max output.

      Even when I render locally, even if I already set it to composite view, at automaticaclly switches back as soon as the render starts.
      Last edited by adele_flesher; 01-11-2021, 09:29 AM.

      Comment


      • #4
        OK, so through testing I've found that the script works if you dont have a lightmix render element. What would I need to change in the script to account for having a lightmix still present? I tried changing the '1' at the end of the script to 2, but that didnt work.
        Last edited by CYAN_STUDIOS; 02-11-2021, 04:45 AM.

        Comment


        • #5
          The Source is always switched to LightMix (whenever the element is present) by design. I presume you can work around this if you transfer the LightMix manipulations "to scene" and remove the element. However, do tell us what's your scenario. Maybe we can figure out another way.
          Aleksandar Hadzhiev | chaos.com
          Chaos Support Representative | contact us

          Comment


          • #6
            We do already transfer the lightmix to the scene, so deleting the render element is fine, but I guess this leads onto another question I posted, but didn't have an answer to yet. Is there a way to setup render presets (one for test renders, one for final) that doesn't alter the layers already setup in the frame buffer? I have more than this render element to switch on and off, and every so often I miss something spoiling an overnight render.
            Last edited by CYAN_STUDIOS; 05-11-2021, 02:25 AM.

            Comment


            • #7
              That happens because the VFB Layers are saved within the Render Presets. Currently, there isn't a way to bypass this behavior. What comes to mind to mitigate the chance of forgetting is to create a little script that loads a Render preset and afterward loads a VFB Preset:
              Code:
              renderPresets.LoadAll 0 "C:\Users\<user>\Desktop\RenderPreset.rps"
              vfbcontrol #loadglobalccpreset "C:\Users\<user>\Desktop\VFBPreset.vfbl"
              Aleksandar Hadzhiev | chaos.com
              Chaos Support Representative | contact us

              Comment


              • #8
                I'm sorry, my scripting knowledge is next to nothing. Would there be a way of automating this a little more? Where it can save out the scene's vfb preset, but to the same location as the max file and the same name? Then the same for the loading, automatically searching for a preset with the smae name as the .max file?

                many thanks in advance

                Comment


                • #9
                  I think this should do:
                  Code:
                  sceneName = getFilenameFile maxfilename
                  outputPreset = sceneName +".vfbl"
                  vfbControl #saveglobalccpreset outputPreset
                  renderPresets.LoadAll 0 "C:\<user>\Alexander\Desktop\RenderPreset.rps"
                  vfbcontrol #loadglobalccpreset outputPreset
                  Aleksandar Hadzhiev | chaos.com
                  Chaos Support Representative | contact us

                  Comment


                  • #10
                    Sorry, I've been away from this for a while with production work. That code does work for me, thanks. The next bit, is there a maxscript command to send lightmix changes to the scene? I can't find it in the vfbControl() options.

                    Comment


                    • #11
                      Originally posted by CYAN_STUDIOS View Post
                      Sorry, I've been away from this for a while with production work. That code does work for me, thanks. The next bit, is there a maxscript command to send lightmix changes to the scene? I can't find it in the vfbControl() options.
                      Here you go.
                      Aleksandar Hadzhiev | chaos.com
                      Chaos Support Representative | contact us

                      Comment


                      • #12
                        Ah, it seems I was looking at the older version of that page, many thanks

                        Comment


                        • #13
                          I worked with the script and had no problems with it.
                          As I said it has to be added as a PreRenderFrame Callback like this:

                          Code:
                          callbacks.addScript #preRenderFrame "((vfbControl #getlayermgr)[1].sourceLayer).src_type = 1" id:#vfbComposite persistent:true

                          Comment


                          • #14
                            Wait what?

                            I was not aware of this.

                            For clarification. Does this mean that BacktoBeauty changes are not included in the RGB when sending to backburner, if LightMix is present?

                            Comment


                            • #15
                              Originally posted by DestinHalfmann View Post
                              For clarification. Does this mean that BacktoBeauty changes are not included in the RGB when sending to backburner, if LightMix is present?
                              Switching source doesn't reset the other sources' changes, by design.
                              If that is happening through backburner, it's a bug/limitations we'd like to know about.
                              Lele
                              Trouble Stirrer in RnD @ Chaos
                              ----------------------
                              emanuele.lecchi@chaos.com

                              Disclaimer:
                              The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                              Comment

                              Working...
                              X