Maya Linear Workflow In Two Steps

david | mentalray,rendering,tutorials | Sunday, March 7th, 2010

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! (more...)

frame by frame command line rendering

david | mentalray,rendering,tutorials | Wednesday, February 17th, 2010

If you don't have access to a render manager, or even if you do, you might want to render from the command line one frame at a time. There are a few reasons why you may want to do this. Sometimes maya does not get to the end of a long batch render due to memory errors. You set off a 100 batch and it dies after frame 27 maybe. Another reason is that sometimes your animation does not seem to work in a batch render. A single frame renders correctly, but when you batch it some things don't update correctly. (more...)

p_HairTK with p_shader_replacer update

david | mentalray,rendering | Tuesday, November 3rd, 2009

A few months back I wrote about using puppet's p_shader_replacer to override maya's fur shading with the p_HairTK shader. I discovered a strange anomaly that I thought would be worth a mention. But for the rest of this post to make sense you need to know how the p_shader_replacer works. If you don't, have a look here.

So here's the thing: The name of the object that holds the geometry shader and the name of the furFeedback node actually matter. Specifically, the name of the object that holds the geometry shader needs to come before the name of the furFeedback node from an alphabetical ordering point of view. And in this case capital letters come before lowercase.

So this works: pCube1 , polySurface1_FurFeedback - because "pC" comes before "po"

but this does not: pCube1 , PolySurface1_FurFeedback - because "pC" comes after "Po"

and this works: ApCube1 , PolySurface1_FurFeedback - since "A" comes before "P"

Easy once you know, but if you don't then depending on your naming some of your fur will just ignore the p_HairTK.

I'm currently using shaders_p v.3.3 beta 11 for Maya 2010 (win64) and find that p_HairTK is very stable, often quicker to render than maya fur and has better shading attributes. An especially interesting, and welcome benefit is that it fixes the NaN (black pixels) problem that seems to haunt maya fur.

maya 2010 mia_material_x bump bug fix

david | dj mod,mel script,mentalray,rendering | Thursday, October 15th, 2009

In maya 2010, if you connect a bump map to a mia_material_x shader and later change your mind and delete the bump map or break the connection, the shader will no longer render as you expect and the hypershade swatch will turn black. (more...)

djFileSwitchRamp.mel & djPopulateSingleSwitch.mel

david | mel script,rendering | Sunday, June 7th, 2009

I wrote these two scripts for a job I did recently where I needed an efficient way of dynamically assigning many different fileTextures to large numbers of objects.

By "dynamically assigning" I mean that the texture assignment needed to be animateable. Initially I thought of assembling my images into a numbered file sequence and manually keyframing the image number in the fileTexture attributes so each object would get the desired image at the desired time. But each object would need to be independent in terms of  image timing and order and I could see the task of managing these image sequences would be difficult. To complicate matters further, some images were to be static while others were to be 25 fps sequences.

(more...)

p_HairTK, p_HairTK_shadow, p_shader_replacer

david | mentalray,rendering,tutorials | Tuesday, April 14th, 2009

These 3 custom mentalray shaders are part of an extensive shader collection written by Pavel Ledin (aka puppet). In this post I will show how you can use a geometry shader, p_shader_replacer, to assign the p_HairTK shader to maya fur when using mentalray with fur mode set to hair primitives. Doing this gives you much more control over the look of the fur and, depending on how you use it, may dramatically improve yoru render times.

(more...)

p_color_plus_alpha

david | mentalray,rendering,tutorials | Monday, March 30th, 2009

Most of the time its ok to mix maya base shaders with mentalray shaders in the same shader network but sometimes things don't work as you would hope. An example of this is when you layer something like a blinn and a mia_material_x using mib_color_mix. At first glance the render looks correct, but you will find the blinn is missing in the alpha channel. A quick fix is p_color_plus_alpha.

(more...)

miFinalGatherHide

david | mel script,mentalray,rendering | Wednesday, March 4th, 2009

About 6 months ago I wrote about using mib_continue and mip_rayswitch to stop a surface blocking final gather rays. I used this technique regularly yet often wished there was an easier way to do the same thing - and there is!

Alessandro Prodan posted a solution on cgtalk that uses a new attribute called miFinalGatherHide to control whether a surface should block final gather rays.

(more...)

mip_binaryproxy

david | mentalray,rendering,tutorials | Thursday, October 30th, 2008

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...)

mip_gamma_gain and mentalRaySwatchGen

david | dj mod,mentalray,rendering | Wednesday, October 22nd, 2008

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).

mip_gamma_gain

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.

« Previous Page | Next Page »

Powered by WordPress | Based on a theme by Roy Tanck