Mesh Baker

bakerWithRockeCube-800x451

If you care about performance… combine meshes, combine meshes, combine meshes!
Mesh Baker is the ultimate mesh-combine tool, combining many meshes into one big mesh, as well as combining the textures on those objects into texture atlases and texture arrays. Mesh Baker is a powerful toolkit of flexible non-destructive workflows for optimizing props and scenes.

    • Unity’s best known optimization tool
    • Five-star support and updates since 2012

Objects to be combined do not need the same material
or even the same shader:

  • Works with built-in and custom shaders
  • Texture atlases are automatically generated
  • Supports URP, HDRP, Standard pipelines
  • Generate either Texture Atlases or Texture Arrays
  • UVs, Normals & Tangents automatically adjusted
  • Tiled textures can have tiling baked
  • Only parts of source textures (atlases) used by source meshes are copied to the target atlas
  • Can map multiple materials to a combined mesh with multiple materials
  • Create atlases for materials that use color tints
  • Can modify prop prefabs to use atlas materials or combine scene meshes and modify them to use atlases
  • Can create and swap parts of skinned meshes at runtime. Change clothing, add wounds, add armor.
  • Can combine many SkinnedMeshRenderers and MeshRenderers into a single SkinnedMeshRenderer
  • Can bake blend shapes of skinned meshes
  • Animations on bones remain intact
  • Can customize SkinnedMeshRenerers by adding MeshRenderer objects (hats, glasses, weapons)
  • Can generate lightmapping UVs so the combined mesh can be lightmapped
  • Control over which channels in the combined mesh are generated
  • Non-destructrive workflow. Does not touch source assets (creates new combined mesh and texture atlases)
  • Can bake into multiple combined meshes if the combined mesh would be very large.
  • Choose between five different texture packers
  • No scripting required
  • Easy to integrate into existing workflow
  • Adjust meshes and prefabs so they can share a material (take advantage of static/dynamic batching)
  • Clustering tools to easily group meshes that are close in a large scene
  • Robust, fast, mature, documented API with examples:
    • Bake materials and meshes at runtime
    • Runtime add, delete and update update objects in a combined mesh
    • Use the API in the editor to integrate meshbaker into your workflow

Use Mesh Baker to:

  • Combine meshes in your scene into one big mesh (meshes can be imported from any modeling program)
  • Easily create materials that can be shared by multiple meshes.
  • Easily create Texture Arrays and modify meshes to use them.
  • Fix models and prop prefabs so they can share a material and take advantage of static/dynamic batching
  • Customize SkinnedMeshRenderer characters (add weapons, hats, armor, clothes)
  • Combine several SkinnedMeshRenderers into one
  • Combine many dynamic low poly regular meshes into a single skinned mesh
  • Fix or adjust scaling, rotation and translation in imported meshes
  • Create a color-pallet-atlas for a groups of different props that use only color tints so that they share a single material

Limitations:

  • Texture properties in the result material will be combined into atlases, but the other properties can’t be combined. There will only be one master set of non-texture properties that applies to the whole combined mesh.
  • Baking tiling can produce large atlases or exceed the maximum size of the atlas.
  • Some meshes are difficult or impossible to combine:
    • If meshes have channels (colors, or tangents) which others do not.
    • Submeshes that share vertices and have UVs outside the range 0,0..1,1
  • If you want to combine meshes and preserve existing lightmapping, then source meshes must use the same lightmap.
  • Mesh Baker cannot combine Skinned Meshes that have “Optimize Game Object” checked in the import settings (Rig tab). This is because the bones on these objects are not exposed to be combined.

Mesh Baker Tutorial Videos

How To Use Mesh Baker
Basic usage:

  1. Create a new MeshBaker object in your scene under the Game.
  2. GameObject -> Create Other -> Mesh Baker -> Material And Mesh Baker
  3. Create empty assets for result material.
  4. Select shader on result material. Meshbaker will build a texture atlas for each texture property in this shader.
  5. Add objects to combine. For best results, these should use the same shader as result material, but they don’t have to. Use the provided tools to make this fast and easy.
  6. Bake combined material.
  7. Bake meshes.
  8. Look at warnings / errors in the console. Decide if action needs to be taken.
  9. (optional) Disable renderers in source objects.

Once this has been done you can remove the MeshBaker object from the scene or keep it around for easy re-baking. If anything changes in any of your source models or textures just bake again to regenerate the combined mesh and texture atlases.

Evaluation Version

A free evaluation version of Mesh Baker is available.

The evaluation version uses DLLs (full version is a full source code release)

Limitations of evaluation version:

  • Only works with Diffuse and Bump Diffuse shaders
  • Cannot save combined meshes or generate prefabs
  • Cannot Bake Mesh Assets In Place
  • Uses DLLs

The Free version is not updated as frequently, and may be several iterations behind the full version.

Purchase

  • Please note that Mesh Baker requires Unity 4.6 or higher. It has not been tested in earlier versions of Unity.
  • Mesh Baker is available in the Unity Asset Store
  • Free updates are included with your purchase as well as full support via email and forums

Links

Mesh Baker was created by Ian Deane. Other assets by Ian Deane include:

Mesh Baker is available in the Unity Asset Store