Bake Multiple Materials To The Same/Single Image
Table of Contents
Description
Blenders material system is quite complex, it allows for individual materials to be assigned to objects, or similarly, for multiple materials to be blended or mixed and applied. If this is done to a project intended to be used outside the Blender environment the resulting object may appear blank or just display a single image over the entire model. When this happens it means all materials, and associated images, need to be baked-down to the same or a single, ‘universal’, image. This is done by using Texture Bake. In this exercise we take a look at this process, of using the Texture Bake system to render a single texture image from multiple, blended or mixed, materials and/or images.
Note: 3D helmet model courtesy of gsavogin.
Duration: total c. 1 hr (00:15:00).
Info: 1080p.
Suitability: Beginner+.
Source: n/a.
Product ID: n/a.
Design note: additional details on using Texture Bake to render-down a set of materials to a single image;
Image Texture + UVMap Nodes
For the bake-down process to work correctly it’s important to set up a completely separate UVMap and an Image Texture node group. Here, the UVMap allows for the creation a distinct UV layout separate from any existing UV mapping, the Image Texture node, similarly separate, an independent canvas on to which existing materials/images are rendered. In practice this means objects can be textured, UV unwrapped and mapped relative to Blender, multiple images assigned or blended together for visual affect or for practical purposes, without issue.
UVMap & Unwrapping
As a general rule-of-thumb, because image bake-down uses its own UV map and mapping, models can be UV’d relative to the objects appearance in Blender. In other words, UVs can be messy, inefficient or otherwise ‘wrong’ from a technical point of view, but, so long as the end result is displayed as desired, it should not have any effect on the subsequent texture bake. With this in mind, once a new UVMap channel has been added [1], UVs should be unwrapped and laid out with respect to rendering a consolidated image as this is what the process utilises.
Important: bake quality in this context, is directly related to image size and UV fidelity – UVs not visible to the user, or of little comparative importance, should be reduced in size and/or rearranged to occupy a small footprint so as much space as possible is available for image capture and rendering.Aside: in this context UVs will need to be laid out such that individuals UVs or island don’t overlay, and that there is a clear Margin around each to prevent ‘bleed’ or margin ‘overreach’ (bake process rendering a margin over the top of another causing interference).
Helmet model has been unwrapped relative to an image that only provides orthogonal projections, requiring similarly projected UVs, which in-turn necessitates the use of texture blending to merge or match the different orientations together into a cohesive, readable, whole.
Once a new UVMap has been added [1] objects can be unwrapped with a dedicated layout that independent of any existing UV maps, and that’s optimised specifically for texture baking.Active Image
For Bake to work correctly, make sure the Image Texture node [2] added specifically for rendering to is select as the active node for each material that’s to be baked-down, this avoids accidentally rendering to the wrong image as well as the ‘black image’ error.
As with Bake generally, make sure the active Image Texture node is selected in Shading Workspace to avoid accidently overriding existing images and other Bake errors that can occur.Join Objects
Texture baking doesn’t specifically need objects to be joined together as separate objects can be edited or UV mapped as a group. Before baking however, it’s useful to Join objects – Object > Join (Ctrl + J) to prevent rendering issues, typically where the margin associated with the last object to be processed overwrites previously rendered objects. Once processed and unified image is rendered, objects can be separated as needed.
Bake can render separate objects to the same image so long as they all make reference to it, but it may be more useful to Join to avoid issue. Doing this will combine all materials and UVMap instances into the same object [3] so be sure to select the correct UVMap in Object Data Properties.
Timestamps
Times are approximate;
– 00:00 : Overview
– 02:00 : Node/Material Setup
– 04:00 : UVMap & Mapping
– 06:00 : Cycles, Prep & Bake
– 09:00 : Join vs Separate Meshes