View Full Version : Mental Ray "translating frame" issue

09 September 2007, 01:09 PM
I have a scene with roughly 1100 instances of a (polygon) mesh, distributed somewhat randomly around. The polycount for this scene is fairly high, although I can't recall the exact number.

Anyway, if I choose to do a test render with Maya's internal render engine, a frame was processed in about 30 secounds. If I try to do the same in Mental Ray, with the lowest settings possible, no Final Gather, no nothing, the rendering gets stuck at "translating frame".

I left it for about 10 minutes before giving up. I then hid all my objects except a couple, and tried again. This time it went smoothly, and as expected.

What I'm wondering is if there are any known workarounds or optimalizations for this issue? Unfortunately, trimming down the object-count is not an option for my scenario, but I'm willing to try almost anything else.

Also, will this "translation" only occur for the first frame, sort of a one-time only process, or will it be required for all consecutive frames too? The whole animation will contain roughly 2000 frames, and be sent off to our renderfarm for the final output. As of now, I've only tested single frames (both batch, and normal previews from Maya).

Any help on this subject will be greatly appreciated! And (as always) time is of the essence :-)


09 September 2007, 02:37 PM
This sounds like a well known bug in mentalray plugin. It has problems with a lot of instances.

They announced the fix of this bug as a "new feature" in the maya2008. The only way will be to replace your instances with a normal geometry.

09 September 2007, 11:51 PM
gozzer: I had exactly the same problem earlier this week. I did as haggi suggests - replaced the instances with real geometry.

Fortunately this was made easier because I had grouped my geometry and instanced the group and put all my transforms on the groups. So I just deleted the geometry instances and parented real copies to each of those groups, using these few lines of mel...

// helper script to duplicate an object
// and parent it to the selected nodes
// first select the object and then the parents
string $sel[] = `ls -sl`;

for($s in $sel) {
if($s == $sel[0]) continue;

string $dup[] = `duplicate -rr $sel[0]`;
parent -r $dup[0] $s;

-- David

09 September 2007, 02:14 PM
Thanks for your replies guys!

djx: that sounds similar to what I've done with my instances. I've grouped the instanced parts (3 parts to make up the whole object) and parented these groups under each their own dummy sphere, to make translations easier.

As I'm currently 70% ish done with rendering all these bastards, I don't think I'll try any more fiddling at this time, but your script seems like a brilliant solution for future reference.

Did it take long to execute? I mean, if not then maybe it's something I could have run as a pre-render mel? Just to keep the filesize down while animating.


09 September 2007, 07:50 AM
gozzer: It didnt take long to execute, but the first time I ran it I was attempting to duplicate-and-parent 2000 objects and maya crashed. After reloading I just did them 1000 at a time, and it took about 10 secs for 1000 copies.

Beyond that I havent tested it. I didnt even retry doing 2000 in one go so that crash may have been unrelated.

Your idea of using a pre-render mel has me interested though. My scene now takes longer to load ans save, so creating the objects at render time would be good. Not sure about my current project, but I might try that idea out sometime soon.


09 September 2007, 02:51 PM
Keep us posted :)

09 September 2007, 10:53 AM
gozzer: The pre render mel works really well. Thanks for suggesting that. It means I can remove all the hires copies from the scene and only load them at render time via the mel script. This makes my scene smaller but the main benefit is much shorter loading and saving times (which makes a big difference to me since I save _often_ when I am working).


CGTalk Moderation
09 September 2007, 10:53 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.