Author Topic: 3dsmax/mental ray rendering problem  (Read 2609 times)

Kai

  • Newbie
  • *
  • Posts: 24
3dsmax/mental ray rendering problem
« on: July 31, 2013, 07:08:28 PM »
Hello, I'm trying to render an animation that is pretty heavily populated with 3d trees, grass, shrubs, rocks, leaves, etc... I'm using backburner on my render farm and keep getting the following message in the server log:

2013/07/30 22:14:48 INF 3dsmax adapter : MENTAL RAY LOG: ***WARNING*** API  0.4  1426 MB warn   302064: while defining userdata "": user data block has huge size 24531984.
2013/07/30 22:14:48 INF 3dsmax adapter : MENTAL RAY LOG: ***WARNING*** API  0.4   1461 MB warn   302064: while defining userdata "": user data block has huge size 24323676.

It is always a double warning message for each frame. the value preceeding "MB warn" increases with each message. When the value reaches the 8000 range, the rendering stalls.

After exactly 10 hours I'll get "Task error: 3dsmax adapter error : Ping task time out." Then the 3dsmax adapter shuts down and restarts.

What is the best way for mental ray to handle large scenes? I'm using placeholder objects but I leave the map manager and conserve memory unchecked.

Also, how can I configure backburner to restart the max adapter sooner?

Thanks

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3254
    • iToo Software
Re: 3dsmax/mental ray rendering problem
« Reply #1 on: July 31, 2013, 10:29:33 PM »
Please, hold on. We are checking if this problem would be caused by a memory leak in the Forest MR shader.

If not, i'm afraid there is not much we can do. Unfortunately Mental Ray is not the most stable render engine, specially handling heavy scenes.
Carlos Quintero
iToo Software

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3254
    • iToo Software
Re: 3dsmax/mental ray rendering problem
« Reply #2 on: August 01, 2013, 10:25:24 AM »
Please specify your Max and Forest version. The result may change drastically from one version to other.

Thanks,
Carlos Quintero
iToo Software

MN4869

  • Jr. Member
  • **
  • Posts: 56
Re: 3dsmax/mental ray rendering problem
« Reply #3 on: August 01, 2013, 01:12:31 PM »
This may give you some ideas if you really cant render the whole thing: http://www.qvolabs.com/maya_camera_projection_basic.html

So you could render chunks of trees/objects onto planes. Will work if theyre not too close to the camera and as long as the camera moves arnt flying around the whole scene.

Kai

  • Newbie
  • *
  • Posts: 24
Re: 3dsmax/mental ray rendering problem
« Reply #4 on: August 01, 2013, 02:28:31 PM »
I'm using max 2014 sp1 and forest 4.0.3. on windows 7 64 bit.  My workstation has 64gb of RAM. The  machines on the farm each have 16GB RAM. Last night I used the memory optimize feature of Thorsten Hartman's render optimizer script. This allowed my machine to render all night while the MB value kept increasing beyond the 8000 range.

2013/08/01 06:19:00 INF 3dsmax adapter : MENTAL RAY LOG: ***WARNING*** API  0.4  20436 MB warn   302064: while defining userdata "": user data block has huge size 24323676.

The render farm machines with 16GB RAM  were only able to render until the value reached approx 9892 MB. Afterwards, the machines were unresponsive for exactly 10 hours.

I wish it was a problem with forest pro, because I know you would find it and fix it. Nobody compares to itoo for tech support. If it is mental ray, I'll just have to deal with it. Which brings me to the backburner issue. Is there a 10 hour timer somewhere that can be reset to a lower value? The animation still renders, but the 10 hour down time is what's killing me. This question belongs on the max forum, but I just thought I'd try here first.

Thanks

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3254
    • iToo Software
Re: 3dsmax/mental ray rendering problem
« Reply #5 on: August 01, 2013, 03:40:51 PM »
Thanks for your compliments. And yes, many times we also wish the problem is with Forest, because at least we can fix it.

