View Full Version : shadows as an output channel
I'm new to renderman and maya to renderman and I'd like to know how is it possible to render some channels separately like shadows, diffuse for using in compositing later on. I know the backplane and ratcollector method but what about self shadowing. I know in mayaman there is an output variable __shadow wich write an image with shadow at each pixel.
Well, I don't know how much programming you want to do or if you need an automatic solution. You can render different channels (color, specular, shadows, diffuse, etc.) using output variables (read RAT documentation about this).
Lets say you want to have a separate pass for specular, then you create an output variable called spekular (use your favorite name) like this in your shader:
surface yourshader(float Ka = 1,
float Kd = 1,
output varying color espekular = 0; ) /* check the words output varying here */
your shader stuff here
Oi = Os;
Ci = Os * yourstuff;
espekular = Ks*specular(Nf,-normalize(I),roughness) ; /* plastic specular */
Then in your RIB you need to declare the output variable(s) of your shader:
Declare "spekular" "varying color"
And ask the renderer to create another image file:
Display "+spekular.tif" "tiff" "spekular"
Here's a link to an answer Larry Gritz wrote some time ago about shadow matting:
[Edited on 27/2/2003 by titus]
many thx titus
I knew this forum is the best around. Your reply and Larry's comments realy helped me a lot; job done, many thx again.
Very great tutorial Titus !
Thx for the job !
Powered by vBulletin™ Version 4.0.8 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.