Saturday, August 27, 2005

KFC's Secret Maya Recipe 3 - Multipass Skin and Relighting

Follow up to my previous post

KFC's Secret Maya Recipes 2: Doodling with Channel Lighting

Here I've started a new research on seperating pass from Misss Fast Skin Shader in Maya in to different passes and composite the passes in After FX by using the Walker Effects Plugin. Advantage of using Walker Effects is that it came with a filter called "channel lighting". I can prepare a directional RGB pass (normal pass) and use it as a lighting info input to the filter in order to add diffuse over the color pass.

Here's the passes I've used for this skin test.

Color Pass - Slapping the color map on a surface shader. No lighting in the scene was used.

Directional RGB (Diffuse Normal) Pass - This is easy. Using the original Miss shader. Took out the SSS effect, specular. Make diffuse white and emit lights from 3 direction (bump on). Basically according to 3 point setup.

Directional RGB (Specular Normal) Pass - Almost the same as above. Only difference is this time I've made the diffuse in Misss shader to black. Only leaving Specular enabled in this pass. (Bump on)

Ambient Occlusion - This is just a basic MR ambient occlusion texture applied to a surface shader. No lights needed. (Mark reported to me that using "Dirtmap" for this pass can be alot faster and it has got more option to extract nice diffuse pass and environment reflection pass)

SSS pass - This is the Misss Skin shader with black color for diffuse, no specular and only leaving the SSS effect.

Ok... basically what I did here is simple. 1st, I've put the color pass in to the composition. Then follow with a Normal (diffuse) pass. Normal is hidden because I'm just going to use it's light normal info in the "Channel Lighting" filter. It's applied on the color Pass. After this, I've put the SSS pass on top of it by using screen over the image (Level adjusted for subtlety). Next, an Ambient Occlusion pass over it with Multiply mode (Gausian Filtered).

Now I've layered another Specular layer on top of those layers mentioned above. This specular layer has got it's own composition in order to extract the specular highlights individually from the RGB. Screen mode was used on this layer.

Ok... with a little tweaking around like Color balance and etc. You'll be able to create an output almost like this with 1 light on in the channel light option (Red channel). Beautiful part is we can add/minus light in the composition on the fly. Adjusting the light intensity, Colors of light, flipping direction of light and etc can be done in real time. I bet alot of artist will be happy to see this happen straight in compositing stage rather than waiting for hours of test render in 3d application.

2nd Light enabled (blue channel). Tweaking around with intensity and lights. Notice that the back light is enabled now.

Enabling another light from Green channel. Now we've got a light from above.

Ok.... I guess that's it for now. Hope everyone of you will benefit from this tutorial. For me, this is the method I'm using on my current short film in making. It's greatly speeds up my working progress. Compare to before when I was doing all of this in single pass output with FG and etc. It took me about 3 minutes for rendering only the skin. Imagine I have to wait for 3 minutes everytime I did a little adjustment on any attribute. This is taking forever cause only adjusting the skin with the nicest looking value can easily takes me up to days. And FG to me isn't always the best solution because it will introduce artifacts and flickering in the final output.


Post a Comment

<< Home