Announcement

Collapse
No announcement yet.

Instance of an instances memory leak bug

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

  • Instance of an instances memory leak bug

    I have an asset of a tree with a leaf instanced on branches. Now, I instanced that tree asset as a wood, and everthing work perfectly in viewport ipr, there is minimal memory footprint. But, when I try to render final image, or sequence on disk, memory skyrockets and it is impossible to render anything. Karma renders it without any memory problems. Very strange that it renders normally in viewport ipr. Is that a but, or some object properties has to be added somewhere or something? Can someone confirm? Aside from Solaris, what is proper way to do this in obj context, should I export tree asset as vrscene (with rayserver property on object)?

  • #2
    Instancing in Solaris uses GeomInstancer plugin (same as in non-Solaris).
    While in non-Solaris there is an option whether to use "Rayserver Instancer" mode, in Solaris
    it's rayserver by default.

    Rayserver mode is very efficient in memory however the way it works if rayserver is instancing geometry
    that has rayserver inside (the case when one instancer is instancing another instancer) depending
    on bounding box interpenetration each nested level may slowdown render up to 2x.

    While for viewport it'll give faster scene processing and faster time to first pixel this may be the case for
    production rendering with husk.

    So the default behavior for now is nested rayserver for viewport and unpacked instancer (all nested levels
    are merged to a single level instances lists) for production render and this control altering the behavior if needed.

    There is a control in render geometry settings you could set on prototype "Unpack Instancers" to "Never".
    I'll add some global control for the next nightly.

    However, we've tested unpacking and it was pretty efficient for our test scene with about 5 nested instancer levels
    (with total final amount about 10M instances), any luck to send us your scene for tests?

    > what is proper way to do this in obj context

    Just packed prims (and raysever if needed).
    You may bake out to Alembics as well (if needed).
    Last edited by bdancer; 23-06-2023, 04:34 AM.
    V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
    andrei.izrantcev@chaos.com
    Support Request

    Comment


    • #3
      Hi Andrei,

      This issue with increased rendertime on nested raysverintancers has been an issue for years now. Is there any plans on resolving this? Flattening the instancers is not really an option in most cases - also highlighted by the op here.
      Last we spoke about this, you said that it would require an update of Embree that would probably make its way into VRay6.
      Jacob Børsting
      Head of Pipeline @ Ghost VFX

      Comment


      • #4
        > Last we spoke about this, you said that it would require an update of Embree that would probably make its way into VRay6.

        And it was not the case unfortunately.


        > Flattening the instancers is not really an option in most cases

        Why not? How many total instances do you have? Could I have a scene that is spiking mem usage?
        As I wrote in our test cases totaling about 10M instances unpacking was pretty fast.
        V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
        andrei.izrantcev@chaos.com
        Support Request

        Comment


        • #5
          I tried setting the Unpack Instancers to "Never" on the rendersettings node, but it doesn't seem to have any effect on memory usage in production render mode.
          I have a single Point Instancer with a Prototype with another instancer in it.

          Is it not working? Has anyone used that setting with success?
          Jacob Børsting
          Head of Pipeline @ Ghost VFX

          Comment


          • #6
            Hello jbvfx , I assume that you are render the scene from GUI. Can you try close the Scene View tab and than render the scene. This seems to work here with similar setup.
            Georgy Chakarov | QA
            www.chaosgroup.com
            georgy.chakarov@chaosgroup.com

            Comment


            • #7
              This is when rendering with Husk on the farm. I see no change in memory consumption no matter what I set this setting to. Even setting it on every prim in the Stage with the Render Geometry Properties has no effect.
              Jacob Børsting
              Head of Pipeline @ Ghost VFX

              Comment

              Working...
              X