Category: Lightmaps
Shader Type: Lightmap
Output: Lightmap
The Color Sampler shader is a lightmap shader that samples an object’s surface and writes the result to a texture file. This is conceptually similar to RenderMap’s surface color map, but works in a different way.
Rather than using a virtual camera to sample an object’s surface from a specified distance, the color sampler shader evaluates the object’s render tree directly. Whatever portion of the render tree is connected to the color sampler’s input port is computed and written to a texture file.
Note that an Image Clip Property Editor is appended to this property editor for the lightmap image. Also appended is the Writable Image Source Property Editor, where you can define the output options for the lightmap image.
|
Texture Space |
Defines the texture space used to compute the lightmap image. The projection can be defined per object or to all objects in the selection. Object Selection: When multiple objects are selected, defines whether changes are applied to all objects or a specific one. This control updates automatically as you select objects in the scene, as long as the property editor is not locked. Property Selection: Lets you choose a Texture Support. If no texture support has been defined, you can create one by clicking New. If a texture projection is already defined, you can edit it by clicking Edit. Edit: Opens the Texture Support property page for the defined texture projection. New: Defines the new texture projection to be created. You can choose from the following: • UV: Projects the texture along the U and V. • Planar XY: Projects the texture on X and Y coordinates only. • Planar XZ: Projects the texture on X and Z coordinates only. • Planar YZ: Projects the texture on Y and Z coordinates only. • Cylindrical: Projects the texture as though it is a cylinder wrapped around an object. • Spherical: Surrounds the object with a spherical mapping across the whole surface with some distortion. • Spatial: The texture is centered on the scene’s origin. • Cubic: Applies the texture onto the object by first assigning the object’s polygons to faces of a cube, and then projecting the texture onto each face by default. The layout of a cubic projection can be completely customized using the options in the Texture Support property editor. • Camera Projection: The texture is mapped relative to the camera’s center. In this coordinate system, the camera is the center of the “world,” with an up vector, looking toward the negative Z axis. The result resembles an image projected from a camera. The texture will move with the camera and will be affected by any scaling, rotation, and translation. • Unique Uvs (Polymesh): Applies a texture to polygon objects by assigning each polygon’s UV coordinates to its own distinct piece of the texture so that no two polygons’ coordinates overlap each other. • Advanced: Opens the Create Texture Support property page from which you can explicitly define a texture projection. |
To generate a lightmap image, this shader must be connected to the Material node’s Lightmap port and the branch of the render tree containing the shader information you wish to sample must be connected to this shader’s input port.
Once you’ve made these connections, rendering the scene using the render preview tool, the render region, or a full sequence render will generate the lightmap image.
The image can then be used to texture the object via an Image shader.
Autodesk Softimage v.7.5