Announcement

Collapse
No announcement yet.

Renders are slow to unload

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

  • Renders are slow to unload

    Hi,

    We are currently working on a project that is very environment heavy, roughly 80 thousand homes of varying complexity ranging anywhere from 1k to 10k faces and some hero buildings that have much more.

    We are using vray proxies for all the houses, and then instancing them across the scene so we can control multiple buildings with the original shader should any changes need to be made.

    The vast majority of these assets are multi-tiled textured in Mari, and we have converted the textures to multi-tiled exrs to help with render times.

    That has helped with getting the renders through at a fairly good speed.

    Unfortunately the problem for us right now is the time it takes to unload the assets and textures.

    We are able to render at reasonable times, but the delay comes when Vray is unloading the geometry.

    Our renders currently take 15-25 minutes but unloading everything takes 1-6 hours.

    As you can imagine it is a huge bottleneck for us.

    I was hoping there is some sort of work around for this.

    Thanks!

  • #2
    Yes this is an issue, when you have many textures all tiled. Depending on your vray version, if you are in vray 3, you may try option - cache bitmaps between renders. This will keep the textures in ram on the same mayabatch job I believe. If you are in vray 2.x you need to declare this variable for the same result:

    SET VRAY_MAYA_KEEP_BITMAPS=1
    Dmitry Vinnik
    Silhouette Images Inc.
    ShowReel:
    https://www.youtube.com/watch?v=qxSJlvSwAhA
    https://www.linkedin.com/in/dmitry-v...-identity-name

    Comment


    • #3
      Thank you very mush for the reply.
      We are using Vray 2.x.
      Is the variable you mentioned the same as VRAY_TEXTURE_CACHE? Should we set that to 1 as well?
      Thanks again for the help.
      Best

      Comment


      • #4
        Originally posted by pxm-vray View Post
        Our renders currently take 15-25 minutes but unloading everything takes 1-6 hours. As you can imagine it is a huge bottleneck for us. I was hoping there is some sort of work around for this.
        This is an issue on Windows only and is due to a bug in the Windows memory manager. The latest versions of V-Ray 3.0 work around the problem, and things are much faster.

        For V-Ray 2.x, if you are using a nightly build, on the render farm you can use the VRAY_VRAY_TERMINATE_ON_FRAME_END=1 environment variable so that V-Ray exits right after a frame is complete. On your workstations, as Dmitry suggested, you can try using VRAY_MAYA_KEEP_BITMAPS=1 which will not free the textures between renders.

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment


        • #5
          Originally posted by vlado View Post
          This is an issue on Windows only and is due to a bug in the Windows memory manager. The latest versions of V-Ray 3.0 work around the problem, and things are much faster.

          For V-Ray 2.x, if you are using a nightly build, on the render farm you can use the VRAY_VRAY_TERMINATE_ON_FRAME_END=1 environment variable so that V-Ray exits right after a frame is complete. On your workstations, as Dmitry suggested, you can try using VRAY_MAYA_KEEP_BITMAPS=1 which will not free the textures between renders.

          Best regards,
          Vlado

          Thanks for the reply Vlado.

          In deadline we are able to set task sizes, so we can have one job render x amount of frames. Could we use the "VRAY_MAYA_KEEP_BITMAPS" variable that Morbid mentioned in in conjunction with the variable you mentioned?

          So that way we can keep the textures loaded for that tasks length, be it 1, 2, 5, or 10 frames and than after that task is done it gets flushed?

          Thanks again guys.

          Comment


          • #6
            Originally posted by pxm-vray View Post
            In deadline we are able to set task sizes, so we can have one job render x amount of frames. Could we use the "VRAY_MAYA_KEEP_BITMAPS" variable that Morbid mentioned in in conjunction with the variable you mentioned?
            No, unfortunately VRAY_VRAY_TERMINATE_ON_FRAME_END=1 will cause V-Ray to exit right away as soon as a single frame is rendered, so it will only work if each task has a single frame. V-Ray has no way of knowing how many frames deadline has in the task.

            Best regards,
            Vlado
            I only act like I know everything, Rogers.

            Comment


            • #7
              An alternative solution could be to port the fixes from the 3.x branch to the 2.x nightlies, but I don't know if this will be possible if the code has drifted apart too much.

              Best regards,
              Vlado
              I only act like I know everything, Rogers.

              Comment


              • #8
                Makes sense.

                Thanks again for the assistance.

                Much appreciated.

                Comment


                • #9
                  Originally posted by pxm-vray View Post
                  Makes sense.

                  Thanks again for the assistance.

                  Much appreciated.
                  I wouldn't worry about batching frames. If your frame takes 15-20 minutes, batching them isn't going to save you much time. It only makes sense to do that if your frames take few minutes and there are thousands of them. For long frames you would want to kill the render right after the frame has been written out, so vlado's suggestion is perfect for you.

                  For the keeping bitmaps between renders, you have to be careful about this option. In my experience under vray 2.x if you update the textures from photoshop after you cached them in ram in maya, they will not refresh. Be aware of things like that.
                  Dmitry Vinnik
                  Silhouette Images Inc.
                  ShowReel:
                  https://www.youtube.com/watch?v=qxSJlvSwAhA
                  https://www.linkedin.com/in/dmitry-v...-identity-name

                  Comment


                  • #10
                    Yep, we don't check for changes with the bitmaps. The rencent VRay 3.0 versions have now a button to clear the bitmap cache.
                    V-Ray/PhoenixFD for Maya developer

                    Comment


                    • #11
                      Hi,

                      We deployed the latest nightly build as well as the environment variable that Vlado suggested.

                      I proceeded to do a test render with the updates, and on render completion, Maya closed.

                      I am assuming it is because of the terminate command?

                      If that is the case, then the best route to go by is to use the keep bitmaps env variable for artist profiles, and have the terminate vray env variable active for farm jobs.

                      Also Morbid if you could clarify for me the environment variable is "VRAY_MAYA_KEEP_BITMAPS=1" and not "SET VRAY_MAYA_KEEP_BITMAPS=1".

                      Comment


                      • #12
                        you need the VRAY_VRAY_TERMINATE_ON_FRAME_END=1 for batch job only.

                        The SET is needed when you declare variables through a cmd start file and not maya.env
                        Dmitry Vinnik
                        Silhouette Images Inc.
                        ShowReel:
                        https://www.youtube.com/watch?v=qxSJlvSwAhA
                        https://www.linkedin.com/in/dmitry-v...-identity-name

                        Comment


                        • #13
                          Just to double check, is the Bitmap command something we set as an environment variable in windows, or something we set in the Maya.env?

                          Comment


                          • #14
                            Maya.env

                            more characters so i can post
                            Maya 2020/2022
                            Win 10x64
                            Vray 5

                            Comment

                            Working...
                            X