Tuesday, April 24, 2012

indirect illumination for skin shading








In this post, I will talk about applying indirect illumination to the skin shader  using ambient light and AO
Mental ray's  misss_fast_maya_skin shader is a  one of the better skin solutions.
Like its name implies, it's fast and quite easy to accomplish a quick skin look.
But if you look for more realistic results, you need to provide with indirect illumination to the skin.
First of all, you need to approach the skin shader from two different directions. direct and indirect illumination.
Most of the skin tutorials generally deal with direct illumination part only.
Sometimes direct illumination only can create a satisfactory result, especially for cartoonish look characters.
But a realistic human skin cannot go without considering the indirect illumination.
So, I'd like to show a method of doing this, not using expensive final gathering but ambient light and AO combo.
Here's a scene with a head model. A skin shader is alreay assigned to it.



I have set up two light sources. One from the front for epidermal and subdermal scatering and the other from the back for back scattering.

Area 1: This is where the direct illumination hits the sufrace.
Area 2: This is where you can see scattering.
Area 3: This is where no illumination or scattering is found.



At this point, the direct illumination and the scattering look fine. The next thing is to add some indirect illumination to get rid of dark areas ( Area3 ).
Since misss_fast_skin_maya shader has Ambient color slot, let's make use of it.
Create a Lambert material and set its color to full white and diffuse to 1.0.
Connect this material's output to Ambient color of the skin shader.
Create an ambient light. Now render.

 


Now you can clearly see that the skin shader is repecting the ambient light.
Let's apply ambient occlusion to this ambient illumination. Create a new mib_amb_occlusion texture and connect its output to the color attribute of the lambert material.


 
Now you can see AO is added to enhance the small details.


In the image above, I gave a blue tone to the ambient light to mimic illumination from a blue sky.
And the following is ambient illumination only.



So far, this simulated indirect illumination has been for the diffuse element only.
 
But the scattering colors should also be affected by this indirect illumination.
To make this possible, I connect the output of Ambient Picker material to the Ambient attribute of the lightmap shader. This is hooked up to the shading group node of the skin shader.





 
Now, this is the result. Subsurface scattering is now affected and boosted by the indirect illumination.
The following image is the scattering of the indirect illumination only.



 
This is the textured version.
In summary, the final result is ambient+diffuse+epidermal+subdermal+backscatter + specular+ reflection. ( ambient is affecting both the diffuse and the scattering and a mia material is used for the reflection only.)



3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Inpyo can you do a post for the eyes?

    ReplyDelete
  3. and how long is your render time ?

    ReplyDelete