Tips & Tricks Software: Maya Level: Intermediate Date: 13th May 2008 To keep is line with the Max tutorial, it is important to first show some system settings that will be extremely helpful in the long run. Please note this is a suggestion, and something that I’ve found out to be pretty useful.
Go to the system properties and select the Performance settings. Select Adjust for best performance.
Another thing important to make sure that you have enough virtual memory. By default it is the C: drive that is “looked at” by Windows, hence avoid saving files on desktop (which is more often stored on C: drive) One more factor is the processor scheduling and Memory Usage.
P a g e | 1
Tips & Tricks Software: Maya Level: Intermediate Date: 13th May 2008 In this month we are looking at High Resolution Rendering, something that is very often needed when having to print. This often takes toll of our system resources. For this exercise I’ve taken a favorite scene file from Zoorender. This is an online benchmarking file, to compare render of systems hardware, their OS and RAM etc, specifically when using Mental Ray inside Maya. It would be simpler to create another file, but would be very useful to have one common file for all tests. I have to appreciate and acknowledge Zoorender for this initiative, which is now many years old. Another reason for using this file is that it uses an optimal mental ray setting that really tests the system and it’s settings.
Getting back…. What we are trying to achieve here is a High Resolution render of 4096 by 4096. Most of us will not even be able to seen the whole picture inside our monitors. A small explanation to those, who are not so Mental Ray savvy. A L‐shaped room (notice the top left window) having a spot light beaming through it (notice the bottom right image) the camera is positioned at the other end of the L‐shaped room. Just the light by itself will not be enough to light up the entire room, and so we use final gather which is a part of Mental Ray. It has to be understood that we have to render a relatively smaller image to check for the various settings, until we have achieve the final look that we want to achieve, before going High Res.
P a g e | 2
Tips & Tricks Software: Maya Level: Intermediate Date: 13th May 2008 Now to the High Resolution rendering part. No sooner we setup our render for 4096 by 4096 we may have memory issues and not be able to render this image. So we have to break up our render into smaller tiles. This we have to use our command line render. Open the command prompt window Start>>run>>cmd
OR
Start>>Programs>>Accessories>>Command Prompt
This will open a DOS window. Go to the place where your scene file is eg: c:\toronto\scenes The entire command would be cd \toronto\scenes (assuming that you are in c: if not first type c: ) to understand what all flags are available Type render –h The correct render that we need is Render –r mr –reg 0 500 0 500 –im tile01 scenefile.mb Command –type of render –region –image ‐scenefile Hence we will need to have many renders to cover up the whole region i.e 4096 X 4096. In this example we are rendering 500 X 500 we could also do the same using 1000 X 1000. Hence we have 500 X 8 tiles horizontally and the same vertically thereby giving us a total of 64 tiles. Having to render 64 times in command prompt may seem a daunting task, that is the reason we use the age old antiqe “batchfile”. Batch file is and wordfile saved with a .bat extension wherein command are followed line after line.
P a g e | 3
Tips & Tricks Software: Maya Level: Intermediate Date: 13th May 2008 But before executing this batch file, we have to remember that we are rendering images with Final Gather. As such running the batch file will make the software calculate the final gather each time the command is given i.e 64 times !!! secondly Final gather will be calculated for the entire scene not just the portion of the render we have specified !!! The answer to this major issue to to “pre render” the Final Gather and save it as a file.
Now is the tricky part. We want to render ONLY the final gather hence we need to select the Mental Ray node. Select attribute editor. And in the Maya MEL command line type: select mentalrayGlobals;
In the rendering tabset change the rendermode to Render Final Gather maps. And Batch Render.
P a g e | 4
Tips & Tricks Software: Maya Level: Intermediate Date: 13th May 2008 Note : this render will take a decently long time. The best way of monitoring is the task manager and wait till cpu activity lowers down. Once the render is complete we can visualize our Final Gather map is we so chose
Windows>>Rendering Editors>>mental ray >> Map visualize Specify the file. It will bring the entire data into the viewport to be visualized. When done, delete the visualization. Are we now ready to continue with render our tiles ? Yes. But we have to reset our mr renderglobals to default i.e rendermode>>Full render Another thing, we already have the Final Gather file, so we will ask the renderer to “freeze it” hence using that file for rendering and not recalculate or rebuild.
P a g e | 5
Tips & Tricks Software: Maya Level: Intermediate Date: 13th May 2008 Please Note: this exercise expects you to know the basic of render globals and further expects that you have setup your render globals to render 4096 X 4096, single image, image type etc… Finally RENDER !!! Go to the command prompt and run the batch file you’ve created. i.e just type the name of the batch file and hit enter. The render will be pretty fast as the scene does not have to calculate the final gather. When the render is complete you will have various images of 4096 X 4096 with only a 500 X 500 image tile showing up.
Open Photoshop. Open the first tile image. Save it as final_print (or whatever final name you want) Open the second image. Control A (Select ALL) Control C (Copy) Select the first image i.e final_print Control V (Paste) To remove the black surrounding it use the Magic wand, with tolerance zero and Anti‐aliasing switched off. Select the black area and delete. Voila two tile have come together. Repeat the process for the other tiles, till the final image is achieve. Of course SAVE !!!
P a g e | 6
Tips & Tricks Software: Maya Level: Intermediate Date: 13th May 2008 To check that this process was indeed done, whilst writing this tutorial. Note the preference settings are in inches and as such we have a 14 X 14 inch image
P a g e | 7
Tips & Tricks Software: Maya Level: Intermediate Date: 13th May 2008 It is also important when merging the image, that one should do a double check to see that the tiles have joined neatly, hence zoom in as much as possible and show/hide a layer. If anything is amiss or incorrect, it will be noticed immediately. This case we have zoomed in 400%
P a g e | 8
Tips & Tricks Software: Maya Level: Intermediate Date: 13th May 2008 So here is our Final Image.
Prem Moraes
Digitally signed by Prem Moraes DN: cn=Prem Moraes, o=Autodesk India Ltd., ou=M&E, email=prem.moraes@autodesk. com, c=IN Date: 2008.08.19 17:13:24 +05'30'
P a g e | 9