Jump to content

mental ray fatal error 3.0 MEM


sardesign
 Share

Recommended Posts

Anyone experience an upper end to the capabilities of mental ray [with 3d studio max 2009] in regards to memory? I'm running 4 gigs of DDR RAM on my 32-bit XP machine. The processor is somewhat older [P4 3.4 EE HT] but performs better than some of my more recent computer builds.

 

I keep getting memory errors so I have to keep "dumbing" down the scenes and cutting back on faces. Are there any work arounds as I have tried the conversation memory options on the render pull down menus but to no avail. Any help would be great.

 

BTW: the scene I'm trying to render has about 955,000 faces with a daylight system [mr sun + mr daylight] and raytracing shadows.

Link to comment
Share on other sites

depending on the FG and photon settings, shader settings, and a whole bunch of other settings it is very easy to run out of memory with a 32bit system. Regardless of having 4gig of ram 32bitXp can only see and use 2gig unless you usethe 3gig switch. So unless you want to upgrade to 64bit OS manage you memory carefully.

 

here are some suggestions

 

Use XRef's

calcultae FG and Photons at a smaller image resolution, freeze and rerender at full res

Use proxies

Try BSB2 if you have alot of instances and proxies

turn off scanline

reduce the bucket size

use "placeholder" objects

limit the use of Glossie refections where possible and use Fast interpolate

drop the max refection level to as low as possible (2 in most cases)

Turn off viewport textures and shadows

Render through backburner

turn off the frame buffer

Keep the model efficient

Use Photons and low FG settings, High FG settings use alot of memory

 

there are many others.

 

jhv

Link to comment
Share on other sites

here are some suggestions

 

Use XRef's

calcultae FG and Photons at a smaller image resolution, freeze and rerender at full res

Use proxies

Try BSB2 if you have alot of instances and proxies

turn off scanline

reduce the bucket size

use "placeholder" objects

limit the use of Glossie refections where possible and use Fast interpolate

drop the max refection level to as low as possible (2 in most cases)

Turn off viewport textures and shadows

Render through backburner

turn off the frame buffer

Keep the model efficient

Use Photons and low FG settings, High FG settings use alot of memory

jhv

 

 

thanks for the reply:

 

what's a 3 gig switch? the operating system seems to use 3 gigs and recognizes 3.25 gigs [xp]

 

i use Xrefs

how do you "freeze" FG at a smaller resolution [this wouldn't help anyway since it's purely the geometry that causes mental ray to bite the dust]

proxies? in reference to what?

i use BSP2

i will turn off scanline

bucket size is already small

i use placeholder objects

i will try to limit reflections

viewport textures + shadows is off

model is as efficient as possible [done in CAD and linked into MAX]

 

i want to use decent settings so the image looks good. i normally run 200 FG with a 1.0 density and 30 interpolate max

 

anytime mental ray crashes, i just remove stuff from the model and resave until i can render without crashes. it never seems to be a resolution issue, just a geometry... doesn't quite make sense since the higher resolution would use up more memory.

 

any possibility that the CPU speed may be causing issues [i.e. not calculating things fast enough to free up memory]?

Link to comment
Share on other sites

xp32 may see the ram but will only use 2gig, do a search for the 3gig switch, its a bit beyond my experties and I dont want to blow up your machine

 

