View Full Version : Color info only pass

11 November 2009, 07:30 AM
Hi there;

I can't find a type of pass...

It is a pass that has only the color information of the shaders in the scene, no light/reflection/refraction/specular/shadow/other information included, it's like all the shaders were surface shaders...

Do you know wich pass is it?.

Thank's in advance.

P.S.: I'm talking about Mental Ray :)

11 November 2009, 09:39 AM
Its diffuseMaterialColor pass. But it does not work with mia_x_passes shaders, only with maya materials. I usualy create this pass manualy as separate render leyer with surface shaders.

11 November 2009, 10:18 AM
Mmm, is there any list with the pass that ACTUALLY work?, or a list with the passes that don't work and won't spend my time scrubbing my head thinking about my mistake, just to realise that it is autodesk mistake indeed?.

11 November 2009, 10:35 AM
User Guide > Rendering and Render Setup > Shading > Shading Nodes > mental ray for Maya shaders >

mia_material_x_passes support Beauty, Diffuse, Direct Irradiance, Indirect, Reflection, Refraction, Specular, Translucence

11 November 2009, 11:31 AM
I'd like to use a more elegant solution that respects displacements and so on..., if I could set mia_x_passes not to have any diffuse info and be 100% self illuminated...

11 November 2009, 11:43 AM
>not to have any diffuse info and be 100% self illuminated...
Its exectly surfase shader. It can be with displacement too. I don`t understand the problem :)

11 November 2009, 12:05 PM
The problem is that if I assign a surface shader to the object for a render layer, it overrides the displacement. To workaround that I need to change only the material and not the shading group, and that is a little more work to do, not too much, but if I have lots of objects in my scene, is a pain in the ass.

11 November 2009, 02:46 PM
All you have to do to add displacement to a surface shader is from the attribute editor select the first tab of the surface shader, under shading group attributes is a displacement slot, drop your object displacement in that slot. I know you said you dont want to edit shader groups, but it's really only one drag into a slot.

11 November 2009, 02:54 PM
Its just a question of organizing your scene.
And a lot of uniform work can be done with mel. Nobody say it would be easy :)

11 November 2009, 04:23 PM
Hehehe, yes, nobody says it would be ease, you are right...., no wait, you are wrong, it SHOULD be easy!, you only have to have the passes system to work the way they are meant to!, that's all. No mel, no workarounds, etc. Autodesk just make passes work and everything stays cool.

So..., are passes fixed in 2010?.

11 November 2009, 05:10 PM
Yes, it should be easy(as in XSI for example). I have feeling, that Autodesk deside to kill Maya at all. Nothing fixed in 2100. Probobly nothing would be fixed in 2011.

11 November 2009, 11:30 AM
I feel you pain my friend. Maya has probably to most horrible pass support out there. It's a joke - it really is! 3 releases and they manage to get only a few mr shader to actually support only a few passes with ease!

Tip for disp + material color. I have had many a arguement that the maya ambient light is useful for something, with people who just wouldnt listen because of close mindedness. Try this...You can use this light to create the pass your after create one and just turn down ambient shade to 0.

11 November 2009, 11:48 AM
Thank you revillo for that info, but that way I must perform another render mustn't do I?, I mean, I'd need two renders to do that, the same as I'm rendering with two render layers.

11 November 2009, 12:25 PM
I think if your are not using MR shaders you can do light centric pass rendering via contribution maps, but basically yes... you will have to bud. Annoying huh. But hey.. its not too labor intensive to setup and via render layers.. you get the pass in the end. I always end up with a few render layers regradless with doing passes :) I think if you do a test dump of all passes over your scene even with mr materials you'll get a pass with just diffuse shading info still (even if mia dont offically support it - dunno, maybe I just got lucky last time I tried). Youll need this to rebuild the shading component...

11 November 2009, 12:28 PM
My workflow since years now is to us render layers, but I'd wanted to get rid of them, since each render layer means 2x render time, that's the point on using render passes doesn't it?, yeah, I think so.

I'll stick to my render layers workflow for the moment.

12 December 2009, 05:15 PM
I think you can do that with a custom pass shade node.
If you try to see a mia_material in the connection editor you 'll se that it actualy has a lot of
values that can be piped out.

12 December 2009, 06:06 PM
you could do this with mental ray materials using the writeToColorBuffer node (create mental ray nodes > miscellaneous > writeToColorBuffer).

connect the mia_material_x.diffuse_raw ---> writeToColorBuffer.color
connect the mia_material_x.message ---> writeToColorBuffer.evaluationPassThrough

then in your passes menu, create a new custom color pass, give it a name (diffuse_raw) and set the bit depth however you need it. then go back to your writeToColorBuffer node and select your new custom pass from the dropdown menu in the attribute editor.

this will work, although unfortunately there's a bug (as always, thanks autodesk) that will cause your render times to explode in heavier scenes when using custom framebuffers. if your scene is fairly light it probably won't be too noticeable.

there's a script someone posted recently that gets around the slowdown supposedly, although you have to install puppet's shader pack to use it.

my recommendation is to just make another render layer. it's inefficient but at least you know it'll work.

12 December 2009, 06:29 PM
Thank's autodesk, for every workaround, there is a new bug coming along...

12 December 2009, 11:20 AM
thanks for explaining, That's what I meant too.
and yes the render times do explode. But that's pretty much inherent to the whole render pass system system, cuz the render times go up even if you add the normal render passes.

12 December 2009, 09:15 AM
thanks for explaining, That's what I meant too.
and yes the render times do explode. But that's pretty much inherent to the whole render pass system system, cuz the render times go up even if you add the normal render passes.

The whole point of the render "pass" system is that doesn't increase render time, except the time it takes to write out the extra files! It's simply a half finished system that has seen lacking development , and now due to legacy reasons I will expect it to stay broken for some time yet. Why the minimal support - I think cause every major player for the software has developed there own pipeline to output passes, which is often superior to what Autodesk are/can?? offer. Most renderers deal with the pass thing natively (eg. renderman AOV's) but things just arnt working out so well with mental ray..... Note no problems with native maya shaders.

CGTalk Moderation
12 December 2009, 09:15 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.