Tag: Mental Ray
Mental Ray Black Render Frames Solution
by Josh on Jul.29, 2010, under Film
A quick show of hands… How many of you have setup a scene, possibly like me with countless render layers all laid out and ready to rock, kicked off a long render and went to sleep with all the comfort of knowing when you arrive back at your bench you will be greeted with thousands of vibrant images eagerly waiting a composite and find out you have been underhanded by your trustee friend Mental Ray? You have 10 GB’s of solid black images. Darker than zero. I’m talking about a depth and void only witnessed through the eyes of a betrayed and heartbroken artist.
Well no more!!
I am sure most people have eeked out solutions of their own when presented with such egregious insubordination. I will add to your quiver of handy solutions with one that has come to serve me well.
First I would like to say I am not certain of the cause of this particular problem but I’ll note that it is a problem with the Mental Ray settings in the scene rather than the possible abundance of mib shaders. More than likely if you test out a plain lambert material when Mental Ray turns itself into a conveyor belt of blackness you’ll find nothing renders. It bothers me to no end to encounter problems that I do not understand the ‘why’ involved, but possibly as I dissect the solution a bit I will find out more.
Here are the steps I have come accustomed to in overriding said problem.
Save your latest scene and save a new version with some variance identifying the MR fix. In the top right-ish of your maya window select the downward facing black arrow that drops down a selection of options: Absolute Transform, Relative Transform, Rename and Select By Name.
Select ‘Select By Name’, type *mentalray* with the asterisks to select everything with mentalray in its name. Press enter, then delete. Now at this point if you continue in this scene Mental Ray is all but completely disabled. It has removed everything including the render globals data. Save this scene as your
I might post screenshot images of this simple process but right now I am friggin’ busy. What is nice about this solution is in the past I would worry about possible problems based on the shader systems in place, which is too vast to break down. This allows you to leave all render layers and shaders in place, and will have you sleeping easy again in no time.
I try to post things that seem rather excluded from the world wide web of information. I was unable to find anything pertaining to this problem or its solutions. I hope this helps otherwise what the hell are you doing here. You googled Mental Ray Black Render Frames. Jog on !!
Transparent Occlusions
by Josh on Sep.18, 2009, under Film
This post is a little bit different from the normal drivel I provide world wide. As I have mentioned before and in the ‘About’ section I earn my keep as a visual effects artist for film. One of the more interesting aspects of the job is the problem solving that goes into creating desired effects. Sometimes the search for answers to problems I encounter become a project in itself and even good resources can end up using cryptic wording that makes its hard to understand a procedures implementation in production. The long and short of this post will show you how to build occlusion passes using Mental Ray Final Gather that obey transparency maps. I have attached below a downloadable Maya 2008 .ma file in case my walk through does not register, or if you are like me and find it much easier to dissect the scene rather than read someone else’s lecture.
For the purposes of this post I will be referring everything based on Maya 2008.
The current ‘mib_amb_occlusion’ node located in Maya’s ‘hypershade panel’ under the ‘Create mental ray Nodes’ menu, is a great source for delivering an ambient occlusion layer or pass, but to my knowledge does not recognize transparency maps assigned to objects within a Maya scene.

I am going to move rather quickly past that node. If you are here you likely searched for something related to transparencies in ambient occlusions which should leave me to believe you are already comfortable using normal Mental Ray ambient occlusion shaders. If you want more info on that contact me through this post.
In order to run a transparency map into an AO (I’m abbreviating now) shader, we need to use Mental Ray’s Final Gather renderer and a couple of Final Gather specific nodes. In the hypershade panel create a Maya lambert material, a Maya surface shader material and open the both of them in the bottom work area by shift selecting both of them and clicking the ’showUpAndDownstream’ connections button above.
We are now going to grab the necessary final gather nodes from the ‘Create mental ray Nodes’ menu. The first one is the ‘mib_fg_occlusion’ node located in the sub-menu ‘MentalRay Lights’. The second node is the ‘mib_transparency’ node located in the ‘Sample Compositing’ sub-menu.

I am going to generate a transparency map using a Maya based procedural Ramp texture to complete this walk through. You will substitute this for the map you need based on your production. Let’s start by connection the ‘mib_fg_occlusion.outValue’ to the surface shader.outColor by middle mouse click and drag from the ‘mib_fg_occlusion’ node to the surface shader node. This will bring up the connection editor, connect the forementioned attributes to be connected. Connect the surface shader.outColor to the ‘mib_transparency.input’. Connect the ‘transperancyMap.outColor’ to the ‘mib_transparency.transp’. This will automatically connect the ‘transperancyMap.outAlpha’ to the ‘mib_transparency.transpA’. Lastly, connect the ‘mib_transparency.outValue’ to the ‘LambertSG.miMaterialShader’. Be sure when you are connecting that last attribute to be connecting to the shader group of the lambert material. You can now connect the shader to the desired object.

Before all the magic unfolds before your eyes you will need to bring up the attribute editor for the ‘transAO_LambertSG’ shading group. By default there is an attribute ‘Export with Shading Engine’ which is flagged ‘On’. Uncheck this box for the transparency to work. It will not function properly if this attribute is not turned off.

We are almost there and your patience will be rewarded I assure you. We need to turn on Final Gather in the Mental Ray render globals. By turning on Final Gather and ensuring that ‘raytracing’ is turned on this shader now will recognize the transparency maps in and ambient occlusion shader. I would also suggest making sure that your quality presets are set high and adjust the settings in the Final Gather menu to achieve the desired results.

I will close this post by saying that this will likely serve the needs you may have for generating AO passes containing transparency maps. I do prefer the control settings in the ‘mib_amb_occlusion’ node to the ‘mib_fg_occlusion’ but this does the job for now. I hope this helps and is an easy approach to building this shader. You can download the Maya 2008 scene used in this walk through below.
Maya Scene Download


