PDA

View Full Version : Tip for rendering shadows in shave


mactoons
03-18-2009, 05:27 AM
I am not sure if this is a common problem or not but I could not get a separate shadow pass rendered for shave and a haircut shadows. I basically just wanted the shadows on the character geometry to composite in post with the rest of the character and hair. You are supposed to be able to accomplish this by just checking "shadow matte" in the shave globals. The problem I had was this only gave me shadows from 1 light in my scene and I needed it to use 3 lights. I think it is some sort of bug, I'm using maya 08. But I figured out a workaround that would give me shadows from all the lights in my scene.

What I did was set up a render layer that had all the shaders on the character (where I wanted the shadows) as a basic white lambert and all of the background geometry that I didn't need shadows on I set to a "Use Background" shader from maya. Then in order to get the shadows I rendered this in one pass without any of the hair turned on at all so I just got a basic white lambert shaded image with no shadows and then I rendered it again with the hair on (but not compositing, I just rendered the hair to the output dir) and this gave me that same lambert shaded geo but now with the hair shadows also. Then I brought those 2 images into after effects (can be done in photoshop for single frames) and layered the 1 image on top of the other and put the blending mode as "Difference" (or "Difference (Classic)" in AE) and this gave me just the shadows that I could then use as an alpha for the shadows to composite with the rest (the character pass, bg, hair, etc).

Hope this makes sense and might help someone out. Let me know if you have any questions. I was rendering my hair pass and hair shadow pass with Maya Software renderer, although this probably would work for MR also.

Maxxi
09-12-2009, 01:33 AM
Hi, I tried your tip but i don t know what to do once i have both renderings in AE.
Once you have mixed the layers using the "difference" setting, how do you use it as a alpha channel for the shadow pass? I was able to do it in photoshop by doing it manualy but i can,t do that in AE;
Also in photoshop, I had to duplicate 4 times my shadow pass layer to get a stonger shadow, is there another way to reduce the opacity of the alpha channel to get a stronger shadow in AE or photoshop?
Thx for helping :)

mactoons
09-14-2009, 01:54 AM
Hey Maxxi,

Glad this tip was able to actually benefit someone else. Once I have the 2 images used for the shadow I bring them into AE and give them their own comp. In this comp it is just the 2 images and I set the "Mode" to "Classic Difference" on the top one. This should get you the alpha for the shadows. Then in the main comp I drop this above a solid black (or whatever color you want your shadows) image and set the "TrkMat" to "Luma Matte" on the solid color. This should use the alpha comp you made as an alpha for the shadow color and wa-la.

As far as the duplicating the alpha in photoshop thing goes. You can mimic that same technique in AE or you could try playing around with the "Alpha Levels" effect under effect/channels. Not sure if that would work though.

Maxxi
09-16-2009, 05:15 PM
Thanks a lot Mactoons, I was able to figure out how to do it this weekend and it worked like a charm! I was stuck with the Shadow Matte option which doesn't work well and your solution works great :)

MichaelMaehring
10-11-2009, 12:19 PM
great idea!

I was looking for a workflow for the seperate shadow pass for days (after one week, my shaveman-group membership is still pending...) - and your idea helped me solve the problem

cool man

m

CGTalk Moderation
10-11-2009, 12:19 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.