PDA

View Full Version : mentalray memory error maya 2009x64


gerrycg
01-09-2009, 11:06 PM
hi,
i waited a long time, before i decided to write this post and tried a lot to solve my problem. now it's time for the cgsociety! i hope somebody can help me out.

my problem:
i can render every frame of my animation (well, i didn't try EVERY frame of 700, since i then won't need to batch render) inside my render view without a problem. in every renderlayer i set up.
as soon as i try to batch render the scene, either through maya, or through the console, mental ray renders 1 frame. and after that, it scoops my ram full with some data, continuously, until windows cries. (the ram of mayabatch-prozess grows and grows).

rendering messages of mental ray in the renderlog at the point where it gets very slow:


first frame (fast calculation), imagine those lines for every object in the scene (about 500):

...
API 0.0 debug: begin object murmel1|loftedSurface3|loftedSurfaceShape3
API 0.0 debug: begin instance murmel1|loftedSurface3
Debg: (Mayatomr.Scene) : DAG path: murmel1|nurbsSphere3
Debg: (Mayatomr.Scene) : ... transform
Debg: (Mayatomr.Scene) : DAG path: murmel1|nurbsSphere3|nurbsSphereShape3
Debg: (Mayatomr.Scene) : ... nurbs surface
Prog: (Mayatomr.Scene) : DAG node: murmel1|nurbsSphere3
Debg: (Mayatomr.Scene) : shading group: initialShadingGroup
API 0.0 debug: begin object murmel1|nurbsSphere3|nurbsSphereShape3
API 0.0 debug: begin instance murmel1|nurbsSphere3
...

same part in second frame (slow calculation, a few seconds per object):
...
API 0.0 debug: begin instance murmel1|loftedSurface3
Debg: (Mayatomr.Scene) : DAG path: murmel1|nurbsSphere3
Debg: (Mayatomr.Scene) : ... transform
Debg: (Mayatomr.Scene) : DAG path: murmel1|nurbsSphere3|nurbsSphereShape3
Debg: (Mayatomr.Scene) : ... nurbs surface
Prog: (Mayatomr.Scene) : DAG node: murmel1|nurbsSphere3
Debg: (Mayatomr.Scene) : shading group: initialShadingGroup
API 0.0 debug: begin instance murmel1|nurbsSphere3
...

you see, the line "API 0.0 debug: begin object ........." is missing. any suggestions?



the first frame it runs through those steps (done for every object) in a very short time (maybe one second for all). the second frame it takes about 10 seconds for every single object! and fills the ram and virtual memory (together about 8gig, then... *crying*).


i'm rendering with:
maya 2009 unlimited x64
on a
windows xp pro sp2 x64
core 2 quad q9450 (2,6 ghz)
4 gig of ram
enough hard disk space

mental ray, regular bsp, raytracing with depth of 5, no fg, no gi.

if you now know the answere, you probably won't need to read on and just write it down. now, here comes a more detailed and more confusing description of the circumstances.


description of my scenes:

scene1:
simple geometry (room without furniture), just a few polygons, as passive rigid body. mip_rayswitch assigned with mip_mirrorball, mip_matteshadow, some blinn and some mia_material. no lights and no shadows, no fg. mr's ibl in the scene but not used. i think the reflections do the "lighting"?
about 400 nurbsspheres (with spheres and some simple geometry in it, like a marble, parented under the biggest sphere), all surrounding spheres are active rigid bodies with the sphere as stand-in, falling down into the room.
cached out the animation (one solver).
all in all about 2 million polygons.
render layers for marbles, reflection on the floor, alpha for marbles (white surface shader) and alpha for reflections.

mip_rayswitch_advanced used for layersetup. all manually.

renderlayers in detail:
i ordered everything by making groups. so i have room_grp marbles_grp etc. i added only the groupnode to the render layers.
the groups are also connected to displaylayers, which visibility is switched on. so no objects are connected directly to layers.


scene 2:
simple room with simple geometry (mainly cubes without subdivisions), all passive rigid bodies. mip_rayswitch_advanced assigned. a few hundred polys.

