Does Iray Load Invisible Objects into Memory When Rendering?

I have my G3 figure setup with tons of different types of clothes to choose from at just a click of a button. However, what I am not sure about is that does Iray load those invisible models into the memory since they are in the scene, or does it only load what is visible?

Comments

  • mjc1016mjc1016 Posts: 15,001

    What is the advantage of loading several layers of clothing on to a figure and then hiding them?

    I just don't understand that...

    But back to your question...no, it shouldn't if they are hidden with the eye icon in the Scnet tab.

  • RuphussRuphuss Posts: 2,631
    edited March 2016

    I have my G3 figure setup with tons of different types of clothes to choose from at just a click of a button. However, what I am not sure about is that does Iray load those invisible models into the memory since they are in the scene, or does it only load what is visible?

    it always loads all to your gpu

    hiding does nothing here

    yes it shouldnt but it does

    Post edited by Ruphuss on
  • RenomistaRenomista Posts: 921

    I have not tested it for clothing for a otherwise visible Figure.

    But at least if you hide the whole figure or other props they don't load to GPU.

    Just look at the Textures Loaded and Poly Count during Render Setup in the log file and you'll have a better understanding.

     

  • RuphussRuphuss Posts: 2,631

    just checked with gpu-z

    gpu loads all invisible or not

  • nicsttnicstt Posts: 11,715

    If you don't want it loaded, you need to delete it. It may render quicker with it invisible, or off camera, but it will get loaded; that will affect time of render if the items need to be uploaded to the card; which happens every time if a scene is not left open.

  • I'm using 4.9.1.30 with a GTX 980 Ti 6G and I tested this with a real scene containing two G3M figures, a few items of clothing, 2 hairs and 3 props. Lighting is IBL only. I did of course not leave the previous render windows open. I guess the test could have been more rigorous, but the result is pretty clear as it is.

    Test 1: Hide all but one G3M figure (with clothing and hair). Max memory used approx. 2.2G.

    Test 2: Delete hidden objects, keep as above. Max memory used approx. the same as 1.

    Test 3: Undelete and show all objects. Max memory used approx. 3.7G. Load time considerably longer as would be expected.

    Memory usage measured with GPU-Z.

    As you can see this demonstrates that less memory is used with objects hidden.

    The advantage of loading multiple clothing or hairs and hiding those you don't want to see is that it makes it quick and convenient to compare the items so that you can decide what's best in the final render (which is actually what Richard John said). I do it all the time as I have a tendency to keep changing my mind about things.

     

  • RenomistaRenomista Posts: 921

    Nicstt what exactly get loaded into the gpu? I could not find any info about this in the log files. And it is clear as Hiro wrote, that hiding has an significant memory impact.

    do you have info about what is still loaded when hidden? This would be very interesting.

  • RuphussRuphuss Posts: 2,631

    after doing a lot of renders with the same scene

    closing render window each time

    memory used increases after each render

    i noticed this earlyer when the render started to use cpu

    i restarted studio and everything rendered fine with gpu

     

    i made all objects invisible

    nearly the same memory peak used as all visible

     

     

  • KhoryKhory Posts: 3,854

    One of the other PA's said that yes it does increase render time even if they are hidden.

    I have my G3 figure setup with tons of different types of clothes to choose from at just a click of a button. However, what I am not sure about is that does Iray load those invisible models into the memory since they are in the scene, or does it only load what is visible?

    One of my own personal worst habits by the way. When I set up promos I try on several outfits and want to "hold on" to the ones I may still use in another promo. Same wit hair and so on.

  • nicsttnicstt Posts: 11,715
    Renomista said:

    Nicstt what exactly get loaded into the gpu? I could not find any info about this in the log files. And it is clear as Hiro wrote, that hiding has an significant memory impact.

    do you have info about what is still loaded when hidden? This would be very interesting.

    I don't know what is loaded for sure, but afte watching GPU said, invis doesn't stop everything being loaded, if it actually stops anything. The same for items off camera.

    Invis, and off camera may or may not help render times, much harder to be sure.

    The only certain way is to delete what you don't need... I do.

    If I might want it again, then I save as a subset, which I can then merge back in.

    As I type, I'm working on customising a new texture.

    I have six renders open atm. I leave one of them open as it will start rendering in about 9 or 10 seconds; if I closed them all it would take about a minute to reload the scene to memory.

    I have a scene, two figures, one invis; the render takes 2035MB; if I cancel it but leave it open it drops to 1203MB.

    I deleted the figure, and clicked render - the card is now using 2210MB, but that is with an image left open; the upside, this time it started rendering in nine seconds; having to load the graphics card first took just over minute last time. Now that's weird, the card has 2035MB in use, the same as when there was a figure in the scene invised; that suggests it didn't load it.

    There is a caveat though. The figures were the same with the same textures on them. only the shader settings were different.

    I have noticed that before; I was experimenting, and when geometry details are the same, textures the same, it is possible to get more figures in a scene.

    I have an arabella figure off camera but not invis: GPU RAM 2559MB (1 render open), which compares with 2035MB previously.

    With the arabella 7 character invis, the memory readout was almost always 2035, it did a couple of times jump upwards for a few seconds - no idea why, before reverting to 2035MB.

    I have 6GB of RAM on the 980ti, so memory is usually not an issue - unless I'm doing larger scenes, so I like to keep an image open. I only start worrying about RAM when scenes are dropping out.

     

  • ToborTobor Posts: 2,300

    When doing these benchmarks, remember to close any render windows, and ideally, close and restart D|S. Otherwise, you will likely get a previous version of the scene database, which is known to be kept in memory as long as a render window is kept open. The database would naturally be updated if you make a major change in the scene (add a figure, change its textures), but this may not happen simply by changing the visibility of an object.

    When benchmarking render starts, be sure to start your stopwatch at the first iteration. (Almost) everything before that is preparation of the scene database. The first iteration occurs after the first progressive pass of samples. Keeping watch of the GPU load, and having the sensors update <2 sec intervals, is another good way to know when actual rendering has begun.

     

  • marblemarble Posts: 7,500
    edited May 2016

    Seems the jury is still out on this one. We seem to have two definitive yet opposite answers to the original question. 

    I have also noticed the GPU memory seems to fill up over successive renders if I am swapping items in and out of the scene. My guess is that was because I was using Interactive mode in the Aux Viewport which is probably like leaving a render window open. The only way I could clear it was to save the scene and restart DAZ Studio,

    For the record, I also leave clothing invisible for quick change purposes. Seems I need to break that little habit too. More of a concern is having to delete things out of shot - that could be a PITA.

    Post edited by marble on
  • RuphussRuphuss Posts: 2,631

    did you try deleting the daz temp interior instead of shutting the program ?

    i always have that folder on my desktop

  • marblemarble Posts: 7,500

    Do you mean the temp folder you specify in Preferences? I thought that was only used for 3Delight (I'm so new to Iray).

  • RenomistaRenomista Posts: 921

    Have you tried to deactivate Iray Preview in the Viewports. In my experience this also clears the VRAM but i did no hard test on this...

  • RenomistaRenomista Posts: 921
    edited May 2016
    nicstt said:
    Renomista said:

    Nicstt what exactly get loaded into the gpu? I could not find any info about this in the log files. And it is clear as Hiro wrote, that hiding has an significant memory impact.

    do you have info about what is still loaded when hidden? This would be very interesting.

    I don't know what is loaded for sure, but afte watching GPU said, invis doesn't stop everything being loaded, if it actually stops anything. The same for items off camera.

    Invis, and off camera may or may not help render times, much harder to be sure.

    The only certain way is to delete what you don't need... I do.

    If I might want it again, then I save as a subset, which I can then merge back in.

    As I type, I'm working on customising a new texture.

    I have six renders open atm. I leave one of them open as it will start rendering in about 9 or 10 seconds; if I closed them all it would take about a minute to reload the scene to memory.

    I have a scene, two figures, one invis; the render takes 2035MB; if I cancel it but leave it open it drops to 1203MB.

    I deleted the figure, and clicked render - the card is now using 2210MB, but that is with an image left open; the upside, this time it started rendering in nine seconds; having to load the graphics card first took just over minute last time. Now that's weird, the card has 2035MB in use, the same as when there was a figure in the scene invised; that suggests it didn't load it.

    There is a caveat though. The figures were the same with the same textures on them. only the shader settings were different.

    I have noticed that before; I was experimenting, and when geometry details are the same, textures the same, it is possible to get more figures in a scene.

    I have an arabella figure off camera but not invis: GPU RAM 2559MB (1 render open), which compares with 2035MB previously.

    With the arabella 7 character invis, the memory readout was almost always 2035, it did a couple of times jump upwards for a few seconds - no idea why, before reverting to 2035MB.

    I have 6GB of RAM on the 980ti, so memory is usually not an issue - unless I'm doing larger scenes, so I like to keep an image open. I only start worrying about RAM when scenes are dropping out.

     

    You are mixing stuff up here. Some general observations:

    1) Off Camera has absolutley no impact (and shouldn't because the objects will still need to affect the light"flow"). I allways make everything invisibe that is out of camera and is not needed for light management (eg. walls, ceiling, mirrors, Meshlights).

    2) I have not seen any indicator that anything from a invisible object is loaded into VRAMN if rendered from scratch. I have not seen any invisible Texture that was loaded in the log file so far and reduction of Polygon count in the log file seems to be reduced by the right magnitude

    3) If you keep renders open (an probably the same for active IRAY Prview Viewports) and then change things from  visible to invisible im pretty sure they will still be kept in memory (since you need to be able to continue the open renders) until the sceen is reinstantiated (closing all renders, de-/reactivate Iray Preview, etc) Im not even sure if deleting something would free VRAM in this case. => Optimizing Render Startup time by keeping the sceen in GPU-Memory and optimize VRAM usage are non-compatible objectives.

    I'm pretty sure about this observations, but I'm allways happy to learn something new.

    Post edited by Renomista on
  • mjc1016mjc1016 Posts: 15,001
    Renomista said:
     

    3) If you keep renders open (an probably the same for active IRAY Prview Viewports) and then change things from  visible to invisible im pretty sure they will still be kept in memory (since you need to be able to continue the open renders) until the sceen is reinstantiated (closing all renders, de-/reactivate Iray Preview, etc) Im not even sure if deleting something would free VRAM in this case. => Optimizing Render Startup time by keeping the sceen in GPU-Memory and optimize VRAM usage are non-compatible objectives.

    Right...

    Something I noticed last night doing materials test renders (still setting up mats for something I need to upload at ShareCG), if you close the previous render window AFTER you've started a new render, but before it actually displays anything in the new one (you've go a couple of seconds, usually) you will get the speed boost of keeping it open but will drop the amount of memory that the render itself is holding on to, until the new one starts displaying pixels.  But that relies mostly on not making content loaded changes...colors, camera angles, light levels all won't trigger the 'compiling shaders' stage (which is where Iray is sending things off to your video card).  Changing image maps/tiling, content will...and will, unless you remove the old items (content...didn't check images), increase the memory used.

    But to actually get rid of something from the 'held' amount you do need to have it gone (as in deleted), possibly purged from the 'other' memory location (the undo stack...which uses system memory/cache space) and have Iray do the 'compiling shaders' step.  I've sat here with the Nvidia control panel open watching as I did these steps, and it's pretty interesting to see how much difference they make to the amount of memory used.

Sign In or Register to comment.