Scene Loading

ebergerlyebergerly Posts: 3,255
edited November 2017 in Daz Studio Discussion

For a while I've been trying to understand the process that D|S uses to load scenes. And I'm stumped. Does anyone understand it?

For example, I have a scene with 4 x G3's in a building. The DUF file is only 9 MB (not gigabytes, megabytes) on the drive. So presumably it only holds references to all of the textures and other content that resides in my runtime. And I also assume that external content on the disk is gigabytes in size. 

So what happens is this:

  1. I have Studio set to Texture Shaded mode, not Iray. I double click on the scene, and it loads the scene, but there is zero disk activity. Instead, only an increase in CPU usage and increase in system RAM usage, from 500MB up to about 4.7GB. 
  2. When the scene is loaded it shows the texture shaded view, and shows in the Properties (or whatever that panel is called) that all the content is loaded into memory.
  3. If I change the viewport to Iray, suddenly there's disk activity, and system RAM increases over time to about 23GB, which means that the system RAM usage was about 18GB greater than in Texture mode.
  4. Once the scene is loaded into RAM, it gets transferred to my GPU, and GPU RAM increases to about 8GB. Which means what was in system RAM got compressed from 18GB to 8GB when going to the GPU.

Now in trying to understand this I'm guessing the following:

  • When in texture shaded mode there's no need to load all the textures from disk since they won't be shown. So somehow that 9MB DUF file is enough to provide all the data needed to load the scene enough for Texture shaded mode. And 9MB probably loads almost instantly from disk. And somehow that 9MB of DUF file becomes 4.7GB of system RAM, but without reading any content from the disk (which I still don't understand).  
  • However, when Iray view is required to display the details of the textures and lighting, all of the content must be read from disk and brought into system RAM. And that's why system RAM usage goes from 4.7GB to 23GB.   
  • In Iray view mode, once the entire scene content is brought into system RAM, the CPU figures what is needed to send to the GPU to calculate the viewport image, and compresses textures and so on down to 8GB, and transfers that to the GPU. And then iray viewport rendering starts.  

 Does anyone know if this is close to what's going on, and if not, how does it work?

Thanks. 

Post edited by ebergerly on

Comments

  • When you load a scene theer certainly should be disc activity - the scene itself has to be read in, then the asset files (which may trigger other calls to disc as the details of morphs, uvs and so on are read, though for previously loaded items there is a DSON cache to reduce the number  of separate files read) as do the texture files for preview (unless they happen to already be in memory). When you render the geometry may well need to be divided (the display uses the Subdivision setting for a SubD item, Iray users render subdivision which is usually higher and may divide further for surface settings) and the textures will need to be loaded and compressed (according to the settings in the Advanced tab of Render Settings).

  • ebergerlyebergerly Posts: 3,255

    Thanks Richard. Yeah, you're right. I re-started my computer from scratch, then re-loaded, and as you said I get lots of disk activity on loading even with viewport set to Texture Shaded. I think the issue is/was having an existing cache in memory that is holding the content, and therefore not requiring any disk activity. 

    I'm still not clear on why the difference in system RAM usage with Texture Shaded vs. Iray viewport. If the scene is fully loaded in Texture shaded mode, why when I suddenly select Iray does the RAM requirement triple to about 24GB? And that's prior to the GPU doing any calculations to render the iray viewport. It's just getting ready....

  • OpenGL != Iray; in texture count, size, or quality. Delayed resource usage is by design; don't use what you don't need until you need it.

Sign In or Register to comment.