PDA

View Full Version : Mental Ray running out of memory for 2nd render.


caro
11-08-2009, 12:54 AM
Hey everyone,

Mental ray keeps running out of memory every time I want to render one scene for second time after loading Maya. It's a bit odd as the scene doesn't really seem to be balancing on the edge of memory limit, it can handle huge resolution for the first render after loading Maya but can't handle second render even if I bring the picture resolution to something very low. Need to restart Maya and then it's fine for one render again. It's like it wasn't flushing memory or something like that. It crashes right at the beginning when loading textures. Any ideas for help would be very appreciated!

Thanks,
Karol

TaKIKO
11-08-2009, 05:05 AM
Could you post some info on what your rendering and some render settings. Maybe a render log too.

InfernalDarkness
11-08-2009, 06:14 PM
Also, some system specs might help us help you. 64-bit? Maya 2010?

What happens if you try to Batch Render from inside Maya? Does MayaBatch.exe also run out of memory?

ruddiger52
11-09-2009, 08:07 PM
try going to the batch render options and setting a memory limit of 2000 if your computer has a lot of memory.

vicmarines
11-09-2009, 10:43 PM
Caro:

I usually had that issue related to MR out of memory, what I did after investigation is the next:

first depend on the total memory RAM u have installed, try to limit the memory MAYA use for rendering.
if u are rendering a still from the Render view window, go to render menu and from there go to the option box and change the setting from AUTO to anhoter specific value: if u have let say 2Gigs set MAYA to use just 1GIG

if u are rendering using batch rendering also from there limit the memory.

also u can try the next tips to go deeper for a solution maybe working with the BSP manage
and settings

http://forums.cgsociety.org/showthread.php?f=87&t=817235

caro
11-10-2009, 02:39 AM
Thank you all very very much for your help, I really appreciate it. The scene that gives me hard time is not optimized at all and, has about 1.5 million of polygons, quite a few of high res textures etc. Ii would be totally understandable for me if it was running out of memory for first render and then I'd try to save memory here and there but the first render (I use Render View) always comes through with no trouble at all. It can be 1920x1080, I can have Firefox, Outlook and Photoshop with tons of textures opened in a background and there are no problems. However, right after the first render is done I can click "render" icon one more time and it runs out of memory on exact same scene that has just rendered fine. Even if I set the resolution to 320x200 or something equaly low.

MentalRay's logs don't tell me much unfortunatelly. I didn't want to post 10 km long log :) so I tried to dig out of it what seemed useful from the ---first render--- (the succesful one):


MEM 0.0 info : heap size limit set to 2298 MB
SCEN 0.3 info : allocated 103 MB, max resident 103 MB

RCI 0.3 info : using BSP for eye rays
RCI 0.3 info : using BSP for secondary rays
RCI 0.3 progr: building initial extent bsp-tree
RCI 0.3 info : leaves without shadow : 0
RCI 0.3 info : leaves with only shadow : 0
RCI 0.3 info : leaves with both : 417

RCI 0.3 info : allocated 103 MB, max resident 103 MB

RCFG 0.3 info : allocated 427 MB, max resident 587 MB
RCI 0.3 info : main bsp tree statistics:
RCI 0.3 info : max depth : 40
RCI 0.3 info : max leaf size : 156
RCI 0.3 info : average depth : 31
RCI 0.3 info : average leaf size : 7
RCI 0.3 info : leafnodes : 1011611
RCI 0.3 info : bsp size (Kb) : 49951
PHEN 0.3 progr: calling output shaders
RC 0.3 info : allocated 376 MB, max resident 587 MB



---and teh second one, the one that crashes MR---

SCEN 0.3 info : allocated 114 MB, max resident 587 MB
RCI 0.3 info : allocated 114 MB, max resident 587 MB

IMG 0.5 progr: opening texture C:/Users/Karol/Documents/My Dropbox/Overpass/images/textures/Motorway_dis.tif, for reading
MEM 0.5 info : allocation of 134350344 bytes failed: flushing
MEM 0.5 info : try '-memory 150' for future runs
MEM 0.5 progr: scene cache flushed 5 MB in 0.00s, now: 261 MB
IMG 0.4 progr: opening texture C:/Users/Karol/Documents/My Dropbox/Overpass/images/textures/ConcreteBlock_05disp.BMP, for reading
MEM 0.1 progr: scene cache flushed asynchronously 29 MB for module JOB, now: 129 MB
MEM 0.5 info : allocation of 134350344 bytes failed: flushing

IMG 0.3 progr: opening texture C:/Users/Karol/Documents/My Dropbox/Overpass/images/textures/ConcreteBlock_05disp.BMP, for reading
MEM 0.5 info : allocation of 134350344 bytes failed: flushing

IMG 0.7 progr: opening texture C:/Users/Karol/Documents/My Dropbox/Overpass/images/textures/ConcreteBlock_02disp.BMP, for reading
MEM 0.5 info : allocation of 134350344 bytes failed: flushing

