Iray and RAM question
I am new to Iray. Have made less than a handful Iray-images, so I have tons to learn.
I am bit puzzled by the RAM usage when I rendered the attached image. It's just 750x1000 pixels, render quality 1, but it consumes 10GB of RAM! (On top of the 6GB used by Windows and Daz Studio, thereby using all of my 16 GB RAM).
The size of the image itself, when saved as PNG, is only 1,3 MB, so why is it a thousand times larger in the render window?
The memory usage doesn't diminish after the render is finished as long as I have the render window open. As soon as the image is saved I get my 10 GB back.
Just curious why it is like that.
And what would happen if I doubled the size and increased the render quality?
(I can of course try but if I am lucky I will get an answer before I make anything stupid).
Comments
Greetings,
Textures, meshes, and various levels of buffers all need to be kept in memory as much as possible while the render is going on. Textures can be VERY large. Meshes aren't usually an issue, until you start subdividing, and the numbers get big VERY quickly. (A 20,000 poly object subdivided 3 times has around 1.2 million poly's (if it's quads, I think; it's complicated...), with a whole bunch of floating point values for each poly that need to be kept track of. X, Y, Z, U, V, material id, and probably a bunch more I can't think of off the cuff...)
There's depth buffers, lighting buffers, texture buffers, and more that all need to be kept track of. Iray keeps many of these things in place while you're rendering, because it has features that let you extract individual channels from that. Those have to be a multiple of your scene-size, so they scale up with your scene size, I believe.
The reason it stays at that memory usage while the render window is open is because they added a feature to let you resume a render, after a few tweaks, and so it doesn't want to throw all that stuff out if it has to start again. (Now it's possible that they don't get rid of it quickly enough if the image is ACTUALLY done, but I'm not sure...maybe you can 'resume' an image that has reached one of its terminating conditions.)
Oddly enough doubling the image size has a marginal effect on the amount of memory used, mainly the allocated extra buffers for depth, lighting, materials, etc... It's not as much as I typically thought, because the real memory usage is usually the scene/texture data that's being kept so it can make Very Fast lookups.
I don't know what Iray uses the 'render quality' button for, so I don't know if it'll increase usage, but the odds are that it will.
-- Morgan
p.s. Nice image!
And empty RAM is wasted RAM...
Thx alot Cypherfox for taking the time to share your impressive knowledge. Great!
LOL! :-)