Baking to Texture

Baking to texture is the process of approximating complex surface effects as simple 2D bitmaps and then assigning them to objects. By creating a library of 'baked' texture maps, 3D visual effects on objects can be rendered in real time without having to recalculate elements such as materials, lighting, and shadows. Baking to texture is integral in 3D applications such as video game environments, which demand high performance and minimal visual lag in order to create a compelling experience.

About Baking to Texture

Advantages over Legacy Render to Texture and Render to Surface Maps:

Available Maps

A list of maps available from installed renderers is shown on the left pane of the window, along with supported surface maps.

Common Maps

These pre-configured maps help to streamline frequent baking operations:
  • Ambient Occlusion: bakes a map that shows how much of the surface is exposed to ambient lighting.
  • Beauty: bakes the complete shaded surface as rendered by the current renderer.
  • Color: bakes the raw color of the material applied to the object.
  • Emissive: bakes the Emissive component of the object's material.
  • Material ID: creates a color map where each material ID receives a unique color.
  • Material Input: bakes any selected input of the object's material.
  • Metalness: bakes the Metalness component of the object's material.
  • Normal: when using a Projection modifier, bakes the normals from a high-resolution mesh to a low-resolution mesh.
  • Opacity: bakes the full and partial opacity based on the object's contour and material opacity.
  • Roughness: bakes the Roughness component of the object's material.
  • Rounded Corners: bakes a normal map that creates rounded corners on any sharp edges of the object.
  • Vertex Color: bakes the vertex color channel to a map.

More Bake Elements

You can also choose from additional maps offered by the available renderers.

For most baking operations, Arnold for Common Maps offers the most frequently-used maps and the best performance especially when baking metalness, roughness, AO, and global illumination. To change renderer, press F10 to open the Render Setup window.

Set Ray Depth and Sampling to the minimal values required when baking a map. Remember to check the renderer's filtering settings to avoid producing blurry maps.

In addition to the common maps, Scanline and Arnold offer additional bake elements such as:

Scanline

  • Complete: provides a beauty pass that contains all the surfaces properties visible at render time.
  • Blend: behaves like a Complete map except you can deactivate components separately in its options.
  • Diffuse: bakes the diffuse color of the material on the object.
  • Height: bakes a grayscale image to define the height of a high-resolution mesh compared to the low-resolution mesh.
  • Lighting: bakes light maps calculated from scene lighting.
  • Normals: bakes either the normals of the current object or the normal maps from high resolution to low resolution using a projection.
  • Override: selects any map from the Map Browser to use as an override when baking a map for the object. Override maps can be used for Material ID's, vertex colors, curvature, and any other map that is part of the Material Browser. No material is required for this map.

Arnold

  • Ambient Occlusion: darkens details and angles on a mesh, used for dirt maps, cavity maps and AO maps.
  • Arnold_albedo, Arnold_diffuse, and Diffuse: these three maps each bake the color of the material on the object.
  • Arnold_map_override: selects any map from the Map Browser to use as an override when baking a map for the object. Override maps can be used for Material ID's, vertex colors, curvature, and any other map that is part of the Material Browser. No material is required for this map.
  • Arnold_metalness: bakes the metalness level of the material on the object. Metalness maps can be used in a PBR shader.
  • Arnold_RGBA and Complete: these two maps provide a beauty pass that contains all the surfaces properties visible at render time.
  • Arnold_roughness: bakes the roughness level of the material on the object. Roughness maps can be used in a PBR shader.
  • Lighting: bakes light maps calculated from global illumination.
  • Normals: bakes either the normals of the current object or the normal maps from high resolution to low resolution using a projection.
    Note: Do not use Arnold_N map for baking normals in Arnold. Use the Normals map.

Editable Poly Surface Maps

These maps are not rendered but rather acquired from the edit poly interface. In previous versions of Max, these maps were accessed through the Surface Maps dialog, and leveraged the edit poly features in order to generate them. Surface maps can be generated very quickly and as a result are popular in video game pipelines. The quality level however can be too low for other types of productions.
Note: These maps will only work on collapsed Editable Poly objects.

Compatible Objects

Only objects with UV coordinates such as primitives, editable mesh, and editable poly objects can be baked to texture. Objects without UV coordinates such as lights, cameras, and biped objects will produce an error when a baking operation is initiated.

