About Baking Surface Attributes

 
 
 

You can "bake", or precompute, surface attributes and store them in a texture image file using RenderMap, or you can store them in a vertex color property using RenderVertex.

As an alternative to using RenderMap or RenderVertex, you can bake the results of a render tree to file using the Color Sampler shader.

To bake surface attributes from a high-resolution object onto a low-resolution one, see Transferring Surface Attributes (Ultimapper).

About RenderMap and RenderVertex

RenderMap and RenderVertex let you bake various surface attributes and storing them in an image file or vertex color property. For example, you can create a surface and illumination map that considers the effect of multiple materials and textures on a single polygon mesh; calculates the diffuse, specular, ambient, and shadow values; and stores them in a single texture that can be applied to the object.

The RenderMap property specifies which types of map to generate and which surface attributes to consider. By changing an option in the RenderMap property, you can store values in a vertex color property (RenderVertex) instead of a bitmapped image file — for more about vertex colors, see Vertex Colors [Scene Elements].

You can use RenderMap or RenderVertex for a multitude of tasks, including:

  • Creating a single texture from two or more blended textures.

  • Creating a 2D texture from a 3D procedural texture.

  • Blending a texture with a light effect or with shadows that are cast on an object's surface.

  • Creating an illumination map.

  • Creating maps of surface information, like normal maps, U and V basis maps, texel coverage maps, and surface position maps.

  • Creating sprites.

The following example shows how you can use RenderMap to create a single texture (which includes lighting information) out of a complex render tree.

Before RenderMap

The disembodied hand was textured using a combination of several images mixed together in a complex render tree, and lit using two infinite lights. The result is a highly detailed surface that incorporates color, bump, displacement, and lighting information, and takes a fair amount of time to render.

After RenderMap

RenderMap was used to bake everything into a single image. The resulting texture image was then applied directly to the Surface input of the hand's material node. Finally, the scene lights were deleted, producing this result — a good approximation of the hand's original appearance. Because the hand's illumination is baked into the rendermap image, you can get this result without using lights or an illumination shader.

About the Color Sampler Shader

Instead of baking surface properties, the Color Sampler shader evaluates a render tree and saves it as a texture file. This technique can have its advantages in some situations. For information about using the Color Sampler shader in general, see Baking Render Trees with the Color Sampler Shader. In particular, to know when this must be useful instead of RenderMap, see Color Sampler Shader vs. RenderMap.