View Full Version : "Out of memory while rendering" error?

08-13-2010, 08:39 AM
I was rendering a pretty simple scene with 1066575 polygons last night and it got about 3/4 of the way through and stopped with the error "Out of memory while rendering". I have 6GB on my Mac Pro running 9.6.1 (yes, it's beta but it seems to work much better than 9.6) and can render the frame it crashed at with an F9 with no problem. Does LW not clear it's cache files periodically? I'm also using HDInstance v2.1.0 to cut down on polys but maybe it's not cutting down enough.
I've been using LW since v4 but I'm still a bit of a noob since I don't use it extensively. What am I doing wrong? What can fix this? I'm on a tight deadline. Sucks to be me.:help:

One more thing, I'm using final gather radiosity and have "Cache" checked for it.

08-13-2010, 08:54 AM
Firstly, If you leave the image viewer open, then that will use up memory for the previous images - so close that down.

Secondly, 9.6 will be 32-bit, whilst 9.6.1 will be 64-bit. I wasn't sure if you were were using 9.6.1 and it crashed, or it's 9.6 that was crashing. 32-bit will reduce the amount of memory for the application to theoretically 4G, but there'll be some overhead.

Thirdly, I'd render to an image, rather than with F9, since you don't need the memory for viewing the image.

08-13-2010, 09:00 AM
I'm sorry, I was a little vague and confusing in my post (so many details involved). I'm rendering a sequence to PSD files (540 frames total) in 9.6.1 with the Image viewer closed but showing the current frame as it's being rendered (the progress screen).

Thanks for the ideas. Got any more?

08-13-2010, 09:02 AM
There's a way to limit the amount of memory that the render will do for each pass - once I see its name, I'll remember what it is, but unfortunately, I'm at work, and don't have LW to hand.

Something like "buffer memory". You may need to lower that.

08-13-2010, 09:34 AM
Turn off HD_Instance (and/or remove from scene), and try rendering sequence again.
If it won't crash, then you will have guilty part..

1 mln polygons is with regular geometry, before HD_Instance is instancing stuff, I guess?

08-16-2010, 12:37 AM
caching radiosity in my experience is not necessary a good thing when rendering image sequences : it tends to skyrockets render times (if "animation" is checked), and I'm not sure it does any good to memory as it loads radiosity informations in the cache.
I've never had memory problems due to polygons or HDI, even in pretty heavy scenes with crowds of animated characters, just simple crashes on Mac. HD-I is pretty effective for that.
If you use HDI, I guess you're in 9.6 or 9.6.1 in 32-bits, since HDI for mac is still 32-bits and crashes LW in 64-bits. And there, in LW for Mac, if your scene is to heavy, HDI just freezes the render, and you have to abort render or even sometimes to force quitting the application.

When I do run into memory shortages, I first check the amount of memory required by my images.
Then I decrease all resolutions that don't need to be too high.
For instance, a 3000*3000 require 25 Mb of memory, when a 4096*4096 will require 64 Mb, no matter the actual size of the picture. If you have lots of heavy textures, there could be the origin of your problem. I've noticed that if the amount of memory needed for textures in image viewer is over 1 Gb, renders tends to crash or send a "out of memory while rendering" at some point.

This said, if HD-I is the cause of the "out of memory", another thing you may consider is to render your scene with only "render shadows" checked in HDI (then instances won't render), and render another pass with only the instances and nothing else, and then compose them later.

@Sensei : yes, the amount of polys counted by lightwave is before HD-instance starts to instance. AFAIK, there's no way to count how many billion polygons HD-I is instancing, except by counting how many polys there are in an object and multiply this number with the number of instances, provided you know the exact number of instances...

08-16-2010, 10:07 AM
Since I was rendering to PSD's I was able to just start again from the point that the render crashed and continue on. I tried multiple times to render the same scene, just for testing, and it always seemed to get to about the same place and then throw that error. The only thing I can think that's causing it is, I believe, a volumetric cloud appears in the frame so LW has to start calculating for that at that frame. Weird problem, no idea why though.

I'm hoping HDI goes 64bit soon because it's a pain having to work in 32bit just to use one plug-in. Unfortunately, from what I've heard, Graham doesn't publish that there's an update so you have to continually go back and check. Sucks to be me!