There is a long, long thread on cgTalk called "Forests in maya mental ray". The discussion is all about techniques for creating and rendering the vast numbers of polygons needed to make convincing grass and trees in large numbers.
Maya's paintFX can be used to make trees which can be converted to polygons with leaves that consist of just a few polys per leaf. Texture maps (color, opacity, bump etc) are then applied. The default output from the paintFX conversion has each leaf mapped to fill the standard uv quadrant, so each leaf gets a copy of the texture. This can look pretty good, but the repetition is usually very obvious. You could break the leaf mesh into a few parts and assign variations of the leaf textures to each part. But a more efficient way is to layout the uv's so that groups of leaves are mapped to different parts of the uv quadrant in a 4x4 tiled patternfor example. Then you can make a texture map with leaf variations arranged in the same 4x4 tile pattern. Now you can have 16 different looking leaves on the tree, almost as easily as you can have one.
Default paintFX conversion gives you this

But what you really want is something like this 4x4 tile pattern (or maybe 2x2 or 3x3)

The problem is that you might have 50,000 leaves on your tree. It would be very difficult to select and edit the uv's for different leaves by hand. This is something that needs to be automated (more...)
Ever since I can remember, maya has had an annoying bug that causes materials to display incorrectly in the viewport in both "Smooth shade all" and "Textured" modes.
If you've ever encountered something similar to this error
// Error: file: D:/Program Files/Autodesk/Maya2011/scripts/AETemplates/AEhardwareTextureTemplate.mel line 721: Found no attribute match for "mia_material_x1.diffuse" //
or this one
// Error: file: D:/Program Files/Autodesk/Maya2011/scripts/AETemplates/AEhardwareTextureTemplate.mel line 827: Object 'VRayMtl_qualityMenu' not found. //
then you may be interested in a workaround. Its not perfect, but its better than nothing.
(more...)

This time last year I started a new job at a new studio. For me, this was a big change since I had been at the previous studio (one that I helped build from almost nothing) more than 20 years.
My new job has given me the opportunity to learn several new applications and as a result I have found little time to update my blog and it has been very much neglected.
So to begin a new year of enthusiastic blogging, I've decided to write a (long, possibly boring) post about what I've been doing the last 12 months. It is just a quick rundown of changes affecting my general workflow. If you are still interested, keep reading (btw... the photo is my new puppy, Hollywood) (more...)

You can use this script to create black and white matte renders using mentalray's pass system which means that it takes no longer to render 100 mattes than it does to render one. And since the script makes it so easy to set up these passes you can render a separate matte for every object in your scene, if thats what you want, or for combinations of objects that you select or based on the materials that are assigned. (more...)
Earlier this year I wrote my two step guide to Linear Workflow. Since then I have received a lot of email about it. It's a tricky one to explain in simple terms. I did my best to narrow down my description to cover the basic concepts. Some people got it. But I can tell from the email, that others saw gap's that I did not adequately fill.
Luckily for all of us. Fredrik Averpil has written an excellent article on Linear Workflow in Maya 2010 with pictures and diagrams and examples of how this also applies to compositing in Nuke 6. You can check it out here.
The title says it all. The original post is here if you don't know about this one.
Here's a simple method you can use to add a bump map to the mi_car_paint_phen_x material without using custom shaders or complicated shading networks.

(more...)
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...)
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...)
When building shader networks in the hypershade window it is common to drag-and-drop one node onto some attribute of another. When you do this maya attempts to guess the type of connection you are making. If you drag a texture or a material onto a color attribute then maya will automatically connect either the .outColor or the .outValue, depending on the node type. There are other default connections for other types of attributes but if maya can't figure out what to do it opens the connection editor and leaves it for you to make the connection manually.
There is one notable case that seems to confuse people - mia_material_x and mia_material_x_passes. For example say you want to layer mia_material_x over another shader using mib_color_mix or mix8layers. If you drag-and-drop the mia_material_x onto one of the color inputs instead of connecting as you might expect, up pops the connection editor. If you've done this before then you probably know that you simply need to connect mia_material_x.result, but wouldn't it be great if maya was able to do that automatically, and skip the connection editor?
If you said "yes, that would be great" then you'll like the next bit. Back around the turn of the century, the thoughtful folks at alias provided a mel script called connectNodeToAttrOverride.mel which states
// This procedure is provided as a hook for customers to allow
// you to redefine the behaviour of drag and drop.
Well that's what I've done. Three lines of code was all it took! Now dragging mia_material_x and mia_material_x_passes works just like the other materials.
You can download my modified connectNodeToAttrOverride.mel from my downloads page.