Category: mental ray > Materials
Shader Family: Surface Material
Related Softimage shader: Matte Shadow (mip)
Often you want to include synthetic objects into an existing photographic background plate filled with real world objects. For example, adding a yet-to-be-constructed building into an empty lot, adding a virtual car onto a road, or having a virtual character walk through a scene and realistically interact with objects in the real world scene. In general, the term "synthetic" refers to additional objects to be inserted in the scene, and "real world" refers to objects that are already there.
Two main shaders exist to facilitate this work: the Camera Map (mip_cameramap) shader which "projects" an image from the camera onto geometry, and the Matte Shadow (mip_Matte_Shadow) shader which takes care of generating hold-out mattes, as well as allowing the real world objects in the photographic plate to both cast and receive shadows, as well as receive reflections and indirect light.
The Matte Shadow shader is used to create "matte objects" (objects that are used to represent existing real world objects in a photographic plate) for the following purposes:
Blocking another synthetic object from the camera's view (to allow the synthetic objects to go behind the real world object).
Allowing synthetic objects to cast shadows, occlude, and receive shadows from the real world objects.
Adding reflections of synthetic objects onto real world objects.
Allowing the interplay of indirect light between synthetic and real world objects.
In all the above mentioned cases, the Matte Shadow shader is applied to an object representing the real world object, and the synthetic object uses a traditional material.
This shader can also function as a "shadows only" shader which only shows how much in shadow a point is compared to the incoming light, but ignoring the actual amount of incoming light itself (only the occluded percentage of it).
Name |
The name of the shader node displayed in the render tree. Enter any name you like, or leave the default. |
background |
The background color. If neither of the catch_xxx options are on, this result is simply returned, including its alpha, and the shader does nothing. Otherwise it is the base color upon which all the other operations occur. When using external compositing this is generally transparent black (0 0 0 0), otherwise you would use the real world background plate mapped with the mip_cameramap shader. |
catch_shadows |
When enabled, allows other objects to cast shadows on this object. |
shadows |
The color of the shadows. When shadows are detected, a blend between background and shadows is performed depending on how much "in shadow" the point is. |
ambient |
Sets a "base light level" by raising the lowest "in shadow" level. For example, if this is 0.2, 0.2, 0.2 the darkest shadow produced will be a 20 percent blend of background to a 80 percent blend of shadow (unless ambient occlusion is enabled). |
no_self_shadows |
When enabled, causes objects using the Matte Shadow shader not to receive shadows from any other such object. |
use_dot_nl |
Specifies whether or not the angle to the light is considered when calculating the incoming amount of light. |
colored_shadows |
If the Shadow Coloring Factor is 0.0, all shadows are cast in grayscale. If it is set to 1.0, the shadows have full color. For example, if the surface is lit by one red and one green light, the red light will have a green shadow, and the green light will have a red shadow. |
ao_on |
When enabled, a built-in ambient occlusion is applied. The ambient occlusion respects the No Self-Shadowing option and will not cause ambient occlusion from objects with the same material as itself. |
ao_dark |
Specifies how dark the AO shadows will be. The default black is generally adequate, but a lighter color will cause a less pronounced shading effect. |
ao_samples |
The number of ambient occlusion rays that are shot into the scene. |
ao_distance |
Sets an upper limit on the distance ambient occlusion rays can travel. If the value is set to zero, the rays reach infinitely far (no limit). Short rays increase performance dramatically, but localize the ambient occlusion effect. |
catch_reflections |
Enables reflections. |
refl_color |
A multiplier for reflections. Note that the alpha value of this color is important in that the reflections will influence the alpha by this amount. In some cases the reflections may need to be subtractive, in which case refl_subtractive is used. |
refl_subtractive |
Subtractive reflection color. |
refl_samples |
Sets the number of glossy reflection samples. If it is set to zero, mirror reflections are used. |
refl_glossiness |
Sets a Ward glossiness for reflections. |
refl_max_dist |
Limits the reach of glossy reflection rays. If the maximum distance is set to 0.0, the reach of the glossy reflection rays is infinite. For values greater than 0.0, the reach of the glossy reflection rays is limited to this distance, and the color of the reflection is faded toward the environment color as the length of the ray approaches this distance. Use Maximum Distance to improve performance and reduce excessive noise caused by high-contrast objects in the distance. |
refl_falloff |
The rate for fading into the environment. The default of 2.0 means that the falloff is by distance squared. A value of 3.0 means distance cubed, and so on. This parameter has no effect if Maximum Distance is 0.0. |
catch_indirect |
When on, indirect light is gathered and scaled by the indirect color (which one generally sets to the same as the background color, thereby treating the background color as a reflectance value for the indirect light). |
indirect |
The indirect light color. |
multiple_outputs |
When on, the shader writes to the multiple output ports. When off, the shader only writes to the main "result" output port. |
catch_illuminators |
Enables the use of illuminators to light the scene. |
Creates an illuminators list to specifiy which lights should produce the effect.
Note that the difference between lights and illuminators is that the lights are only used to cause shadows on the background, whereas the illuminators are used to throw actual light on it. This means that the lights list should contain lights that are already present in the background plate, and the illuminators list contains any additional lights introduced by a CG element, such as the headlights of a CG car.
additional_color |
A color input simply added to the result. |
mode |
The mode selector for the light list. For more information, see Setting the Light List Mode [Direct Illumination]. |
Creates a light list to specifiy which lights should produce the effect. For more information, see Using Light Lists [Direct Illumination].
The mip_matteshadow shader has multiple outputs. All outputs are as "raw" as possible to be maximally useful as layers in post production. For example, to ensure that the reflections have not been multiplied with the reflection color, and so on.
When multiple_outputs is enabled, the shader outputs the following values:
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License