Interface

Show/Hide Maps (top left)
Shows or hides the list of available maps, shown in a pane at the left of the window.
Remove Selected Maps (top right)
Removes the selected map(s) from the queue.
Type to Filter field
Enter characters to filter the available map list.
Map list
Shows the list of maps available for selection. Use Ctrl and Shift to select multiple maps. The list of maps is organized by installed renderers with baking elements.
Add Maps to Selected Objects (bottom left)
Adds selected maps to the currently-selected objects in the scene or the baking list.
Note: The button is disabled when no object or no map is currently selected.

Baking List

The Baking list shows all currently-added objects and their associated maps along with their various controls for output. You can select multiple items at once using Ctrl and Shift, or double-click on the object's name to select all the maps of this object. Once you have multiple items selected, if you update a setting in a column, all selected items will be updated.

Object/Maps
Shows the selected objects and the maps to be outputted. Click the icon to disable baking a map. The icon shows a previously-disabled map while the icon shows that the selected map is not renderable with the currently active renderer.
Projected From

Selects the object to be used to render the map. For example, a higher-resolution object can be selected whose surface properties such as normals, displacement or another map will then be used. This operation automatically applies a Projection modifier to the object if one was not added before launching Bake To Texture. See the Projection Modifier topic (link at bottom) for more information.

  • Self: uses the map's parent object to render
  • Projection: uses the reference geometry defined by the selected projection modifier to render
  • Pick from Scene:lets you pick a single object in the viewport to automatically create a projection setup using the object as the reference geometry
  • Pick from List: lets you pick multiple objects from the scene's object list to automatically create a projection setup using the objects as reference geometry.

Click to open the Projection Options dialog (see section below) where you can select the projection method and adjust options for ray hits and misses.

UV Channel
Sets the UV Channel used for baking the map.

Click to open the Configure UV Channel dialog where you can set options for baking multi-tile UVs using either UDIM, MudBox, or ZBrush patterns.

Image Size
Sets the width and height of the baked image. To change the image size to a non-square ratio, click the icon to unlock and select new values from the drop down lists.
Padding
Sets the amount in pixels are allowed to bleed past the edges in the flattened (unwrapped) texture. Increase the value if the baked texture shows visible seams in shaded viewports and/or renderings.
Bg
Click to set a custom background color for the output file. If a background color is not applicable to the file, a gray square is shown.
Note: If the selected file type has an alpha channel enabled, the resulting background will be transparent and no color will be used.
File Name
Shows the name of the file to be output. Click the field to input a custom file name.
File Type
Shows the type of the file to be output. You can select another image file format from the drop-down list or click the icon to view options for the file type.
Output To
Sets the destination of the baked maps. You can either simply save the resulting files or prepare them so they can also be viewed in the scene. To be viewed in a scene, the baked maps need to be assigned to the given object's material.

The options at the object level are:

  • Files Only: bakes to files only. If you choose Files Only at the object level, all maps for this object will be rendered as files only.
  • Original material: the output is connected to the original material. Since baked bitmaps are connected directly to the material currently on the object, this is a destructive workflow
  • Duplicate Original material: keeps the original material of the object for a non-destructive workflow. To do this, a Shell material is assigned to the object, with inputs for both the baked and original materials. The original material and the baked material are of the same type (for example, Physical or Standard (legacy)).
  • Create new material: opens the Material browser where you can choose a material type. When baked, a material of the selected type will be created and connected to a Shell material as the baked material. The baked maps can be connected to this new material. This workflow is also non-destructive.
Note: If you have not assigned a material to your object, only the File Only and Create New Material options will be shown.

The options at the map level are:

  • File Only: bakes to file only. The baked map is not assigned to any material input.
  • Material Input: bakes to one of the inputs of your material (either a duplicate of the original, the original, or a new material). Only one map can be connected to a material input at a time. Once a material input is used by a map, this input is no longer available for other maps and will be grayed out.

When baking multiple UV files and choosing to output to a material, a MultiTile map will be created referencing the resulting image tiles.

When baking an animated map and choosing to output to a material, a Bitmap map will be created referencing the resulting Image File Sequence (IFL).