about 450 nurbs marbles as described above, animated and colliding with all room elements.
renderlayers as above.
shaders as above.




troubleshooting:

in my first scene i figured out, that it works if i delete all my render layers except for one (the one i wanted to render this time). rendered them one after another. not nice but not bad also.
in my second scene, a completely new scene, with the setup described above, the same problem occurred. but wasn't to resolve by deleting some render layers. deleting my marbles helped me out, but i obviously need them! i tried using the initial shading group for the marbles, didn't help. rendering with the software renderpal also didn't help. baking the animation didn't help.
because of a very long time to save the scene (about 4 minutes), i replaced the nurbsspheres with polygonspheres and combined alle polygon objects of one marble, didn't help with my rendering but helped to save faster with bigger scene size.
so now polys in scene 2!

then i tried it with the 32bit version of maya2009 under vista 32bit and i was able to render at least about 50 frames, until the memory error occurred. now it renders under winxp x64 with maya2009 32bit with 1,6gig ram used. IT RENDERS and i am a little bit happy. but: it takes about 2 minutes per frame (in vista, too). (in the render view in maya it takes about 20 seconds per frame.) and just 25% of my quadcore-power is used for the most of the time and there is a 2 second boost up to 100%, right before the frame is written into my output folder.

renderlog says:

winxp x64 with maya2009 32bit:

...

RC 0.2 progr: rendering finished
RC 0.2 info : wallclock 0:00:03.57 for rendering
RC 0.2 info : allocated 223 MB, max resident 240 MB
GAPM 0.2 info : triangle count (including retessellation) : 19048
PHEN 0.2 info : Reflection rays skipped by threshold: 195
PHEN 0.2 info : Refraction rays skipped by threshold: 26
*************************************
little less then 2 minutes inbetween. See below what happens with verbosity set to detailed
*************************************
SCEN 0.2 progr: begin scene preprocessing for frame 205
SCEN 0.2 info : 425 geometry leaf instances (0 scheduled, 425 cached, 0 shared)
SCEN 0.2 info : 0 light leaf instances
SCEN 0.2 info : wallclock 0:00:00.00 for scene preprocessing

...

writing correct file within e few seconds.


detailed verbosity gives me the part below, where it slows down. takes one second for about 10 objects. still to long! (2 minutes in the whole). first frame also takes 2 minutes.

...

Debg: (Mayatomr.Scene) : DAG path: rigidBody490
Debg: (Mayatomr.Scene) : DAG path: murmel80
Debg: (Mayatomr.Scene) : ... transform
Debg: (Mayatomr.Scene) : DAG path: murmel80Shape
Debg: (Mayatomr.Scene) : ... polygon mesh
Prog: (Mayatomr.Scene) : DAG node: murmel80:murmel80Shape
Debg: (Mayatomr.Scene) : shading group: mip_rs_murmelReflSG

"pause for a part of a second"

Debg: (Mayatomr.Scene) : DAG path: rigidBody491
Debg: (Mayatomr.Scene) : DAG path: murmel81
Debg: (Mayatomr.Scene) : ... transform
Debg: (Mayatomr.Scene) : DAG path: murmel81Shape
Debg: (Mayatomr.Scene) : ... polygon mesh
Prog: (Mayatomr.Scene) : DAG node: murmel81:murmel81Shape
Debg: (Mayatomr.Scene) : shading group: mip_rs_murmelReflSG

...and so on with every object.

those slowdowns just occur at the moment the marble-objects are rendered.

it has to be the fact, that the marbles are animated. can it?
or/and/because mayatomr has problems with it. converting it? transforming it?

you read it until here? thank you for doing that! and now spill the beans :)

if some information is missing, i will be able to post it. the scenefile or better the whole project weights a lot but i would be able to upload it, if necessary.

thank you and i hope, no one have had this problem before, because it really... makes windows cry. and me.
btw: deadline for this project is in ten days.

Omarios
01-11-2009, 04:26 PM
we are having the same problem here at our studio
the deadline for our project is in due 5 hours
we are trying to switch the scene back to maya 2008
any solutions are welcome

