DAZ switching from GPU to CPU Rendering
OK, here is one that has me stumped.
High-end laptop. 8 GB Nvidia 980M card. Use it for iRay GPU rendering all the time. For like a year, or more, the DAZ options under rendering on this machin are 'GPU only'. I have never changed it from that on purpose. It always does GPU rendering. I leave a system monitor up while running renders, and during the render the GPU is operating at near 100% much of the time, CPU operates below 50%. This is standard for every scene I have done.
Until now.
I have this huge mega-scene. City. Police. Crowd. Villains. Superhero. Yes, I know, it is probably too much to ask. I added stuff bit by bit, posed it. grouped it so I could turn it on/off as needed. Then after getting everything in the scene, I zoomed in on a stop sign and hit the render button, with only the stop sign and some pavement visible... this was just to see where the sun angle was and potentially adjust it. Bang, DAZ crashes, out of memory.
OK, I figure the scene is a little big. I back it off by turning off some items. Same thing happens. Finally, I decide, let me turn off everything but one object, and see what happens. Render works fine. One by one I turn on the items in the scene tab, rendering again each time. Each time, it's fine. GPU rendering as normal. Same file... no changes other than shutting it down and opening it up again over several days.
Today, I turned on the last couple of items and I noticed, for some reason, DAZ is doing CPU rather than GPU rendering. The CPU is running maxed out, while the GPU is at 1% or even sometimes at 0%.
So my quesiton on this is... what the heck is going on here? Is it the case that if a scene is too big, say for the GPU RAM, that the CPU takes over and the GPU does nothing? Or is something else going on here? And if so, should I check the 'CPU and GPU' options so they can both work on it, or just let 'DAZ' decide?
(OK ultimately I need to make the scene smaller, I know that... but I still want to know why DAZ is switching from GPU to CPU.)
Comments
If the scene does not fit in the GPU memory it will default to CPU & the GPU will do nothing for that render, if it exceeds GPU RAM it will make no difference what options you have checked - It will be CPU only :(
Perhaps you can reduce the size of some of your texture maps as for the most part texture maps take up more memory than geometry
Well I already don't have large texture maps for most of it because 3/4 of it is older 4.9 content auto-converted to iRay mats... most of those texture maps are small relative to the newer high-res ones.
I guess I'm going to have to make sure to turn off anything not in the shot (it was items outside the camera view that finally did it to me) and do some compositing of scenes (i.e., multiple renders, then combine as layers in PS). I may try shooting the city areas under the same lighting regime and turning the images into flat backdrops to help conserve RAM.
Thanks for the explanation, though, I thought this might be happening since the last test, I loaded the scene, GPU rendered with say 20 items (not the real count) turned on in ths cene, then turned on #21, got CPU rendering, turned off #21, got GPU rendering again. So yeah, GRAM issue I guess.
I knew this scene was going to be trouble when I wrote it. *sigh*
Unless you have huge texture files, human figures are the big memory hogs in complex scenes. Did you use Lorenzo/Loretta Lorez for your crowd figures? And yes, it's best to hide anything that is not in-frame ... unless it will cast shadows into the frame.
No, I did not use the lo-Rez figures. But I will turn off anything not in the shot and hopefully that will hold me.
I need to stop having fights happen on city streets and then I won't need crowds. ;)
Hi Tottallou
If you or anyone can solve this anomaly it will be helpful
I have a scene around 43 mb which for some odd reason does not seem to want to use either both GPU's fom one camera or No GPU's from another. This is not the biggest scene I've rendered but this one has the aforementioned issue.
I have only 2 x 16x GPU slots - 1 x MSI 960 4Gb (Primary slot and MSI GTX 980 TI (Secondary slot) (Totalling 3,840 Cuda Cores)
In the advanced render settings I have the CPU 'Off' although from one camera the CPU is working at 100% regardles with GPPU's doing nothing. In the past many hera have stated that Daz Iray will only use the memory on one GPU....Not according to the various utility software I have!! Depending on the scene BOTH GPU memories are being used maybe more on one then the other but all the various Utilities agree with each other. Changing the 'Optimisation' from Speed to Memory or vice versa changes the amount of memory being used by the GPU's.
I read your posting that said :-
'If the scene does not fit in the GPU memory it will default to CPU & the GPU will do nothing for that render, if it exceeds GPU RAM it will make no difference what options you have checked'
Which is fine but setting the Optimisation to 'Speed' particulary shows the whilst a lot of both GPU memory is being used neither is at full capacity.
None of this makes any logical sense to me so if anyone can expalin it will be appreciated.
Hi @LeggyBlond,
The memory requirements for GPUs are separate, not combined. So if you have two GPUs and each has 4GB of memory, your threshold for GPU rendering is only 4GB (the max from each GPU) rather than 8GB (the total from both GPUs). DAZ's Iray engine is pretty good at figuring out whether to ignore out-of-frame objects, but that is at best a rough calculation. So you can save some memory and render time by hiding any objects (especially characters) that are out-of-frame.
The Instance Optimization only matters if your scene has instances: memory-saving copies of objects. For example, all of the grass and weeds in the scene below are instances of five original grass clumps (Bahia, Wild Rye, Clover, Crabgrass, Dandelions), scattered with UltraScatter. The streetlights are also instances of one original streetlight, positioned manually.
If your scene has instances, you can save memory by setting Instance Optimization to Memory, not Speed. It will slow rendering a bit, but if your scene uses too much memory for your GPU when instances are optimized by speed -- and if optimizing for memory gets your render onto your GPU -- then the extra speed of your GPU vs. your CPU will more than offset the very small amount of render speed you lose by optimizing for memory.
I hope this helps,
Crissie
I appreciate your information but maybe I have misunderstood the GPU Memory use but whatever way Both my GPU's memory gets used irrespective of whether they're trated seperastly or not. In combination with my various sytem hardware monitors, before I load Daz:-
Both GPU's show No Memory use
I load Daz and they then both show around 12.5 % Memory uses
While I write this, I've loaded a scen (around 2.7 Mb) and not Both GPU's show Memory uses at 41 % on one monitor utility and others show both at around 59Mb.
Although some of the monitors show the memory use in Mb which is actually quite low in relation to the capacity they all show both GPU's as having therir memories in use.
That still doesn't anser why the scene I asked about does not use the GPU's when rendering.
I do now at least understand the 'Instances' referance and how it relates to the Optimisation settings
The size of a scene on your hard drive and the size of a scene after textures are expanded and rendering on your GPU don't have a one to one relationship.
Here's the simple deal for multiple GPUs:
1. Both cards will be used IF the scene fits into the VRAM on EACH card (VRAM not shared).
2. IF both cards are being used, CUDA cores are additive (i.e. faster render than one card)
3. Iray will throttle the clock speed of the fastest card to "match" the clock speed of the slowest.
If you really want to know what your GPU is doing, GPU-Z is by far your best "monitor".
What you were told about Iray using the memory on only one GPU was wrong, it's always been wrong!
Instead, each GPU has to have a copy of the scene, since GPUs can not (currently) access each other's memory.
Is the viewport set to Iray preview? that will use some GPU.
Pre-render calculations are also done on the GPU. It's only after that initialisation that Iray knows the actual scene size, and can determine if it can keep using the GPU for rendering.
Unfortunately the size of the scene in main memory gives very little idea of the size of the scene after it's processed and ready to render. Different camera angles will have different give different processed scene sizes. Textures seem to take the most memory and rendering to large dimensions will add some more. It could all add up to inflate the scene size to more than either GPU can handle.