FG Freeze. Basically set the image resolution to a lower resolution, calculate the FG, saving it to file. Freeze the FG and reset the image res. The FG will be loaded from memory when rendering. This methode saves time and memory. Although if the FG is too high it may still run out and crash:(

 

Max2009 mentalray now has proxies, as with Vray proxies the geometry is only loaded and then unloaded as a bucket hits it. Essential for high poly scenes/ objects such as trees.

 

By the sounds of thing there could also be geometry problems. Does it still crash with really simple scenes?

 

I have very successfully rendered 3/4 million poly scenes with full FG GI and animations on very basic machines so 900000 pollies is fairly standard.

 

jhv

Link to comment
Share on other sites

xp32 may see the ram but will only use 2gig, do a search for the 3gig switch, its a bit beyond my experties and I dont want to blow up your machine

 

FG Freeze. Basically set the image resolution to a lower resolution, calculate the FG, saving it to file. Freeze the FG and reset the image res. The FG will be loaded from memory when rendering. This methode saves time and memory. Although if the FG is too high it may still run out and crash:(

 

Max2009 mentalray now has proxies, as with Vray proxies the geometry is only loaded and then unloaded as a bucket hits it. Essential for high poly scenes/ objects such as trees.

 

By the sounds of thing there could also be geometry problems. Does it still crash with really simple scenes?

 

I have very successfully rendered 3/4 million poly scenes with full FG GI and animations on very basic machines so 900000 pollies is fairly standard.

 

jhv

 

excellent information

 

max does not crash in simple scenes... i pretty good on checking and rechecking my geometry in CAD to weed out inconsistencies and possible errors so it's usually not a worry of mine.

 

i've got my other machine up finally so both computers together seem to be spitting out the most recent scene with no problem.

 

i'll look into proxies after this is done and see how to start implementing it.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Justin,

 

Excellent tips, I am also having these memory issues (still on 32-bit Max2009, scene is about 1M poly's)

 

I am currently modelling a 42km length of roadway (boring I know :)), and I thought I would finally bite the bullet and switch to using mr as the renderer. I have split the model into 8 regions, all xrefed into a master scene. I can test render each region without any problems, however when I combine them into the master model, thats when things start going a little pear-shaped. I think its the trees that are pushing it over the limit (using ForestPro 3)

 

Could you elaborate on the freezing FG solution. From my understanding, you lower your FG Precision settings (to draft) and the Image Precision (antialiasing) settings to 1/64-1/4 and render out your FG only for later use (to remove flickering - I've already tested that).

Can you render out the FG map at a lower output resolution (say 640x360) and reuse with a final render resolution of 1024x576, and not lose any quality?

 

I'm still wrapping my head around the intricacies of mr as a production rendering engine.

 

Thanks in advance

 

AM

Link to comment
Share on other sites

Could you elaborate on the freezing FG solution. From my understanding, you lower your FG Precision settings (to draft) and the Image Precision (antialiasing) settings to 1/64-1/4 and render out your FG only for later use (to remove flickering - I've already tested that).

Can you render out the FG map at a lower output resolution (say 640x360) and reuse with a final render resolution of 1024x576, and not lose any quality?

AM

 

Under the rendering setup menu, there is an option to calculate FG and save to a file. If you set your FG at the level you want and keep the resolution low, it will save the information to the file and hopefully not crash as it's not trying to calculate and draw a higher resolution image. You can freeze the FG file [an option with a lock icon] so that mental ray does not attempt to do any more FG calculations. The help menu in 3ds max has an explanation of this

Link to comment
Share on other sites

yes ,except for lower the FG quality settings, keep those as you would have them for the full res. Its only the image size and sampling that gets lowered. 1/64,1/64 is great. generally I don't go any smaller than half the full res, so what your suggesting will be just fine.

 

To make this process easier in Max2009 there is now an option to just calculate the FG without rendering the image. Its the button right under the file path where the FGM will be saved.

 

This is the same for photons.

 

Be aware that its not recomended to do this through backburner.

 

For the trees, make them "invisible" to FG by selecting them ->object properties -> Mentalray -> click "Pass through" for the FG settings, but keep "Recieve illumination from Fianl Gather". This will cause the FG samples to ignore bouncing samples off the trees but they will still light them up.

 

jhv

Link to comment
Share on other sites

Justin,

 

Thanks for the tip - I hadn't thought of the 'invisible to FG' option.

Unfortunately, this does not appear to fix the issue - I am still getting the dreaded 'MEM 0.6 fatal 031008: can't allocate 31457280 bytes' error.

 

Not looking too good at the moment - may have to head back to scanline!!

 

AM

Link to comment
Share on other sites

No problems.

 

In addition to the render settings, I have setup a camera clip plane to 6000m, and animated all the terrain and forest objects visibility tracks to disappear when not in camera view. I am also using mr Proxy objects for the vehicles and street lighting

 

At the moment, the settings are pretty much set to 'Draft'.

 

AM

Link to comment
Share on other sites

camera clip has caused me issues in the past, does it still crash with it off?

 

How are you animating the visibility of the trees?

 

Have you tried Photons and 0 bounce fg? multiple bounce fg can use alot of memory and time

 

Try turning "placeholder" off, there could be confusion with the bsb2, which creates and clears the bsbtree on the fly and the loading and unloading of placholder objects. (just a thought)

Link to comment
Share on other sites

Travis,

 

Nope, I wouldn't dream of using displacement on this project. Can you disable displacement globally?

 

Justin,

 

The tree visibility is animated using the visibility track (the trees and terrain instance the same visibility track). I have also excluded the trees from FG.

 

I've never tried using photons on such a large outdoor scene, won't there be a lot of wasted photons that do not enter the frame?

 

I've turned off camera clipping and it appears to have worked.

I have xrefed 3 sections of the project (approx 320000 poly's), gone back to standard BSP raytracing (size 10, depth 40)

 

I have also booted up this morning with the 3GB memory switch enabled.

 

 

AM

Link to comment
Share on other sites

Visability tracks dont work with mentalray so in effect you are not gaining anything by using them

 

 

You can focus the area where the photons will shoot with the "photon target" in the mrsun settings. The radius should fit just outside your scene. No photons will be shot "outside" this area.

 

Photons are cheaper and quicker than final gather. Also the FG is just cleaning up/ smoothing out the photon solution so these can be realy (rediculously low) and leave it to 0 bounce as any surplus bounces are disregarded at render time.

 

 

jhv

Link to comment
Share on other sites

Thanks Justin,

 

I'll try out the photon method.

 

Just as a side note - I've gone through all the design models and turned off shadow casting for a lot of the roadworks/earthworks elements, and removed all the bridge barriers/fences from the fg solution

 

Seems to be running OK at the moment.

 

Thanks again

 

AM

Link to comment
Share on other sites

Justin,

 

Thanks for the tip - I hadn't thought of the 'invisible to FG' option.

Unfortunately, this does not appear to fix the issue - I am still getting the dreaded 'MEM 0.6 fatal 031008: can't allocate 31457280 bytes' error.

 

Not looking too good at the moment - may have to head back to scanline!!

 

AM

 

iF you got 4 gigs of ram and are running xp32 you need to get the 3gb switch. IT wont crash your system. windows xp32 wont let any program enable more than 2 gigs of ram, once it reaches that much memory the OS will shut it down instantly. if your still getting memory allocation errors of about 3.14 gigs of memory, and you have 4 gigs available that tells me your machince wont let max enable more than 2 gigs of ram. THE switch is your answer till can upgrade to a 64bit OS.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...