gerrycg
01-11-2009, 05:57 PM
that's bad...
are there any parallels between my scenes and yours? would be interesting to focus the problem. please tell me, if you are successful with maya 2008.
thx!

Spellbound
01-12-2009, 05:00 AM
Well, that is new feature in maya 2009. Broken batch render. Way to go Autodesk.

Ironhalo
01-12-2009, 06:58 PM
i have no clue as to the cause of the problem, but im really curious to try and fix it. ill have time over the next few days to look at the file if you're still able to upload it.

gerrycg
01-13-2009, 09:18 AM
ok cool, thank you for that. i try to upload it tonight (germany). in about 14 hours i think.

gerrycg
01-14-2009, 09:41 PM
i uploaded the scenes. (i sent the link to you, Ironhalo, via the messaging-system of this forum). if somebody else likes to look at it, please send me a message.
thx!

timur04
03-28-2009, 09:58 PM
i have the same problem with multiple projects! renders first frame then stalls. I found that if you delete all the render layers it will batch render. I dont know if thats the solution for all scenes, just what is working for me.

bigbossfr
03-29-2009, 12:42 AM
If your render each renderLayer separately, is it not working ?
With the renderflag -rl ?

lostparanoia
03-30-2009, 04:41 PM
We're having the same problem here. we do alot of mobile-phone commercials. as soon as we put a phone in a scene we're unable to batch render. This means that Maya 2009 is completely useless to us. We were hoping it would be fixed in the service pack, but no. Does Autodesk have anyone actually testing the software before they release it? Or are they just using the force? It took me less than 5 minutes to find the first bug.

gerrycg
03-30-2009, 06:42 PM
in the end, i replaced my polygon-marbles by particle instances. i had to redo the simulation of bouncing marbles and it didn't looked that great, but good enough.

funny workaround...
maybe create a particle and put your animated phone on it by instancing it to the particle. :)

it's sad to read, that the servicepack won't help... didn't check it.

good luck!

InfernalDarkness
03-30-2009, 08:50 PM
Does Autodesk have anyone actually testing the software before they release it? Or are they just using the force?

...that the answer is "No" to both, since if they were using the Force, Saidin/Saidar, or the True Power itself Maya would actually work magically and perfectly at all times.

It seems as though Autodesk/MayaStaff only test Maya on a limited set of hardware; seems like they use maybe two computers to test on, instead of a wide range of computers from varying hardware manufacturers and timeframes.

This seems to be even more true, knowing that Autodesk doesn't test on computers with standard graphics cards at all, which is why the Geforce and Radeon aren't on their "supported list". This shouldn't bother me since it's standard practice in the industry, but does anyone else feel like Nvidia and ATI create the market for their Quadros/FireGLs, perhaps by coercing or outright paying companies like Autodesk to NOT support their standard Geforce/Radeon card lineups?

Malfeasance.

mischi3d
04-02-2009, 08:46 AM
We have the same problem here in Munich. First frame renders, then the RAM gets full. We do not have any renderlayers in our scene, the scene rendered fine in 8.0, 8.5, 2008 but not in 2009. When we reimport into 2008, some lights are missing. That's really not the way to go. I hope, Autodesk fixes this problem and does not forget about us Maya-users! :sad:

Galakgorr
04-02-2009, 05:38 PM
i've run into the same problem... mental ray isn't dumping everything from memory that it should be dumping.

the quick fix, if you have a render farm, is to submit your scenes with a batch size of 1 so that the scene is reloaded after each frame. also, use the -rl flag so that you're only doing one layer at a time.

it's annoying that you have to spend that extra time opening the scene over and over again for each frame, but it's the only failsafe way i've come up with to fix this problem in a short timespan.

mischi3d
04-03-2009, 06:07 AM
that sounds like an idea, thanks a lot, but I still hope that Autodesk reads this forum and fixes that in the next update...

FrizzleFry0
04-06-2009, 02:48 PM
Sorry that I didn't really get a chance to read everything, but have you also tried using Large BSP or BSP2?

