AO pass with transparent textures WITH multiple shaders


#1

Hey guys,

I’ve got a tree branch model that I’m trying to get an AO pass from, but of course I’m having that problem where mental ray doesn’t take the transparency of the leaf texture into account, so I did some searching, and found this wonderfully helpful tutorial: http://lesterbanks.com/2014/02/transparent-textures-ambient-occlusion-maya-mental-ray/

The problem is… that tutorial covers what to do if there is only one material on the object, whereas my branch model has 3 different textures on it, only one of which actually has transparency.

I tried manually connecting up the nodes in hypergraph, and that worked! Just a shame that it broke everything else in my project. :frowning:

I then rolled it back to an old version before I started all this, so I could get a fresh start. What I tried to do this time, instead of manually connecting the nodes in hypershade, I tried to add a layer override to the shading group, to reference the transparent ambient occlusion shader instead of the leaf shader for that render layer. Maya wasn’t too thrilled about this, and promptly froze up on me. I had to put a bullet in her… erm… so to speak. :frowning:

I’m still very much a newbie to Maya, so if somebody would be willing to walk me through how to do this, I would be extremely grateful!


#2

I think the easiest hing would be to have the leaves as a separate mesh. When I did work on forest scenes I always had the branch/bark materials on one object, and the leaf materials on another. It should work if you do that, another thing to look up might be pass contribution maps in mental ray, which split a given pass for different objects.