I was looking through the "Whats New" section of the maya 2009 manual and read this about Render Proxies
Use render proxies with mental ray rendering to manage large scenes with complex geometry. Export your complex object as a mental ray assembly file, then replace it in your scene with a placeholder object that references this file. When you render, the exported object is loaded into memory and rendered with the rest of your scene. Translation time and memory usage are cut down, allowing mental ray for Maya to render large scenes.
And that prompted me to write about the mip_binaryproxy node. Those of us who are sticking with maya 2008 for the time being can use mip_binaryproxy to implement render proxies almost as easily as our friends with maya 2009. (more...)
Using a linear workflow always requires some gamma correction somewhere. If its within a maya shader network then you have some choices. The most obvious is maya's standard gammaCorrect node.

If you have maya2008 or 2009 then there is also mentalray's mip_gamma_gain node (which is hidden by default, but is easy to expose).

These two nodes perform the same basic function, with a few differences.
Maya's standard gammaCorrect enables independant gamma control of the three color channels.

While mr's mip_gamma_gain offers the simplicity of a single value gamma and throws in a gain control and a reverse switch for inverting the gamma value (saves you having to get the calculator to figure out the inverse of 2.2).

Until very recently, I had always used maya's gammaCorrect. And for one reason only - I like its colorful and meaningful hypershade swatch because it is easy to see in a busy hypershade window.

mentalRaySwatchGen
Now I'm starting to use mip_gamma_gain instead because it occured to me that I can modify mentalrayCustomNodeClass.mel ( in C:\Program Files\Autodesk\Maya2008\scripts\others) and get it to display a swatch that has one of those updating shader balls. That means I can see the actual result of the gamma change.


Although it makes the gamma nodes harder to find in the hypershade window, I'm finding the visual feedback useful.
If you want to try this, make a copy of mentalrayCustomNodeClass.mel into your local scripts folder and edit your local copy. The file has an obvious structure, so look for the "Internal MentalRay Nodes" section and add these lines after it.
if ($nodeType == "mip_gamma_gain" )
return "rendernode/mentalray/material:shader/surface:swatch/mentalRaySwatchGen";
You should also comment out the original reference to mip_gamma_gain.
Last month I wrote about how I implement a linear workflow in my work. Since then I have noticed that in at least one area I'm doing it differently to many others - and now I know why they are right and I was wrong.
It boils down to this: I've been leaving my frameBuffer gamma at 1 (the maya default) and setting my output gamma to 2.2 via an exposure node, which means I need to degamma my 8 bit fileTextures (but 32 and 16 bit floats are ok). However the other (very popular) approach is to set the frameBuffer gamma to 0.455, and the output gamma to 1, which means generally the fileTexture requires no degamma.
When making my choice I weighed up both methods and I said to myself "The frameBuffer gamma defaults to 1 and the exposure node defaults to 2.2 gamma, so I'll stick with that. After all, it looks the same in the render..." BUT ITS NOT! (more...)
I'm going to start by saying that I do not consider myself and expert on this subject, but I'm going to write about how I have adapted my methods to deal with the "linear workflow" thing in my day-to-day work.
If you have never heard the term "linear workflow" then you must have been really busy doing something else for the past year, because it has been discussed over and over in forums and blogs. I've done a lot of reading and managed to confuse my thinking on numerous occasions, but lately it all seems to be falling into place and I feel like some kind of born again "linear workflow" convert. And like most new converts, I feel compelled to spread the word.
(more...)
I read a thread on cgTalk, which was started by Filip Orrby, in which he asked "How to make object not block FG rays?". He went on to answer his own question and since it is similar to a technique I use, I decided to elaborate.
I'm going to write about a shader and lighting setup I use a fair bit for product shots, where the background is very simple, often white and the product is to be brightly lit. For my final renders I usually break things into render layers, but I like to be able to quickly render everything in one pass to evaluate my animation and to show my progress to the client.
Here is a typical example of the end result.

To see a step-by-step breakdown of the setup, click here (more...)
I've been working on a project involving the use of maya fur. It's the first time I have rendered fur using the mentalray renderer, so there was much to learn. One of the difficulties I encountered was dealing with the illumination of near-white colored fur (like a polar bear). In the past, using maya's native software renderer, I would have added fur shadowing attributes to my lights to allow me to control and balance the amount of illumination on the fur, but these attributes are not supported by mentalray so I had to find another way.
In this post I show an approach to rendering near-white colored maya fur with mentalray.
(more...)
Last year I wrote about my experiences creating a mentalray phenomenon called dj_mix_colors. Shortly after that I wrote about how to create a zDepthDOF shader using some of the standard maya utility nodes. Now I'm going to combine the two ideas and build a zDepthDOF style shader as a mentalray phenomena.
Let me start by saying all I'm really doing here is emulating (once again) the zDepthDOF shader by Andreas Bauer. But I have two reasons for doing so. Firstly I have recently become aware of a suite of freely available mentalray shaders called drUtilSuite 1.01 written by Duiker Research. It contains roughy 200 shaders
...to provide clearly defined atomic operations that may or may not be available already in Maya and mental ray.
Most accomplish a single basic task and they are designed to be built into something bigger. So I decided that it would be a good exercise in phenomenon building to create something useful. And that brings me to my second reason.
These shaders are provided for windows x32 and 64, linux x32 and 64 as well as osx uni, so they could fill some of the gaps currently facing those on modern os's.
You can download djDepth with some example scene files from here.
If you are interested in the full story click here to read (more...)
About a year ago I wrote about a trick I had discovered to get correct alpha channels in the refraction of mia_materials. I've seen it mentioned occasionally in forums like cgtalk, so I thought I should post a quick update.
In maya 2008 the mia_material Advanced Refraction attribute called Propagate Alpha now works correctly, so the trick I wrote about is no longer required.
In this post I will explain the way I have been using the mip_matteshadow shader in maya 2008 (along with some of the other mentalray "production" shaders). It is not going to be a step-by-step tutorial - and I'm certainly no "production" shader expert. I started by reading Zap's mental ray tips, and the Production Shader Wiki and the PDF manual. Then I did some experimenting to see how I could include these new methods in my work which, unlike Zap's examples, usually involves rendering CG characters in CG environments rather than live-action or photographic backgrounds.
Here is a simple example of how I have recently started using mip_matteshadow as a better alternative to maya's useBackground shader... (click here for the rest of the post) (more...)
I always tell people to never modify the original maya mel scripts. Always make changes to a copy that is in your local scripts folder. This modified copy will over-ride the original maya version.
The downside to this is that when you upgrade to a new version of maya, the modified script may now be out of date, and since it still overrides the newer version, it could cause unpredictable problems.
A while ago I modified createMentalRayGlobalsTab.mel to add the ability to choose a tone mapper when creaing the physical sun/sky environment. After upgrading to maya 2008 sp1 this week I discovered that the "Render Settings" window loaded with an unhelpful error message and was completely blank. It took me a while to realize that my modified createMentalRayGlobalsTab.mel was to blame.
Often when things go wrong after an upgrade people start by removing their prefs folder, but if you have modified mel scripts, try removing them first.
I have updated the createMentalRayGlobalsTab.rar on the downloads page. It now contains a sp1 version as well as the original.