Tuesday, January 1, 2013

Saving render time in Maya

About this tutorial

After long time i got time to update my blog...

First of all I am making text & images based step by step tutorial...... later I will add video tutorial of the same...

So.... let's start......


"Render time" You hate it and me too. So what you will do if I tell you that you can save your render time in Mental Ray?

Yes...you read it right. You can save render time using the technique that i am gonna tell you right now.


I am gonna tell you how to save render time using right BSP setting for your scene & how to analyse what setting to use.

About BSP

Do you know about BSP acceleration in Mental Ray?
If yes you can continue reading & if you don't know you can click here to know about BSP.

Using BSP

I am gonna use this scene to demonstrate steps.

Render your current scene with your default settings & keep it to get idea how much time we are saving.

You can see that with my default setting i am getting render time of 2 min. 47 sec. Keep this image.

Now open the Render Settings go to Quality tab & open Raytracing & then Acceleration. There you will find BSP setting.

Change the acceleration method to regular bsp. There are two main options for BSP diagnostics:
BSP Depth
graphically shows the depth reached for the BSP tree for each part of the image.
BSP Size
graphically shows the size of each 'BSP-leaf'
Generally for architectural scene, you only need to worry about the BSP Depth. BSP Size is generally only needed when using Motion Blur or when you have geometry which has stretched polygons the reach across most of the image width or height.
Select the method you want to use for Diagnose BSP, so in most cases: Depth ( in my scene also).

Rendering BSP Diagnostics

You can just Render to make a diagnostics render (provided you've selected one of the two BSP diagnostics modes). As this only considers geometry and ignores shaders and lighting, it should be pretty fast.
To get more accurate data regarding the BSP, it's recommended to enable Info Messages:
Select the Render menu set. Render -> Render Current Frame option box. Set the Verbosity Level to Info Messages. Mental Ray will now output detailed messages regarding the rendering in the Output Window.

Depth diagnostics

The image will consist of colored pixels, showing the depth reached:
blue - green
Ok. Maximum depth not reached. (Although memory usage may be higher than strictly necessary)
yellow - orange
Good/Ok. Near to maximum depth, but size constrains where (largely) met. The voxel is around the max size.
orange - red
Warning. Maximum depth is reached before the size constrain was met. The voxel is larger than the maximum that was set.

Note that red areas are not bad. Only if there are large continuous red areas, your depth is probably too small.

Now take a look at output window.
RCI  0.3     73 MB info : main bsp tree statistics:
RCI  0.3     73 MB info : max depth         : 40
RCI  0.3     73 MB info : max leaf size     : 146
RCI  0.3     73 MB info : average depth     : 32
RCI  0.3     73 MB info : average leaf size : 7
RCI  0.3     73 MB info : leafnodes         : 352821
RCI  0.3     73 MB info : bsp size (Kb)     : 21054

Here you can see that i am currently getting good result at default setting (Most of the time you will get) (Size 10 & Depth 40). If you are getting more red then you need to check average leaf size. If it exceeds your limit then you need to increase BSP Depth & vise versa if you are getting more blue. You will need to diagnose your BSP Depth as per you are getting good combination of green and yellow & some blue & red.
Recommendation: Change the default for large scenes. Use diagnostics to find the right values. Don't increase to over 60 unless you really know what you're doing.

As a result here is what you will get when you are satisfied with your diagnostic. Reduction in render time.

Here you can see i have saved whole 34 seconds. Yesss......( Thats what you will say after seeing your result..... )

Now you have the Weapon of BSP. The Power is yours.

If you found this tutorial helpful, don't forget to like my page on Facebook and follow my Blog on Google +.

Add comment if you have any question or any problem.

And you are free to share this tutorial as long as you mention the source.

See you soon in my next tutorial.

One thing i want to ask you. On which topic i should create my next tutorial ?
Maya, Max or other software ?

Please help me to create more & more helpful tutorials like this by telling me what you want & i will also add some interesting things that I know.

Thank You.