Manual Bake and Restore
This page is for people using a manual Bake for the first time. Most people never need to read it. It takes about 5 minutes.
First: most distributions do not need this
| Situation | What to use |
|---|---|
| VRChat upload | Automatic optimization. Nothing to do |
| WARUDO mod build | Automatic optimization. Nothing to do |
| General Player build | Automatic optimization. Nothing to do |
| Handing over baked shader and material assets as files | Manual Bake |
| Comparing and approving optimization results in the scene | Manual Bake |
| An external pipeline that cannot use the automatic hooks | Manual Bake |
Automatic optimization changes things only during the build and reverts them. A manual Bake creates new assets and actually changes the Renderer slots.
→ Automatic Optimization On Build
Face normal UV7, outline UV8 and character height UV4 are mesh channel bakes. They are separate from the shader Bake on this page. → Mesh UV Bakes
Before you run it
- Record the original
.mat, Animator Controllers and AnimationClips in version control. - See whether
1. Assign face & skin renderersand2. Choose look → Convertin theGet Startedtab are done. - Check the presets and the mesh channel bake results in the
Look & Baketab. - Mark values that a runtime script changes with Keep Editable At Bake on that row.
AnimationClips are analyzed automatically. You do not have to mark them.
Features that are off at bake time are removed from the code. Layer counts, Alpha Mask, Emission and Occlusion are among them. If they are not found as something to preserve, turning them on later will not work.
Running the Bake
Expand Lightweight Shader Bake (Editor Only) at the bottom of the Look & Bake tab. Press Bake Child MingToon Materials to Lightweight Shaders inside it.
- Shaders, materials, textures and a manifest are created under
Assets/StudioRaming/MingToonGenerated. - The Renderer's current slots are changed to the baked materials.
- If you cancel or it fails partway, the assets and slot changes that run created are reverted.
- Check the number of materials processed in the Console's
MingToon bake:summary.
Run it on a Prefab instance and the changes remain as instance overrides. To apply them to the Prefab asset, use Unity's Overrides > Apply All separately.
Restoring
Reverting one baked material
Select the baked material and press Restore Editable Material near the top of the inspector.
It uses the original GUID and Renderer slot recorded in the manifest.
Cleaning up every manual Bake in the project
Run StudioRaming > MingToon > Advanced > Restore And Clean Bake Output.
This command guarantees an order.
- It follows the manifest and returns Renderer slots to the original editing materials.
- It saves the restored scene and Prefab references.
- It re-verifies that every recorded slot points at the real original.
- It deletes the generated assets only after restoration is proven.
If restoring or saving fails, it does not delete the generated folder. It leaves the failed items in the Console and asks for confirmation.
Undo Conversion (back to pre-MingToon materials) returns to the pre-conversion shaders.
Restore And Clean Bake Output returns from baked materials to editing MingToon materials.
When the restore button is disabled
- Check whether the bake manifest is still there.
- Check whether the original editing material's GUID is still alive.
- Check whether the Renderer hierarchy or material slots changed after the Bake.
- Check the Console for stale manual bake warnings.
Texture handling policy
A manual Bake is a preview of the upload. So the texture policy uses the same values as upload.
The only reference is Reviewed Texture Rewrites On Build (Opt-In) in the MingToon Manager's Optimize tab.
Lossless only (LosslessOnly) — the default
This is the behavior with the opt-in off. It does not rewrite the pixels of the original textures.
It only permits mathematically identity mask removal and sharing of the same texture with the same UV expression.
Reviewed high quality (ReviewedHighQuality)
This is the behavior with the opt-in on. It permits surface and normal flattening and mask repacking.
Reading, color space, mip regeneration and platform compression can change the pixels. Compare the results before and after the bake on your target platform yourself.
Mask repacking merges several masks into one texture. It does not always reduce the shader's texture sample count.
Keep Editable At Bake
Keep Editable At Bake is a per-material record.
AnimationClips are analyzed automatically, so they do not need marking.
Use it on values that a runtime script changes, or that an external system accesses by name.
To exclude a whole group at once, use Keep This Group Editable At Bake.
Next
Automatic Optimization On Build · VRChat · Warudo · Troubleshooting