How much ram is in your computer? Have you tried setting your memory limit in the batch render options considerably lower than your ram?

For instance, if you have 8gb of ram for your 64bit machine, know that maybe 2 are taken up to the operating system and Maya, so that leaves you maybe 6gb. Set your memory limit to maybe 4 ro 5 so Mental Ray has some breathing room to attempt to purge things from memory. There is also a boot.ini file in Windows that controls how much ram can be used. I'm not sure if it differs with XP64 or Vista, but that may be something to check out.

Also, I would try working backwards and just start hiding and exporting things to find the issue.

Export out all the geometry and render. See if it works. Then turn on lights. See if it works. Reconnect the shaders. See if it works.

JayHoo
04-23-2009, 01:47 PM
Any new solutions to the "batch render problem"?

strange_quark
04-23-2009, 06:28 PM
maybe i can help. The only way to really get batch rendering with MR to behave is to first use some kind of render controller. you need to be able to render only 1 frame at a time (packet size of 1 frame). maya then closes, and then the next frame is requested to be rendered - so maya starts up again and renders that one frame. There are free render controllers out there that will take care of this.

if you have multiple render layers, then you can take your chances, it may or may not get through all your render layers. if it doesn't, then you'll have to submit them separately, with the -rl command line switch (someone mentioned this already).

although this soudns lke a pain in the ass, these tips will let you render nearly everything.

if you are STILL having issues then it becomes much much harder to fix it. But since you siad it renders fine thru the interface, i think that the above should solve your problems.

HOWOEVER, you can try to conserve memory further. in the command line you can try -ts 16 (this will make the render buckets small) and you can try -mem 400. This will cause MR to flush any flushable items in your scene out of memory more often. If you want to optimize your render, you would increase the number till it crashes again, and then come back. maybe you find it will render fine with -mem 1600 but not -mem 2000...

JayHoo
04-23-2009, 06:44 PM
We are using smegde here, so using "packet size 1" is atm the problem solver. Maybe I can test the memory flush thing.

JayHoo
04-24-2009, 08:44 AM
With -mem 400 I can simulated this problem. Increasing the value e.g. to 4000 does not help. The second frame of the package is translating very slow.

may99
04-25-2009, 04:44 AM
we had the same problem here ... but after updating to 2009 sp1a all gone... even the translation times seem to be shorter... but still need more testing to be sure.

hope this helps

Cheers

JayHoo
04-25-2009, 07:10 AM
we had the same problem here ... but after updating to 2009 sp1a all gone... even the translation times seem to be shorter... but still need more testing to be sure.

hope this helps

Cheers

Sounds interesting. can someone confirm this? I hope we can test this here too.

Does someone has a scene to share? So I can test it at home?

malibubob
04-27-2009, 03:00 AM
i just went through the same problem on a music video i was working on!

i thought it was just my scene

the work around we came up with was batch rendering though the render view. check out this script:

http://www.highend3d.com/maya/downloads/mel_scripts/rendering/misc/bc-BatchRenderView-4735.html

it worked, but it wasnt painless, it would still hang up every once in while.

hope this helps a little, but the better get this crap fixed!

strange_quark
04-27-2009, 05:39 PM
With -mem 400 I can simulated this problem. Increasing the value e.g. to 4000 does not help. The second frame of the package is translating very slow.

you missed my main point, you can only render 1 frame at a time. if THAT single frame doesn't even render, then you can try to adjust the -mem flag.

so in smedge, each rendering computer gets only 1 frame. once its done it quits out of maya. you just can't reliably render more than 1 frame at a time without forcing maya to shut down.

ruddiger52
04-27-2009, 07:42 PM
Are you using the Approximation node to do subdivisions in render? This has given me the issue where I get one frame from the first layer and that is it. Also if you have any mental ray lights hidden using display layers then mental ray will just error out.

JayHoo
04-28-2009, 09:55 AM
I tested a little bit with two scene who produced translation problems. With SP1a it seems that it is fixed.