PDA

View Full Version : random fatal errors in mental ray for maya...


surreal-reality
12-18-2012, 01:00 AM
Hello folks,

I'm having pretty serious render issues at work and hopefully one of you may have run into this before and know whats up! It's plagued me at work for a couple months, seemingly increasing in frequency too.

Our scenes consist of really high poly environments, natural stone, wood, all of it sculpted and decimated in zbrush. We don't really optimize mesh density past a point since we use them modular wise in different situations.. so they're pretty dense. Some scenes have foliage, but this issue has come up in scenes with none, so I think this is a non issue.

As far as shaders go, we use almost exclusively procedural shader networks (node counts range from 5-35 depending on complexity). We do use file textures here and there, mostly for leaves and organic stuff, but again, this issue has happened on scenes with no file textures as well.

Also, we use mia_x 100% of the time. lately, I've been doing mia_x passes. More on this in a sec

typical scene info:
tri's: 10-36,000,000 (20-36 million)
-x 2112
-y 1188
adaptive sampling:2/0
contrast ratio: .08
filtering:mitchell
render as layered exr
32 bit rgba output
render passes:diffuse, specular, reflective, refractive, indirect, shadow, depth

Here's my issue:
When I render, (and this seems to only happen when I have render passes associated with the beauty render layer) mental ray gets through the final gather just fine.

however, as soon as it finishes, and moves onto actually rendering the image, it makes it a random percentage of the way through, and just quits. output from the window just tells me there was a fatal error, and it is attempting to save, and then..... the render just keeps on going until it reaches 99.9% and it never actually saves the render.

funny thing is, I can turn down the adaptive sampling to 1/-1, and it sometimes makes it through the render. or it crashes, closer towards the end... This is my problem, pretty much. I need to output passes, but I've no idea what to do.



Things I've tried to no avail:

plenty o ram, usually only reach 7-9 out of my 24, and I'm running maya 2013 x64 on windows 7 x64

no file textures are over 1024, they are all sourced correctly and working. targas, tiffs, png's, etc.

checking "allocate on heap" in options tab in render settings. (seems like this might get it further, but hard to tell.)

I've tried the "divide and conquer" route. one half of objects renders and finishes fine. the other half finishes fine too. both combined.... not so much.



I suspect, that somehow, something, is overflowing data wise, but thats as far as my suspicions go.

I would be ETERNALLY GRATEFUL if anyone has any ideas to try, or even knows exactly whats going on.

Thanks for tuning in to my rant!

surreal-reality
12-18-2012, 02:10 AM
Update:

using a miax_passes with some basic glossy reflections and nothing else applied as an overide, the render finishes in 59 minutes. all render passes enabled.

Seems to definitely be related to shading.

surreal-reality
12-18-2012, 01:52 PM
Update #2 found a geometry duplicate that was sitting directly over top another. Deleted that, and now I'm baking out .mi's and making mib proxies for logical groups of objects and trying to lighten up the load with out cutting back on quality or scene content!

I'll keep updates and (fingers crossed) successful bits of info coming when I have them

Bitter
12-20-2012, 05:46 AM
Just for fun, in the string options add the string:

name: finalgather legacy
value: on
type: boolean

Then try again with the regular scene.

surreal-reality
12-25-2012, 04:32 AM
Thanks for the idea, works out for me until the new year. I'll try that out and report back!

I should reiterate though that the crash happens with and with out final gather even enabled. Does enabling legacy change anything else you know of?

Thanks again!

Bitter
12-25-2012, 04:44 AM
Oops, then that won't help.

surreal-reality
01-03-2013, 02:05 PM
Ok, so I was't totally happy with my eventual fix, but it did get the job done and that was the bottom line.

Two things seemed to help...

1)Turning off / disabling all my passes and rendering a straight beauty...
2)Smaller bucket / task sizes in maya which slowed down the render a bit, but it worked.

Option 2 ended up not being an option for me sadly, because this needed to render with the rendercore farm service, and their command line stuffs doesn't currently support the command line bucket size flag, however there is one that works beautifully if you're batching yourself.

Option 1 was the least desirable as it limited compositing, but it did end up working.

Still on the hunt for the answer to this problem, so if I figure anything else out I will post here.

surreal-reality
03-12-2013, 03:20 PM
I return with more updates, for those of you who are, or may eventually be curious.
I think I have with 99% certainty nailed the root cause of this freak crashing and fatal error'ing in maya at render time.

Yesterday, I was troubleshooting yet another scene at work with the same prob, and lucked out with the speed of the crash, making it a bit faster and less time consuming to test different ideas.

Our scenes consist of dense geo, and strictly mia_x_passes materials for compositing reasons.
I started out, duplicating my main beauty render layer, and assigning nearly each in scene material as an override for that render layer, and noticed an interesting thing.

Some materials (most are fully procedural), when applied to all the geo in the scene would cause it to crash / fatal error at different percentages into the render (note, this test was done with final gather OFF)

I even had a shader that when applied, crashed before, or at, 0%! What the F.
So, after half a day of collecting data (some shaders didn't crash maya at all, and some 5-11% in) I went through it all, and made a list of the 4 more volatile shaders, the ones that caused maya to crash the soonest.

I looked for patterns, and found a few, related, and consistent ones:

-All the biggest crashers had alot of nodes connected to different channels of the mia
-glossy samples were higher than default, 16-64
-Use Max Distance was OFF

Now, none of those three things would have ordinarily set off an alarm in my head, but since I've tried everything else I could think of, and it was a pattern, and was consistent, I figured I'd test it.

for the worst crasher, the one crashing at 0%, I simply:

-Turned on max distance
-Set the max distance to 1
-Set a fade to end color

Then.... I hit the render button.
Low and behold, maya DID NOT crash..

So, to recap, I solved more or less, 5-6 months of really stressful, deadline breaking render issues with this 1 fix, and I REALLY hope it comes in handy for someone else, because I've scoured the interwebs, and found NOTHING on this.

What I think this basically amounts to, is a bug in the memory management, or maybe a sheer limitation. Not in the large scale, like running out of ram and mental ray rolling over, but on a smaller scale, like a small bucket of info that fills up during render, and is never emptied, one that may never have been anticipated to fill up so quickly.

Who really knows.

CGTalk Moderation
03-12-2013, 03:20 PM
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.