Ram usage

I have a very large scene with many proxy. I need to figure out what setting i can adjust to lower the ram usage. I expect this will cause the overall render time to go up but the render machines are swaping the ram to disk, they only have 8 GB and it looks like the scene can take up to as much as 14 GB of ram.

my tree build quality is low
max tree depth 80
min leaf size 0.0
face/level 2.0
dynamic memory limit 5000
default geometry auto

How many textures do you have? Since the geometry limit is set to 5000, V-Ray will try to keep it this way, but textures may take a lot of extra RAM. Using tiled mip-mapped OpenEXR textures may help to reduce that memory, as V-Ray will be able to load only the portions of the textures that are needed.

Best regards,
Vlado

How about render elements? If you have 15 render elements that are 4k in size for example, won’t that store in memory too? Or does Vray store render elements to disk first?

no render elements.. however there are a TON of textures… we got a fridge full of food. some of them 1K each maybe 40-50 textures just rough guess plus 2 HDRI in the scene plus some higher res brushed metal. HOwever not all camera and renders use the food but they are still in the scene the objects are hidden.. these renders do better but perhaps I should blow them out of the scene? does vray load textures for hidden objects?

but if my machines have 8GB of ram i should maybe set the dynamic memory limit to 8000 instead?

also something im not sure about we are using the LC method for secondary bounce. and the number of passes we have that set to 16 because some machine are 16 core however some are only 8 core so maybe we should set that to the lower machines? is there some auto method to detect cores for LC passes? possibly by running 16 passes on the 8 core machines we use extra ram?

my understanding is you set your LC passes to the machine on your farm that has the most cores.

Hey Bradon,

one trick you could try is saving the scene with only the outliner visible. After that close Maya and reopen the file. Now Maya should not use that much memory to show all the geometry etc.
Do not make a snapshot before you render!

This should save you some memory for rendering inside Maya.

To render the scene on the farm you could export the scene into a vrscene and render this directly. This also saves a lot of memory during rendering since you don´t need to open maya for it.

Hope this helps.

Paul

mostly interested in batch rendering ram usage not UI. did a few test and it looks like calculating the light cache is the most major ram intensive operation by far. on this scene it peaked at or slightly above 12 GB of ram! the light cache settings are as follows.
passes 8
subdives 2000
sample size .05
store direct light ON
world scale ON
adaptive sampling ON
filter type Fixed
prefilter On - 25
use LC for Glossy rays ON
depth 100
samples 10
filter size .5

I tried messing around to get a lower LC settings that were acceptable. anything lower produced flickering in the GI. sort of at a loss for what to do to lower the ram usage. some of my machines do have 12 GB of ram and can render this scene pretty quickly in fact (as low as 20 min or so) most of my machines only have 8 GB of ram and there is no option to upgrade cheeply. so anyone know how i can keep these LC settings but figure how to swap the ram faster. my solution for now is to just render with irradiance map only as the primary bounce and set the secondary to none. this does change the look slightly (makes it a bit darker).

thanks for the tips paul. I did try to use the VR scene and it looked like it maybe saved 1-2 GB or so of ram. so im still peaked at 10GB which the slower (8GB max) machines still cant render this.

also we watched the ram usage with our scene we have a fridge full of food so there is a lot of textures, however we turn the food off for a moment to do a test and the textures looked like they only contributed to about 500MB or ram so it was pretty marginal the difference.

just did another test with refractive caustics off and we use affect shadows ON in our clear materials. render overhead still peaks 12GB ram :frowning:

does anyone know if this sort of ram usage (12GB) is normal. trying to figrure out if we just need to suck it up and buy more ram for our render nodes or if i can optimize what im doing; past whats already been suggested. (seems to be the LC is the area we need optimization of ram) the scene without the LC renders with about 4G.

Are you precalculating the lc?

We always do ours at a lower resolution but higher quality.
Also unless your doing a 4k wide shot of the insides of a fridge, you probably dont need your maps that big.
Are you using displacement? That also uses a massive amount of memory.

NO displacement! not precalculating. we have a lot of problems with flickering in the LC so im assuming we need a high quality map. i never thought to try a lower res but higher settings right now my setting seem pretty darn high and we still can see some flicker, I think alot of it has to do with the material that we are using on one of our objects. lots of stuff to diagnose and test. right now im just trying to get a gauge on the ram usage, because right now none of my renderfarm can render this scene until I lower the ram overhead.

Isnt the whole point of precalculating the LC to remove flickering? High settings for that will use a crazy amount of ram.

yes precalculate can help because then we can use the frame blend option. what i seem to remember was that either way the LC took an insane amount of ram. with 500 subdiv was the same as 2000 subdiv. maybe my test was flawed i can check again but seemed like lowering the settings didnt lower the ram usage which seems odd. perhaps i did something wrong.

is there a good way for me to determine what the ram usagse is in vray. i didn’t seen any translation verbosity with max ram usage in the output for the render. currently what i do is open the task manager and hit render and watch the graph go up.

I take it you have lots of proxies in the scene? It’s pretty much always proxies, but with bucket based solutions vray can load the geometry in and out as needed - because the light cache works on a full frame it has to load them all in at the same time using far more ram.

Have you tried lowering the resolution for the LC phase, then loading that saved map for the high res image?

i do believe i did try to render at half res. was the same issue 12 GB ram

whoops ok yes so this was obviously incorrect. my bad, ran the test again just to make sure. when i only use 500 subdives on the LC the ram usage is around 6GB so roughly half. so obviously there might be issues with flickering still with using too low of subdivs. will try to look into the pre-filtering and other options. would be nice to know if there was a way i could trade cpu time for ram time in the LC though. my cpu sits idle while im swapping ram if i ned the subdivisons to be a higher level. im just assuming that at 500 and 6GB or ram i cant increase much before i bottleneck at 8GB. might be a bit low for what i need, ill try to blend see if that helps.

working on better tests.

here are some results.
http://www.paraportable.net/files/TimeMemTest\_1.txt
http://www.paraportable.net/files/TimeMemTest\_2.txt
http://www.paraportable.net/files/TimeMemTest\_3.txt
http://www.paraportable.net/files/TimeMemTest\_4.txt

an intersting thing to note is that the ram usage does go down when I lower the subdivs in the LC but also when I turn on world mode. compare test 1 to test 3. test 1 uses 12 GB of ram and test 3 uses only 6GB, only diference is is turned world mode OFF for test 3, however the frame time was over 4 times as long. but compare to test 4 where the sample size i increase to “1”, render time was back to the same. I havent compared the results yet for quality. I think we did need to use the world mode ON to reduce the flicker, but I want to get a handle on the ram usage first.

now i see that the sample size does have a very big impact on the ram usage and the amount of actual rays in the LC. I did a few more test if anyone wants to see the results.

http://www.paraportable.net/files/TimeMemTest\_5.txt
http://www.paraportable.net/files/TimeMemTest\_6.txt
http://www.paraportable.net/files/TimeMemTest\_7.txt
http://www.paraportable.net/files/TimeMemTest\_8.txt
http://www.paraportable.net/files/TimeMemTest\_9.txt
http://www.paraportable.net/files/TimeMemTest\_10.txt

would be nice if there was a way to calculate the max ram usage during a render frame. i guess there are windows utilites for that sort of thing.