How to release VRAM?

How to release VRAM after switching from "Texture Shaded" to "Wire Boundin Box" or to "Smooth Shaded" in Daz Studio?

When I start Daz Studio and when I switch view to "Wire Boundin Box" and when I load my scene, the VRAM is almost empty. When I switch the view to "Texture Shaded" mode, about 8GB VRAM is used. When I switch the view back to "Wire Boundin Box", no VRAM is released. How to release VRAM?

Comments

  • Texture shaded or Iray? 8GB sounds more like the latter, and if iray runs out of memory on the GPU it doesn't usually release it until DS restarts (and so Iray restarts).

  • crosswindcrosswind Posts: 6,915

    Depending on the "scene size", VRAM will be consumed accordingly after you load it into Viewport, but after that, when switching drawstyles ( Texture Shaded / Wire Bounding Box / Smooth Shaded, etc.), there won't be big change in terms of VRAM consumption.

    Not sure of how "big" your scene is... but suggest you download and install GPU-Z, open it before loading your scene. While monitoring "Memory Used" on GPU-Z's panel, load your scene. After scene loading, as per the changed "Memory Used" , calculate how much VRAM this scene consumed...

    If you get a number approaching 6GB ~ 7GB, better optimize your Scene (with some product like Scene Optimizer..)

  • Michal P.Michal P. Posts: 76
    edited December 2023

    Thank you for response.

    To Richard: yes "Texture Shaded". This mode loads textures to VRAM. "Smooth Shaded" does not load textures to VRAM.

    So, probably the only way to release VRAM is to restart Daz Studio, set "Smooth Shaded" mode and load the scene. It would be nice to have possibility to relase textures from VRAM when switching to "Smooth Shaded" mode, where textures are not needed in VRAM.

    To Crosswind: I am using HWiNFO. I have attached record from VRAM load. The VRAM is over 24 GB during Iray rendering. After rendering it drops to about 10 GB. I was using "Texture Shaded" mode in the viewport. I closed the Daz studio. The VRAM drops to 1.4 GB. This is shown in the attached file. I am monitoring pretty much everything during working in Daz Studio - the second attached file.

    I restarted the Daz Studio, I set "Smooth Shaded" mode, and I opened the scene. The VRAM was below 2 GB. I started rendering and the VRAM was below 20 GB.

    Anyway, Merry Christmas and Happy New Year to everybody. not load textures to VRAM.

     

    VRAM.png
    576 x 177 - 6K
    HWiNFO.png
    3840 x 1552 - 365K
    Post edited by Michal P. on
  • crosswindcrosswind Posts: 6,915
    edited December 2023

    I'm sorry that I cannot well understand the data from the screenshots you posted, as per the language... but I got your points. I myself only use GPU-Z which proves to be the most accurate software for me... but the data should be more or less similar from what you observed via HWiNFO I presume.

    Yes, with Texture Shaded drawstyle, much more VRAM will be consumed than Smooth Shaded because of texture maps. But I can assure you that this part of consumption will be released after you clear the scene rather than closing DS.

    In DS, only VRAM consumption by Iray Render Engine (appr. 2 ~ 2.2GB) cannot be released until DS application is closed, i.e. the moment you click to Render, this part of VRAM consumption is "reserved" there as buffer until you close DS.

    So pls have some more tests - with DS single session opened, DO not Iray Preview or Render but just load the Scene with Texture Shaded and clear the Scene, while monitoring the data change of VRAM consumption....

    Merry Christmas and Happy New Year to you too !

    Post edited by crosswind on
  • What is your setting for Edit>Preferences>Interface tab>Texture Resource-Performance.

  •  Texture Resources is on the right (under Quality).

    Richard Haseltine said:

    What is your setting for Edit>Preferences>Interface tab>Texture Resource-Performance.

    Preferences.png
    402 x 551 - 34K
  • Turn it down then, more towards performance.

  • jbowlerjbowler Posts: 794

    m_pohanka_6db953ed73 said:

    How to release VRAM after switching from "Texture Shaded" to "Wire Boundin Box" or to "Smooth Shaded" in Daz Studio?

    It looks like DS grabs some fairly signficant quantity of the VRAM and doesn't release it.   It's not as bad as web browsers, the VRAM grabs seem to be somewhat in response to what I do, web browsers just grab memory and some other programs do that too.  Nevertheless you do seem to be correct; DS isn't releasing memory.

    Here are some facts:

    Config:

    • Compute device GTX4090
    • UI device UHD630 with a single UHD monitor (landscape)

    VRAM usage on the compute device as reported by TechGPU-Z:

    1. Open DS: 710MB (up from previous releases where it was around 500MB).
    2. Open real world scene with viewport set to "Wire Bounding Box" and aux-viewport not on display but set to "Texture": 710MB (no change).
    3. Open aux-viewport: 1021MB  (In fact I never see this because I never use the aux-viewport).
    4. Close aux-viewport: 1021MB
    5. Swap viewport to Texture shaded: 1012MB
    6. Swapping to other modes higher up the menu doesn't make any difference, well, except that the UI performance in all of the wireframe modes is abysmal (I find this really annoying.)
    7. Cartoon shaded: 1065MB and the UI works.  The compute memory usage does not decrease when I swap back to "texture" or WBB.
    8. Iray mode: 7534MB.
    9. Swap back to texture: 4412MB, swapping to the wire modes or smooth shaded makes no difference and now neither does cartoon.
    10. Open a new (empty) scene: 4103MB (still in cartoon).
    11. Swap to texture 4101MB
    12. Swap to Iray 4193MB
    13. Do a UHD render of said, empty, scene: 4277MB (single image to window)
    14. Close the render window 4197MB
    15. Add a cube to the scene: 4785MB
    16. Render the cube and close the render window, swap back to WBB: 4693MB

    It's obvious what is going on but, for me, it's not an issue because I don't have any other programs that use VRAM apart from PS and fortunately I pretty much never use PS.

  • Richard Haseltine said:

    Turn it down then, more towards performance.

    Thank you for the tip. This helps a lot! Although I do not see any difference in the view port with "Texture Shaded" mode, the difference in VRAM usage is huge. I start Daz Studio, I load my scene in "Smooth Shaded" then I switch to "Texture Shaded" when "Texture Resources" is under "Quality", the used VRAM increases by 6 GB. When I do the same with "Texture Resources" under "Performance" I do not see any significant increas of VRAM. It is probably less than 0.1 GB.

  • michaelpomarmichaelpomar Posts: 11

    This is definately an issue that's causing me on a 2070 super (8GB Vram) to have to restart DS after every render otherwise 75% of the time it will flip to CPU, complaining my video card doesn't have enough memory. If there is a way to reset that 20% or so that it is holding on to I'm sure it would fix this annoyance. 

Sign In or Register to comment.