Shader Family: Surface Material
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 shader which "projects" an image from the camera onto geometry, and the mip_matteshadow 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 Camera Map shader is used to look up a color texture based on the surface point's on-screen pixel coordinate.
[map] |
Displays the color texture map (connected in the map parameter port) to be looked up. You can Edit the image clip, or get a New image clip from file or from source. For more information about working with images, see Managing Image Sources & Clips [Texturing]. |
Multiplier |
A multiplier for the map. |
De-Gamma |
If necessary, applies an inverse gamma correction to the texture. If gamma is handled by other shaders in the render tree, or if a global gamma is applied, use a value of 1.0, which means no gamma correction is performed. |
Image Should Match Render Size |
When disabled, the texture is simply stretched to fill the scene exactly. When enabled, the lower left pixel of the map is matched exactly to the lower left rendered pixel. If the pixel size of the map is different from the pixel size of the rendering a warning is printed, but the image is still rendered although it will be cropped or padded as needed. |
Force Alpha Transparent |
Sometimes you may want the camera map applied as a background, but you still want to extract information from the alpha channel. When enabled, the alpha value is always zero. When disabled, the alpha value from the texture is used. |
Off-Screen is Environment |
This shader performs a true "reverse transform" of the shading point into raster space. While this by neccessity results in an on-screen location for the primary eye rays, this is not the case for reflections, refractions, etc. These secondary rays may hit a point on the object which is off-screen. When enabled, these rays will return the environment. When disabled, the offscreen_color parameter is returned. In either case, this color is not affected by the Multiplier or the De-Gamma options. |
Off-screen Color |
Specifies the environment color to be used for offscreen rays when Off-Screen is Environment is disabled. |
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License