If the emails I get are any indication, then I'd say there is a fair amount of confusion around the subject of linear workflow in mentalray for maya. And over the past few years in my search for answers I have contributed my share of half truths and misinformation to the discussion. So, in the next few paragraphs I'm going to state simply and without detailed explanation how to achieve a linear workflow in mentalray for maya by doing two things. Simple!
Step 1. Before you set up any materials, do any texturing or add lights, create a mia_exposure_simple node and connect it to your camera as a mentalray lens shader. In mia_exposure_simple set the following values: Pedestal=0, Gain=1, Knee=1, Compression=0, Gamma=2.2
Step 2. If you map a color value with an 8-bit image then connect either a mip_gamma_gain (preferred) or a gammaCorrect node between the fileTexture and the material. In mip_gamma_gain or gammaCorrect set Gamma=0.455
Thats it. You have set up a linear workflow.
A few extra things to remember:
Lights: Use Decay Rate=quadratic or physically correct lights like the womArchlight shader.
Color Swatches: If they represent a material color, then like 8-bit images, they also need gamma correction=0.455, so either connect a mip_gamma_gain to the swatch or just guess and darken the color manually.
Non-color attributes: Things like diffuse weight, bump values, reflectivity etc are not colors. They do not need any gamma correction.
Floating point images: These are already linear. gamma=0.455 is NOT required.
Frame Buffer Gamma: Forget you ever heard about it and leave it set to 1.
Final output: Use the renderview window to adjust your lighting and texturing. Then for final renders that require no post processing, batch render and your done. For renders that will be processed further in a compositing application where you will also use a linear workflow, then before batch rendering, disconnect the lens shader.
Summary: For linear workflow make sure input colors are linear by applying a 0.455 gamma correction to 8-bit images and color swatches. Do all preview renders with a lens shader gamma=2.2
Update 18 July 2010: Fredrik Averpil has written an excellent article that covers this subject in more detail. Check it out here.