PDA

View Full Version : Control color / alpha / depth via MEL


jdj
12-15-2003, 07:21 AM
Hi there

A simple(?) question: I though I'd write some scripts to help me setup a few scene files for rendering - so I don't forget something in one file. Anyhow, materials are OK, lights, cameras, action.. :) ...but I would like as the last tweak to setup what channels to render: RGB / Alpha or DepthMap.

I can find all options of the render setup in the defaultRenderGlobals / Quality & resoution nodes BUT the flags I am looking for.

Any ideas?

Cheers!
/ Daniel

h0tice
12-16-2003, 01:55 AM
hi,

i think these are you looking for,


for the RGB channel:
setAttr "camera.image" 0;

where camera is the name of your renderable camera.

for Alpha channel:
setAttr "camera.mask" 0;

for Zdepth:
setAttr "camera.depth" 0;

i assume that you know that the value of 0 is off and the value of 1 is on.

just make a script that will trigger the value of these attributes. then in the render globals put the name of the script in the pre Render MEL options. so now before maya renders your scene it will execute first the script and then renders it.

i hope this is clear, if not just reply into it and we'll see what we can do.



:)

jdj
12-16-2003, 06:38 AM
Great!
:thumbsup:

I'll try it!

Thanks!
/ Daniel

CGTalk Moderation
01-16-2006, 11:00 PM
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.