How to Bake Textures and Lighting in Blender
Baking lighting and procedural materials into static UV texture maps in Blender allows you to optimize complex visual assets for real-time rendering in Unity or Unreal Engine. This process converts procedural node setups, complex lighting interactions, shadows, and ambient occlusion into standard image maps (such as Albedo, Normal, or Combined maps). By using the Cycles render engine and properly unwrapped UVs, you can bake high-fidelity visuals into lightweight assets ready for game engine import.
1. Prepare Model UVs
Before baking, your 3D mesh must have a non-overlapping UV map.
- Select your object in Blender and switch to Edit
Mode (
Tab). - Open the UV Editor alongside the 3D Viewport.
- Select all faces (
A), pressU, and select Smart UV Project or manually unwrap the mesh using marked seams. - Ensure no UV islands overlap, and give them adequate margin (e.g.,
0.01to0.02) to prevent texture bleeding.
2. Create the Target Texture Node
Blender requires a designated image node to store the baked data.
- Switch to the Shading workspace.
- In the Shader Editor, ensure the material you want to bake is active.
- Press
Shift + A, go to Texture, and select Image Texture. - Click New on the node.
- Name the texture (e.g.,
T_MeshName_Baked), set the desired resolution (typically2048x2048or4096x4096), and uncheck 32-bit Float unless working with HDR maps. - Keep this Image Texture node selected (active), but do not connect its output to anything.
- If your object uses multiple materials, copy and paste this identical Image Texture node into every material slot on the object, keeping it selected in each.
3. Configure the Bake Settings
Baking is only supported natively through the Cycles render engine.
- Go to the Render Properties tab in the Properties panel.
- Set the Render Engine to Cycles (switch Device to GPU Compute if available).
- Under the Sampling section, adjust the Render Samples (32 to 128 samples is usually sufficient for baking).
- Scroll down and expand the Bake section.
- Choose your Bake Type:
- Combined: Bakes all material properties, direct lighting, indirect lighting, and shadows into a single map (ideal for mobile or unlit shaders in Unity/Unreal).
- Diffuse: Bakes base color. Under Contributions, disable Direct and Indirect if you only want an unlit Albedo/Base Color texture.
- Roughness / Normal / Ambient Occlusion: Use these individual passes if you are assembling a full PBR material set.
- Set the Margin (padding) between 4px and 16px to prevent black edges around UV borders.
4. Execute the Bake
- Ensure your target mesh is selected in the 3D Viewport.
- Ensure the target Image Texture node is active/highlighted in the Shader Editor.
- In the Render Properties under Bake, click the Bake button.
- Monitor the progress bar at the bottom of the Blender interface.
5. Save the Baked Image
Blender does not automatically save baked textures to disk.
- Switch to the Image Editor.
- Select your baked texture from the image dropdown list.
- Go to Image > Save As... in the top menu.
- Choose a file format like PNG (16-bit for normal/displacement, 8-bit for color) or TGA, and save it to your project folder.
6. Import into Unity or Unreal Engine
Unity
- Drag the exported image and your 3D model (
.fbxor.obj) into the Unity Project panel. - Create a new Material using the Standard or Universal Render Pipeline (URP) Lit shader.
- Assign the baked texture to the Base Map / Albedo slot. If you baked a Combined map with lighting, you can use an Unlit/Texture shader to maximize performance.
Unreal Engine
- Import your mesh and baked texture into the Content Browser.
- Open your texture settings: if baking normal maps or data masks (like roughness), uncheck sRGB. For color/combined maps, leave sRGB checked.
- Create a Material, drag the texture into the Material Graph, and connect the RGB output to Base Color (or Emissive Color if using pre-baked lighting on an Unlit material).