MEM 0.5 info : ================ memory error post-mortem ================
MEM 0.5 info : -------- memory summary --------
MEM 0.5 info : module max MB curr MB %bytes
MEM 0.5 info : MSG 7 7 22.70
MEM 0.5 info : MEM 87 0 2.88
MEM 0.5 info : DB 96 1 3.16
MEM 0.5 info : PHEN 56 0 2.01
MEM 0.5 info : RC 32 0 0.39
MEM 0.5 info : GAPMI 59 1 5.22
MEM 0.5 info : IMG 263 0 0.12
MEM 0.5 info : JOB 1 0 2.31
MEM 0.5 info : GEOMI 1069 5 15.63
MEM 0.5 info : LIB 12 0 1.91
MEM 0.5 info : RCI 74 6 20.62
MEM 0.5 info : GAPDI 28 0 0.14
MEM 0.5 info : GAPPO 39 0 0.00
MEM 0.5 info : GEOCO 5 0 0.00
MEM 0.5 info : RCFG 22 0 1.76
MEM 0.5 info : DBN 28 5 17.64
MEM 0.5 info : RMSL 1 1 3.11
MEM 0.5 info : other 6 0.41
MEM 0.5 info :
MEM 0.5 info : total 32 100.00
MEM 0.5 info :
MEM 0.5 info : max heap memory approx. 587 MB, now approx. 138 MB
MEM 0.5 info : -------- database summary --------
DB 0.5 info : database elements by module:
DB 0.5 info : jobs MB #jobs MB #nonjobs module
DB 0.5 info : 19 438 0 0 GAPMI
DB 0.5 info : 0 0 90 3761 API
DB 0.5 info :
DB 0.5 info : database elements by type:
DB 0.5 info : jobs MB #jobs MB #nonjobs type
DB 0.5 info : 19 21 89 417 40 nbox
DB 0.5 info : 0 1285 1 5114 other
DB 0.5 info :
DB 0.5 info : 19 1306 90 5531 total
MEM 0.5 info : run with '-message mem debug --' for more info.
MEM 0.5 info : please try lower -memory settings.
mental ray: out of memory
MEM 0.5 info : allocation of 134350344 bytes failed: flushing
IMG 0.3 progr: opening texture C:/Users/Karol/Documents/My Dropbox/Overpass/images/textures/ConcreteBlock_05disp.BMP, for reading
mental ray: out of memory
MEM 0.5 info : allocation of 134350344 bytes failed: flushing
mental ray: out of memory
MEM 0.5 info : allocation of 134350344 bytes failed: flushing
mental ray: out of memory
MEM 0.5 info : allocation of 134350344 bytes failed: flushing
mental ray: out of memory
MEM 0.5 info : allocation of 134350344 bytes failed: flushing
mental ray: out of memory
MEM 0.5 fatal 031008: can't allocate 134350344 bytes.
MEM 0.5 fatal 031008: can't allocate 134350344 bytes.

// Error: *Fatal* (mental ray) : mental ray encountered a fatal error. The system may have become unstable. Please save the scene and exit Maya. //



I use Vista 32bit, 4GB of ram, Maya 2010. I limit my memory for MR to about 2 GB.

tostao_wayne
11-10-2009, 07:32 AM
I use Vista 32bit, 4GB of ram, Maya 2010. I limit my memory for MR to about 2 GB.


if you are ussing vista 32 bit you don't have 4GB Ram, you will have only 3,2 GB Ram, the 32bit OS can't handle more than 3,2 GB. check if you can update to windows 7 64bits.


Don't use the render view to render if you have problem with it, do a batch render, this error is very common in 32 bit sistem when you are in the limmit of your memory.

ruddiger52
11-10-2009, 05:23 PM
Agreed,

Try a commandline render if it works then your good if not then you need 64bit. Plus maya leaks memory like crazy. Meaning the more you use it the more memory it uses. Launch your task manager and watch the memory usage for maya. Compare it to before your first render and after. Bottom line is your running out of memory, it doesn't matter that it makes it through 1 frame.

caro
11-10-2009, 06:41 PM
Thanks guys, I'll try all the suggestion and also clean up the scene as there is at least half of it to delete :). And I guess it's time to get 64bit soonish.

Thanks!

juanjobernabeu
11-11-2009, 07:00 AM
I think these problems are in render view mode and Mental Ray because I have too.

My machine is a mac Pro-Dual Quad Core with 16gb and in render view mode crash in a scene with 500k polys but in batch render mode works fine.

Eshta
11-11-2009, 05:42 PM
you might want to watch this
http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=14075966&linkID=9242258

vicmarines
11-12-2009, 12:03 AM
Caro:

just for u consider a seriuous change to WXP 64 or windows7, in the past I had to do it
since having recognized only 3 GIGS by the OS is frustrating

I run smoothly MAYA in a 16GIGS MOBO with AMD Phenom quad-core asigning 10GIGS to MAYA render

CGTalk Moderation
11-12-2009, 12:03 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.