PDA

View Full Version : Memory Leak? Rendering animation causes "not enough memory" error, stills render fine



nomeking
05-31-2008, 08:09 AM
Hi, I'm new here.

I'm experiencing a rather odd problem with Lightwave 9.3. I can render individual frames without issue, but when I try to render my entire sequence it makes it through the first 5 frames before stopping and displaying the 'not enough memory for object polygon data' message.

I'm on Windows XP 32bit, with 3gb ram and an 8gb page file, with the /3GB tag in my boot.ini file to allow applications full access to ram.

Watching the memory usage for lightwav.exe in Task Manager shows that Lightwave isn't freeing any memory after rendering each frame, and that that it takes an additional 300-400mb with each frame it renders, until the program passes 2.4gb memory usage, and then the render fails.

My scene has about 12 million polygons after subdivision. The only animated element is the camera, everything else is stationary. There is no deformation. I'm not using any plug-ins. Antialiasing is set to 6, with one pass photoreal motion blur, and noise reduction. Turning those options off doens't help. Lighting is very simple, no GI, no ray tracing. Resolution is 1280x720. Lowering the resolution or reducing the subdivion level will get me a few more frames, but it still doesn't release any memory between frames so I eventually get the same error.

The crazy thing is even after rendering stops it doesn't release any memory, so I have to restart the program before I can render again.

Seems like a memory leak, or is there something I'm overlooking?

Please help.

Thanks.

Surrealist.
05-31-2008, 08:33 AM
Hi, and welcome. :)

How much RAM does the LightWave render display say it is using when you are rendering?

I do know I have had a similar issue with Subpatches. When I am trying to render many polygons and if I for instance set the subdivision level to a point that I get the memory error, I cannot just go back and reset the level because I will get the message again.

So what I have to do is restart Lightwave and try the new setting. So there is some retention of RAM usage here for some reason.

I have a feeling this might be related. Also I have a feeling that there is more than meets the eye regarding the readout in the render display. I have a feeling that LW needs a certain about of headroom when rendering. I have no technical factual data to back that up other than my own experience pushing the level of the ram I have.

So my conclusion is you have used up your ram when LW fails to render the scene regardless of other readouts.

The only solution that has worked for me is to lessen need for RAM in the scene by making adjustments such as resolution or Subdivision level. And with this you can guess I have scenes I have just not been able to render as it would be pointless with those lesser quality adjustments.

So, is there a memory leak? I That may be what this is that I have been seeing. It may only show up in large scenes. I don't know. Try some tests on smaller scenes. If your scene is just too big you may just have to make it smaller or go 64 bit.

nomeking
05-31-2008, 10:51 AM
Thanks for the quick response.

Those were basically my thoughts as well. Reducing scene complexity is an option here, and it helps, but doesn't overcome the issue completely.

The scene consists of several objects rather than one large sub-d structure, so I can render it in three or four passes and composite them together later.

I tried deleting two thirds of the objects in the scene and rendering what was left - it got through 25 frames before it exceeded available memory and stopped.

By the way, lightwave is dramatically underreporting memory usage in the render status panel: it shows memory usage as only 63.5mb, which is absurd - according to the statistics panel the raw scene data pre-subdivision is 112mb.

The Windows Task Manager says Lightwave is consuming up to just above 2.5gb when the renderer fails.

Render Status also reports fewer polygons then are actually present - in the scene with 1/3 of the objects, it says total polygons are 399682, when the raw polygon count pre-subdivision is 185585, and everything is set to a minimum subdivision level of 2, so I think there should be at least 185585*4*4*2, or 5,938,720.

Anyway, rendering in 25 frame chunks is better than not rendering at all. I'll survive.

Surrealist.
05-31-2008, 11:12 AM
Yeah I have not taken the RAM readouts too seriously. But the Poly count should be accurate. Are you in CC or Subpatch? Your math is CC. ( Subpatch would be 2*2*2 as you probably know but just want to cover that to be sure) And if you are using CC, going to Subpatch if you can may very well solve your problem. I have had issues with CC crashing renders on large scenes so I just don't use it anymore. Not just because of the Subpatch level difference but because there is something in the calculation that LW seems not to do well with. Or has in past versions. I have not tested 9.3.1 yet.

nomeking
05-31-2008, 12:02 PM
Thanks again for your help.

Sorry, yeah, they are subpatch objects, so I guess then it should be 185585*2*2*2, or 1,484,680. I may have something askew in my APS settings, making it so I have fewer subdivisions than I thought.

Still, it doesn't make sense that I would be having memory issues if the 399,682 polygon count Lightwave is reporting is accurate. I've rendered animations with several million polygons before and not encountered this specific issue - I mean, in the past its been I could either render a scene or not, but if LW would render a single frame it would render the entire sequence without a hiccup.