This shader was kindly supplied to us by Naam. ChanLum creates an effect similar to SubSurface Scattering (see Advanced Render), the difference being that the ChanLum shader’s effect takes place on the object surface. A good comparison would be to that of a peach, whose surface is furry, somewhat blurred.
The ChanLum shader is designed for use in the Luminance channel. Simply load the shader, define a color that should be blended into the object’s color and set Mix Mode to Multiply. This shader can also be used in other channels, e.g., the Color channel – just make sure Mix Mode is always set to Multiply.
Light sources must cast shadows! No shadows - no ChanLum effect!
Of course the ChanLum shader can also be used in conjunction with a texture. Layer or Fusion can be used. In both cases, both the Mix Mode and the mixing of the ChanLum shader with the texture must be set to Multiply.
The example above illustrates what happens when a normal surface is rendered. For a point on the surface (P), the angles (a) between the surface and all light sources in the scene will be ascertained. These angles will then by analyzed by such lighting models as Phong or Oren Nayar, which will determine how shading will look based on the lighting.
Fog, for example, has no surface Normals. The renderer will only take into account the shadows cast by the light sources (when volumetric fog is used).
What the ChanLum shader does is gather dispersed light across a given surface. In order to calculate this effect quickly, the shader offsets the sampling point (S) with an offset spacing (O) along the surface normal point (P). The value of (O) defines how thick the virtual fluff layer will be.
ChamLum lets light creep around corners when using this offset. As the illustration above shows, even though the top-most surface point lies on the shadowed (left) side, it still receives light because the sample point ((S) see previous illus.) still does not lie in the shade. This is the basic concept behind ChamLum.
That‘s why ChanLum also samples to be spread out. This can be achieved in two ways: The first method (Along Normal) is illustrated above. The sample is actually an average sample of the area (S) (the rectangular space). In other words, ChanLum simply takes a set of fog samples along the surface normal, not further away from the original (offset) sample point than radius (R). This smooths the transition from bright to dark, and allows the light to creep along the surface even further.
When combining this type of lighting with a Fresnel effect (above), a fuzzy, velvet-like effect will result, that correctly attenuates for shadows.
The second method of taking a spread out sample is to measure the average sample of a spherical area (S) with radius (R). To do this properly, ChanLum needs to take random samples within this area. The result will look noisy. This method not only makes the transition smoother but also gives the object another interesting look. This is especially apparent if you increase the sample radius and add a highlight (see below).
Not only does the shading creep around corners, it seems to be generated by the inside of the object. Only where the object is a lot thicker than the sample area radius does the shading really get darker. The reason being, when the object is thinner than the radius there will be samples taken from the other side of the object, where the object doesn‘t cast a shadow. This effect, when applied well, comes close to SubSurface Scattering, though it is actually entirely different. Nevertheless, it makes for a great wax shader, and when used moderately, can be used to make surfaces like human skin much more realistic, thanks to the light creeping around corners and the softening of shading.
It is often desirable to have a seamless match of shadows and objects when adding 3D objects to live film or images. This is usually done using a dummy object (the shadowcaster). This is where the ChanLum shader comes into use. Load the shader into the shadow caster’s Transparency channel - that’s it. Only the shadow will be visible. Shadow density can be adjusted at the light source.