Baking to textures and vertices

 
 
 

You can bake to textures and vertices in mental ray for Maya.

NoteSelecting a surface (A) and baking it, then selecting another surface (B) and baking it is not the same as selecting two surfaces (A and B) and baking them together.

This is more noticeable with global illumination, where objects bounce and absorb the light of other objects in a scene. Once an object is baked it’s assigned a surface shader and it no longer reflects light within the scene.

Baking to textures

When you bake to textures (as opposed to vertices) an image file called a light map is created. You can use this light map, which contains the material(s), texture(s), and illumination of the baked objects, as a file texture to apply to the object.

Find this light map image file (by default) in the following location: Maya\projects\mentalray\lightMap

NoteOne core/processor is used to bake each map.

For example, if you have four cores and five objects in your scene, four maps will be generated at one time and the fifth map generated when a processor/core becomes free.

You can also use network rendering to create light maps. However, remote machines only start to contribute to the baking when the number of light maps exceeds the number of processors/cores on your machine.

Baking to vertices

When you bake to vertices (as opposed to a texture) data is created and automatically stored in the polygon mesh’s vertex colors.

A sample can either be stored as color-per-vertex, or used to displace the position of a vertex.

You can export this data as a texture map.

Baking Occlusion

Baking occlusion (using the Occlusion Color Mode inTexture Bake Set or Vertex Bake Set) is controlled by the corresponding attributes in the Texture Bake Set or Vertex Bake Set.

When baking to a texture, occlusion is also computed differently depending on whether Final Gathering is enabled. When final gathering is disabled, occlusion is computed for every pixel in the texture. When it is enabled, occlusion is precomputed at a few selected pixels and then interpolated.

The first method (where final gathering is disabled) is slower by comparison; however, it captures small details in your scene. The interpolation method (where final gathering is enabled) is usually faster and produces smoother images. It is particularly useful for baking textures on low-res poly meshes.

Related topics