Baking

« Back to Glossary Index

What is Baking?

Baking is a technique used in game development and 3D modeling to pre-process certain elements in a game scene so that they do not have to be processed in real-time during gameplay. This helps optimize game performance and reduce load times.

Big Idea: "Baking" : A baking 3d model
Big Idea: “Baking” : Source: CG Gookie

Some common uses of baking in games include:

  • Lighting – The lighting in a scene is baked into textures through a process called lightmap baking. This pre-computes how lights interact with different surfaces in the scene so the full lighting does not have to be calculated in real-time. This can significantly improve rendering speeds.
  • Physics – Physics interactions like cloth, water, and soft body animations can be baked into animations or preset movements rather than calculated live. This allows more realistic physics without a performance hit.
  • Textures – Details like ambient occlusion, dust and dirt, or damage can be baked into texture maps for objects rather than rendered live. This adds visual complexity while being efficient.
  • Navigation meshes – The navigable areas and paths for AI characters can be pre-calculated and stored as navigation meshes to optimize pathfinding.
  • Shadows – Static shadows from lighting can be baked into shadow maps rather than re-rendered every frame.

The baking process typically happens during game development, not in real-time during gameplay. The preprocessed data is then optimized and stored in game assets ready for use in-game. Overall, baking allows developers to include complex visual effects and physics that would otherwise be too performance-intensive in real-time.

Best Practices:

  • Bake lighting as much as possible – Pre-baked global illumination saves significant rendering time versus dynamic lighting. Use dynamic only when needed.
  • Bake high-poly models to normal maps – Sculpt high-detail models, then bake to normal/displacement maps applied to low-poly models. Retains detail without high poly count.
  • Use texture atlases – Combine many small textures into larger atlases to reduce draw calls. Improve performance.
  • Bake in moderation – Don’t overbake everything or risk losing dynamic behavior. Focus on biggest performance drains.

Case Studies:

  • Assassin’s Creed Odyssey – Used baked global illumination and occlusion for realistic dynamic lighting at scale. Baked cloth physics onto animated characters.
  • Battlefield 1 – Expensive volumetric lighting was pre-baked into light maps to allow it to be used extensively.
  • Final Fantasy XV – Pre-baked physics simulations of hair, cloth, liquids into animations to enhance visuals.

Baking Examples:

  • Baking in the creases, wrinkles, and cloth physics on a character’s costume so it moves realistically without simulations.
  • Lightmaps that bake in realistic sun rays filtering through tree branches in a forest scene.
  • Pre-baking a smoke plume rising from a chimney including all the particle and turbulence effects.
  • Baking the lighting and shadows across a landscape from the sun’s angles at different times of day for realistic dynamic daylight.
  • Using baked ambient occlusion textures to capture how each object occludes nearby lights without real-time rendering.

Baking process for game development:

  1. Model High-Poly Assets – Create 3D models with a very high polygon count to achieve detailed textures and normals.
  2. UV Unwrap – UV mapping unwraps a 3D model’s surface so it can be laid flat for texturing and baking. Good UV layouts maximize use of texture space.
  3. Create Texture Maps – Manually paint detailed color, roughness, metallic, and other maps based on the high-poly models.
  4. Bake Normals – The high-poly model is used like a virtual bump map to calculate normal and ambient occlusion maps for the low-poly version.
  5. Bake Lighting – Use global illumination rendering to calculate how light bounces and radiates within the scene. Store as lightmaps.
  6. Bake Physics – Simulate physics like cloth, water, and hair movement. Render out as animations.
  7. Combine Texture Maps – Merge baked maps like normals, lighting, occlusion into complete texture sets for each model.
  8. Export Textures & Assets – Export final models, UVs, and texture maps to be assembled in-game engine.
  9. Load & Render – Load models, textures, navigation maps, animations etc. into game engine scene to be rendered in real-time.
  10. Optimize – Profile game runtime performance. Optimize assets and baking as needed to hit performance targets.

The goal is to shift as much intensive rendering and physics operations as possible from real-time to the baking stage for optimized performance.

Baking Video References: Texture Baking

Source Youtube

You can find more interesting definitions on our Glossary Page and more interesting topics about game development on our blog

« Back to Glossary Index