POST UPDATED 31/12/2013 - INCLUDES SETTINGS FOR MENTAL RAY MIA_MATERIAL
Some time ago I figured out it's possible to make a serviceable 'thickness' or 'gummi' type compositing/utility shader in Vray using the Vray Mtl and it's 'Fog' parameter. At my current workplace we've used in the past a 3rd party shader from Binary Alchemy (the RayLength shader I believe), in order to compliment subsurface scattering at the compositing stage via a thickness pass. This was explained to me by my boss at the time as a dirty trick, which nevertheless had the desired effect of making our CG food look more 'foodlike' and appetising. It's a strange but potentially useful technique, which I'll cover in a later post. For now let's just focus on making the shader. The basic idea is also translatable to a MR mia_material version, using the 'Max Distance' instead of the Vray 'Fog' parameters.
Basically, a thickness shader is one which is able to approximate the interior thickness of an object. A thickness pass would describe in greyscale values the relative thickness of something, ie- whiter pixels representing thicker areas and darker pixels thinner areas. As you can see in the video above, the dragon's tail, tip of the tongue, horns etc, are all darker in colour while the belly, legs and head are the thickest, lightest areas. When setting up the shader, we will need to invert these values however, and then re-invert back in our compositing package later on.
Setting up the shader/pass...
Thickness pass (values inverted from render) - Mental Ray
Some time ago I figured out it's possible to make a serviceable 'thickness' or 'gummi' type compositing/utility shader in Vray using the Vray Mtl and it's 'Fog' parameter. At my current workplace we've used in the past a 3rd party shader from Binary Alchemy (the RayLength shader I believe), in order to compliment subsurface scattering at the compositing stage via a thickness pass. This was explained to me by my boss at the time as a dirty trick, which nevertheless had the desired effect of making our CG food look more 'foodlike' and appetising. It's a strange but potentially useful technique, which I'll cover in a later post. For now let's just focus on making the shader. The basic idea is also translatable to a MR mia_material version, using the 'Max Distance' instead of the Vray 'Fog' parameters.
Basically, a thickness shader is one which is able to approximate the interior thickness of an object. A thickness pass would describe in greyscale values the relative thickness of something, ie- whiter pixels representing thicker areas and darker pixels thinner areas. As you can see in the video above, the dragon's tail, tip of the tongue, horns etc, are all darker in colour while the belly, legs and head are the thickest, lightest areas. When setting up the shader, we will need to invert these values however, and then re-invert back in our compositing package later on.
Setting up the shader/pass...