While waiting your reply, i've done several tests using Max 2014. We use several user data blocks in Mental Ray, so initially i though they were not released correctly. But not, everything is correct with Forest. In fact, these data blocks are released automatically by Mental Ray.

Regarding the Backburner question, i'm sorry but i have not idea how it works internally.
Carlos Quintero
iToo Software

Kai

  • Newbie
  • *
  • Posts: 24
Re: 3dsmax/mental ray rendering problem
« Reply #6 on: August 07, 2013, 03:22:41 PM »
Hi Carlos, I did some more digging in my scene and discovered that the mental ray warning is directly tied to two particular trees I've been using. I'm using HQ 3d plants and the trees giving the warning are Beech Tree 4 and Oak 1 from the plants 1 collection. I am able to reproduce this on my machine when I create a new scene using these trees. I am including a test scene but the tree meshes have been removed from the file. If you have hq plants 1 you can reassociate the mesh with the forest object. I would like to know if you can reproduce this warning message. I also attached a snippet of the backburner server log. The log shows the mr warning message when using these trees as well as the same file rendering without the warning when the trees are disabled (I didnt' remove them from the scene, only changed their probability to zero). If you end up testing this, make sure that warnings are enabled in bb server log settings.

When I have time I plan to test all the other trees in the hq library. As of now, I'm only aware of these two tree giving the warning.

Thanks,
Kai

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3254
    • iToo Software
Re: 3dsmax/mental ray rendering problem
« Reply #7 on: August 08, 2013, 10:08:00 AM »
Thanks for the files. I can reproduce the error even rendering locally. We are investigating the problem.

Carlos Quintero
iToo Software

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3254
    • iToo Software
Re: 3dsmax/mental ray rendering problem
« Reply #8 on: August 08, 2013, 10:53:48 AM »
Well, we've found what is causing the warning message (and probably the backburner problem):

We create an user data block in the Mental Ray shader, to store certain data required by Forest Color. For some reason, this block seems too large to Mental Ray, although it's only 23 Mb. and only exists one by plant model. The size of the data block is proportional to the tree's mesh size. This is the reason it fails only with certain models (plants of roughly 2 Mill. faces).

Checking the Mental Ray documentation, this seems the only method to create user data blocks, so from our side everything seems correct. I have not idea why they have introduced that ridiculous size limit. We'll open a support case in Autodesk about this issue.

Please, try the attached shader (FP 4.0.3, Max 2013/2014 64 bit only) and tell me if something changes. This shader doesn't create the data block, but the Tint/Map by Element functionality of Forest Color is disabled, so use it only if you don't use that features. You must copy the DLL at <maxdir>\NVIDIA\shaders_autoload\mentalray\shaders.
Carlos Quintero
iToo Software

Kai

  • Newbie
  • *
  • Posts: 24
Re: 3dsmax/mental ray rendering problem
« Reply #9 on: August 08, 2013, 03:39:45 PM »
Thanks for the fix!

Kai

  • Newbie
  • *
  • Posts: 24
Re: 3dsmax/mental ray rendering problem
« Reply #10 on: September 25, 2013, 03:25:50 PM »
Carlos, I want to update you and the forum on this issue. Although the modified dll fixed the mental ray warning messages related to forest pro, I continued to get other mental ray warnings and backburner problems in other files. I finally submitted a bug report to autodesk and got in contact with one of their developers. He didn't know what the problem was but suggested changing the sampling filter size. I was using the gauss filter at 2 x 2 which is the default in max 2014. I changed the size to 3 x 3 and that fixed the problem.

Kai

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3254
    • iToo Software
Re: 3dsmax/mental ray rendering problem
« Reply #11 on: September 25, 2013, 03:29:40 PM »
Thanks for letting me know. I also wrote to Autodesk, but didn't get any useful information (they suggested me a couple of settings that had no effect).
Carlos Quintero
iToo Software

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3254
    • iToo Software
Re: 3dsmax/mental ray rendering problem
« Reply #12 on: September 26, 2013, 04:48:32 PM »
I include here the fix for FP 4.1.2, Max 2014.
Carlos Quintero
iToo Software