Map Options

Shows the options for baking the selected map, if available. Most settings are self-explanatory however some useful map options include:

Normals

Normal Map Space
Sets the coordinate system to be used for normals: either World, Screen, Object (local), or Tangent space.
Sync With
Syncs normal display based on a specific software you want to export to or a custom setting.
X (Red)
Sets the X normals to either left or right.
Y (Green)
Sets the Y normals to either up or down.
MikkT for Tangent (Tangent space only)
When enabled, uses the MikkT algorithm to calculate tangent space. This setting can help correct unsightly hard edges when an object is shaded.
Note: For MikkT to be displayed correctly in the viewport, you must also set the option under Customize > Preferences > General > Normal Bump Mode.
Calculate bitangent per pixel (Tangent space only)
When enabled, calculates bitangents per pixel rather than per vertex. Some applications such as Unity have this option disabled however if you are having display issues in other applications, try enabling or disabling this option.
Note: For this mode to be displayed correctly in the viewport, you must also set the option under Customize > Preferences > General > Normal Bump Mode.
Output into Normal Bump
Generate a normal bump node to connect the normal map to the material's input.

Output Path

Shows the current output path for baking maps. To change the path, click ... to the right to choose another folder.

Override/Arnold_map_override

This map is useful for creating a material ID, blended box map, vertex color, OSL map, or any other map that is not part of the object's material. You can create as many Override maps as you need for any given object.

Bake Options group

Rendered Frame Window
Enable to display the results in a rendered frame window as each individual file is baked.
Bake
Starts the baking operation using the currently-defined outputs and settings.

The Baking Progress dialog opens, showing the current status of each file in the queue. You can click Cancel to stop the operations in progress or click Close to close the dialog when baking is completed. You can also enable the option to automatically close the dialog when done.

If there are existing files found, you will be prompted to overwrite the files.

In the Rendered Frame window, the current progress of the full RGBA bake will be shown. Click RGBA to select another baking map to view from the drop-down menu. Once a map is finished baking, you can click a link in the Baking Progress window to display the final result.

Projection Options dialog

Method group

Cage
Uses a cage for the projection. Cages are a non-renderable type of sub-object used as surfaces for projecting normals. A cage duplicates the position and shape of the low-resolution object. For more information, see the Projection Modifier topic (link at bottom).
Raytrace (From Vertex Normals)
When enabled, ray-traces normals between the source and target objects. To do this, the objects must be perfectly aligned in world space. When you view both high-resolution and low-resolution objects in the viewports, they must line up with each other exactly. There are no special requirements for the mapping coordinates of the high-resolution objects.
Max Ray Distance
Sets the maximum distance for raytracing. Any parts of the surface beyond the value are considered as missed when raytraced. Use the spinner to set the desired distance.

You can also the eyedropper to pick the maximum distance by picking and dragging in a viewport. With the button enabled, click at the desired height. The maximum value is updated based on your selection.

UV Match

When enabled, normals are calculated by matching the target object's local UV coordinates to those of the source. To do this, the UV coordinates for the objects must be perfectly aligned. If you look at the objects using the Edit UVWs dialog of the Unwrap UVW modifier, the low-res and high-res objects must be lined up exactly. The high-resolution object must also have mapping coordinates on the same map channel used for the low-resolution object.

Typically, the high-resolution object will have an Unwrap UVW modifier assigned, but this is not required.

When using this option, the high-resolution object does not need to be in the same physical location as the low-resolution object.

Resolve Hit group

These options are useful with scenes containing semi-transparent objects, where more than one hit can occur for each ray.

Furthest
Uses the closest object in the case of multiple hits.
Closest
Uses the closest object in the case of multiple hits.
Hit Only Matching Material ID
When enabled, the projection occurs only between material IDs that match. This option enables a single map to contain normal bump projections from different high-res source geometry.

Ray Miss Color group

Sets what to bake if the projection method doesn't find any surface to bake from the reference geometry.

Background
Bakes the background color set in the Bake To texture window.
Self (Color/Normals)
Uses the map's parent object as reference geometry for the map to bake.
Use Color For Diagnostic
Bakes the selected color. This is useful for differentiating trouble areas from the background color of the map. Click the color picker to select another color.