Monday, 7 May 2012

Mental Ray Memory

So when rendering the scene from my computer I am getting aMental Ray problem where it claims it's running out of memory .... yes of course you are, please ignore the 16GB of RAM I have on my computer and please go ahead and crash Mental Ray :)

Anyway I have done my research and this is the steps I have taken to try and solve the issue.

1: Close all other programme. I admit ... I might have had Photoshop and a few other propgrammes open when rendering. Rookie mistake. Apparently Firefox is a memory killer so I will definitely be keeping that off, tho I can't see that making too much of a difference eith 16GB RAM.

2: Unless I am trying to do quick test renders (which I do a lot) I will batch render. This should speed things up slightly.

3: Check my Acceleration Method and Memory Limit.

Here are my results after rendering a 640x480 AO pass and tweaking the settings

BSP2 - 4096 = crashed
BSP2 + 8912 = 1.19
BSP2 + Auto Limit (10859) = 1.21

Large BSP + 4096 = 1.01
Large BSP + 8912 = 1.01
Large BSP + Auto Limit (10859) = 1.00

So the last result seemed to give me the best performance. I'll now test out the BSP depth to see if I can decrease the time even more.

When rendering, Mental Ray subdivides or triangulates the scene in a perticular way that will try to keep thinking running faster. By going into the Diagnostics setting we can render out a visual representation of whats going on behind the scenes and then tweak the BSP settings. In this case I have done 3 renders of the BSP Depth.
 BSP Depth = 40 (default)

  BSP Depth =30

  BSP Depth = 50

 As you can see from the first render the front row of tents are almost completely red which is showing me that will take a very long time to render. Now I know there is something I need to change on the tents to speed up rendering.

The second image shows a BSP depth of 30 which has covered the image in red and orange which is the oppposite way I want to go. (Changing these settings does not actually change the look of the image, it is purely for how Mental Ray computes the renders)

I increased the Depth in the third image which now gives me more greens and yellows which would suggest it would speed up the rendering. However for some reason this isn't true. The second image increased the render time by a lot and the third increased it by some but not as much. I played around with the settings and did plenty of renders and found if I changed the Depth to 37 then I could shave off 5 seconds from my original render.This doesn't seem like a lot but when I change the render setting to 1080 and render off 3000 frames this will make a big difference.

Not only has that made a difference but it has also told me whats taking long to render in the scene so now I can go back and see what can be changed with the tents.


No comments:

Post a Comment