Announcement

Collapse
No announcement yet.

.vrscene export save with "disablesceneredraw()" ?

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

  • .vrscene export save with "disablesceneredraw()" ?

    Hello,
    I've been comparing export speeds for the .vrscene exporter within 3ds max recently. I've found some cases in witch the export gets really slow and memory intensive for no apparent reason. For examble:

    For all these examples I'm using the "vrayExportRTScene" Maxscript command:

    I'm having a scene containing just VrayProxy objects which load alembic files with animation (animated trees) and a light. If I export this scene to a .vrscene file, the .vrscene file stays nice and small and the export is lightning fast.
    Now If I would apply a geometry changing modifier to the objects like bend or turbosmooth or whatever, I'd understand that the export speed would be MUCH slower and file size of the .vrscene file would get huge because it would have to re-write all that animation information into the .vrscene file. So far so good. What I don't understand is: If I apply a VrayDisplacement modifier to the VrayProxy Objects it does not change geometry, only the link to the alembic file gets written into the vrscene file, not the geometry itself. But the export speed is really really slow compared to not having the VrayDisplacement modifiers there. The .vrscene file stays nicely small after the export but the export itself takes a very long time.

    Now what I've found out is, that if I use disablesceneredraw() prior to vrayExportRTScene() the export is lighting fast again, my question now is: is it "save" do do it this way? In all my tests, this worked great so far, are there cases in which you guys grab information from the viewport that would be "missed" by the exporter if the redraw is disabled? Would you guys have any concerns?

    If it is save to use, I'd recommend you guys to add this option to the gui dialog asap because from my tests, the export is a lot faster in most of the cases even if a lot of info is written to the .vrscene file.
    This could prevent potential frustration for people who want to use the gui exporter by a quite significant margin.

    Thank you
    -Robert
    Last edited by Fridayvfx; 10-12-2018, 03:46 PM.

  • #2
    Hello,

    I'm trying to reproduce the slow export for alembics with V-Ray Displacement modifier but in my simple test the export time is pretty much the same. Can you share the scene where you see the big slowdown ?

    Apart from this - disabling scene redraw while exporting seems safe and is indeed something we can consider while the export is going on.

    Best regards,
    Yavor
    Yavor Rubenov
    V-Ray for 3ds Max developer

    Comment


    • #3
      Hello Yavor, thanks for your answer.

      I've prepared a simple test scene for you, you should download the max file and the alembic file here:

      https://www.dropbox.com/sh/v6dwdrkg1...N3fgFl_Ha?dl=0

      The file contains only one tree, loaded as alembic with animation.
      With this file you will need to recreate and debug the following cases:

      Case 1: Very Slow: Viewport redraw is enabled, Displacement modifier is enabled, .vrscene export is very slow.
      Case 2: Better: Viewport redraw is enabled, Displacement modifier is disabled, .vrscene export is faster but not very fast.
      Case 3 very fast: Viewport redraw is DISABLED, Displacement modifier is enabled (or disabled, it does not matter), .vrscene export is very fast.

      In all cases, the resulting vrscene file only contains the link to the alembic and no actual geometry information.

      Thank you.
      -Robert
      Last edited by Fridayvfx; 11-12-2018, 01:27 PM.

      Comment


      • #4
        I've found an additional problem:
        At least for me it is the case that in the described "Case 1" It seems that, if you let the export run for a longer time, there is a memory leak somewhere.
        3Ds max's memory consumption will grow and grow while exporting the .vrscene file. If I put not one but multiple of these trees in a scene and export the
        scene with displacement modifiers and viewport redraw on, it will even exceed my 128 gigs of Ram by about 2/3 of the 250 frames export.

        -Robert

        Comment


        • #5
          Thanks for the scenes - I can reproduce it here too.
          Most probably we will add the disable redraw and some other things too.
          About the memory - it is related to the proxy preview cache. There are settings for it in Render Setup->Setting->Proxy Preview Cache. When it is on and you change the current frame the proxy preview mesh for the old frame is saved in memory. Then if you go back to the previous frame it is much faster. In your case the proxy preview is set to "Show whole mesh" (any specific reason that you need this ?). This causes the preview meshes to be huge and the cache fills up pretty quick.
          I'll add a note - we should probably disable the cache while exporting vrscenes.
          Yavor Rubenov
          V-Ray for 3ds Max developer

          Comment

          Working...
          X