How to map a material on a shadowed part of an object in Maya |
All of you knows how to map a material into a shadow, but do you know how to map a shader into a shadowed part of an object... (this is slightly different from simply mapping the shadow color) To achieve this, you suppose you already have some objects and at least one light (casting shadows preferably). In the hypershade, select the shader you want to map, the light you want the shadows to be mapped, and click on the 'Show Up and Downstream connection' icon to visualize them properly. Now create a blendColor and a surface shader. Drag the lightShape to the blendColor. The connection editor shows up. Now go to lightData, click on it to pop the sub-menu. You
see that several parameters are shown. The one which interests us is the
lightShadowFraction. Connect the lightShadowFraction in the blender
of the blendColor.
Once
this done, you just have to connect the shader of your objects in the
color1 of your blendColor (outColor -> color1), and the shader of the
shadows in the color2 (outColor -> color2), then connect the outValue
of the blendColor in the color attribute of the surface shader.
Render
the image, you'll see that your shadows AND the shadowed areas of your
objects are mapped. You can play with the material attributes (ambient,
or incandescence) to increase the 'luminosity' of the shadow...
mapped shadowed areas + shadows (with lighShadowFraction)
With the same method, you can make the same kind connections with other attributes (transparency, incandescence, ...) Your imagination is your limit! :-) |
Emmanuel Campin - (c) 2000 |