Announcement

Collapse
No announcement yet.

V-Ray compiling and then clearing geometry every frame

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

  • V-Ray compiling and then clearing geometry every frame

    Hi, I'm on VRay 7, my scene only contains a few vrmeshes and simple camera move, one simple object rotation. No texture or complicated shaders at all. With the compiling and then clearing geometries every single frame, the render is pretty painful.

    My scene is about a factory setup. So there are lots of objects. I combined all the small parts with the same material into one mesh, then combined every few thousand parts into one vrmesh.

    Is this too much for vray to handle? What's the regular workflow in this case? Could you point me to a direction please? (I also can't use vantage, it crashes almost every time.) Thanks a ton!
    Last edited by onyxlee; 21-04-2025, 11:18 PM.

  • #2
    I suspect that using proxies in your case is not the way to go, you might want to read up on this post, especially the Vrayproxies part (I think number 4 applies to what you're doing):

    https://forums.chaos.com/forum/chaos...usage-in-v-ray
    A.

    ---------------------
    www.digitaltwins.be

    Comment


    • #3
      Originally posted by onyxlee View Post
      Hi, I'm on VRay 7, my scene only contains a few vrmeshes and simple camera move, one simple object rotation. No texture or complicated shaders at all. With the compiling and then clearing geometries every single frame, the render is pretty painful.

      My scene is about a factory setup. So there are lots of objects. I combined all the small parts with the same material into one mesh, then combined every few thousand parts into one vrmesh.

      Is this too much for vray to handle? What's the regular workflow in this case? Could you point me to a direction please? (I also can't use vantage, it crashes almost every time.) Thanks a ton!
      The paritioning of triangles into the (embree) acceleration structure is likely what you are facing.
      This geometry preparation is an unavoidable step, and it's camera-related, for a number of valid reasons, so it requires rebuilding each time a render starts.
      It also spikes memory usage, before returning it to a lower one, so you should check you have memory to spare with the task manager open while render starts.

      At the cost of considerable RAM and VRAM, you could set the proxies to display the full mesh, and it would likely get you a quicker time to first pixel.
      However, this could also crash Max, or your video drivers, if you ran out of RAM/VRAM in the process.

      The regular workflow is to wait for the render to complete, given a specific scene and hardware combination, with the required patience: there is no secret.

      V-Ray hasn't crashed, so it's not too much for it: maybe you're running out of available RAM and swapping to disk come rendertime?
      As for Vantage, if you're running out of system RAM, i can't imagine the scene to fit it into your VRAM, which i assume to be a fraction of the OS one.

      Last but not least, feel free to share the scene with support, so we can verify it's really not some obscure bug.
      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


      • #4
        Thank you both for your help! Lele, I read your in-depth guide. It's very insightful.

        So, my files are nearly 2Gb of vrmeshes, each vrmesh has hundreds to thousands of objects in it. My project is a whole factory, which includes 5 workshops. I separated the walls, pipes, equipment of workshop into an individual vrmesh. So each workshop has 3 vrmeshes. So I have 15 vrmeshes in total.

        I tried to combine all the objects with the same material into the same object. This brings the total number of objects from 60k to a few hundred in each vrmesh.

        I am switching to Vantage at this point because rendering in vray is just too slow.

        I noticed that I have to constantly hide some vrmeshes in order to prevent Vantage from crashing. This process is not automatic. I thought vrmeshes that are out of sight would be automatically unloaded fromh ram/vram, but that turns out to be not true. This greatly increased the amount of labor work.

        How should I change the vrmesh export settings to improve the performance? (I am also a Unreal user. If we could have nanite in VRay, that will be great!)

        Maybe I should move this post to Vantage sub forum?

        Comment


        • #5
          TL;DR: try re-exporting the combined geometry as proxy with this option off (leave the rest at defaults)
          Click image for larger version

Name:	image.png
Views:	45
Size:	2.3 KB
ID:	1231273

          Long version:
          There is an option -on by default in the max exporter- which defeats the purpose of proxies made up of many meshes like yours, and if that is the case it's highly likely that's also the culprit for your woes.
          Short story on proxies: they are not a simple face list, but rather contain a voxel structure that can be loaded -with the belonging triangles- independently on demand at rendertime. (refer to the linked guide for more in-depth explanations on the subject)
          "optimize for instancing" essentially forces the loading of the whole proxy as soon as any part is needed, by virtue of lumping all the triangles of the mesh into a single voxel.
          It's ideal if -as the option implies- one's about to instance, say, a few million copies of the same grass clump: there will be far less work to do with memory and I-O, and the instancing will take care of memory use.
          However, in your case, you may end up loading the whole set, visible or far less so (secondary rays, like the GI bounces, count too. The lightcache bounces 100 times...), when the actual proxy format would allow you for far more granular an approach.

          Let me know if it helped any.
          I (and the forum!) remain at disposal for further takes at the issue.
          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