Automation guide
Blender scene cleanup, and how to stop doing it by hand
A complete Blender scene cleanup checklist: n-gons, doubles, loose geometry, normals, transforms and orphan data, and how to run it as one brief.
Blender scene cleanup is the tax on every asset that comes from somewhere else, and it is the same list every single time: doubled vertices, n-gons, flipped normals, unapplied scale, loose edges, interior faces, four hundred objects called Cube.001. Mixar treats that list as one instruction rather than an afternoon.
Mixar is a 3D editor built on Blender with an AI agent inside it, so every operator named below is the one you already use; the difference is that something else can run the whole sequence and tell you what it found. Nothing on the list is hard, all of it is mandatory, and that combination is exactly what makes it worth handing over.
Apply transforms
Unapplied non-uniform scale breaks modifiers, physics, remeshers and exporters alike.
Delete loose geometry
Invisible in solid shading, fatal in every exporter and remesher.
Merge by distance
The default threshold assumes the mesh was modelled at a sane scale. It often was not.
Fix non-manifold
Before normals, because normal recalculation on a non-manifold mesh guesses.
Recalculate normals
Then check with the Face Orientation overlay rather than trusting it.
Name and purge
The part everyone skips, and the part the next person needs.
The checklist, in the order that matters#
Order matters more than people expect. Merging vertices before deleting loose geometry means merging things you were about to throw away. Recalculating normals before fixing non-manifold geometry gives you a confidently wrong result. This sequence avoids the common traps.
1. Apply transforms#
Ctrl+A in Object Mode. Scale first, then rotation if the object's orientation is meant to be its rest pose.
Unapplied non-uniform scale breaks almost everything downstream: modifiers behave oddly, physics is wrong, normals get skewed, remeshers produce nonsense, and exporters bake the scale into the mesh in ways the target engine does not expect. Check it in the N panel before assuming it is fine. A scale of 1.0, 1.0, 1.0 on every object is the goal.
The exception: instanced objects intentionally sharing mesh data, where applying scale to one applies it to all. Check the users count on the mesh datablock first.
2. Delete loose geometry#
Edit Mode, Select > Select All by Trait > Loose Geometry, then X > Vertices.
Stray vertices and edges with no faces attached are invisible in solid shading and show up as errors in every exporter and every remesher. Scans and boolean operations generate them constantly.
3. Merge by distance#
Edit Mode, select all with A, then M > By Distance.
The default threshold of 0.0001 m is conservative. If the mesh was modelled at a different scale, that threshold may be far too small to catch anything. Read the operator panel report: it tells you how many vertices it removed. Zero removed on a mesh you know has doubles means the threshold is wrong, not that the mesh is clean.
Be careful with meshes that have intentionally coincident-but-separate vertices, such as hard-edge shading splits handled through geometry rather than through custom normals.
4. Fix non-manifold geometry#
Select > Select All by Trait > Non Manifold in Vertex or Edge mode.
This catches boundary edges, edges shared by more than two faces, and vertices connecting otherwise disconnected fans. Boundary edges are legitimate on open meshes, so read the result rather than deleting everything it selects. Interior faces get their own trait selector, Select All by Trait > Interior Faces, and are almost always garbage from booleans and scan reconstruction.
5. Recalculate normals#
Select all in Edit Mode, then Shift+N.
Do this after the manifold pass, because normal recalculation depends on the solver being able to work out what is inside and what is outside. On a non-manifold mesh it will guess, and it will guess wrong somewhere you will not notice until a bake comes back inverted.
Turn on Face Orientation in the Viewport Overlays to actually see the result. Blue is outward, red is inward. Anything red after Shift+N needs manual attention, usually because that part of the mesh is not manifold.
Separately: if the file came from a CAD conversion or an FBX round trip, check Object Data Properties > Geometry Data for Custom Split Normals. They override everything you just did. Clear them if the shading looks wrong in ways that Shift+N will not fix.
6. Deal with n-gons#
Select > Select All by Trait > Faces by Sides, set to Greater Than 4.
N-gons are not automatically wrong. On a flat surface with no subdivision and no deformation they are fine, and Blender renders them correctly. They become a problem when the face is non-planar, when the mesh will be subdivided, when it will deform, or when the target engine triangulates them in a way you did not choose.
The fix depends on the case: Ctrl+T to triangulate and then Alt+J to re-quad, the Grid Fill operator for round holes, or manual loop cuts where topology actually matters.
7. Purge orphan data#
File > Clean Up > Recursive Unused Data-Blocks.
Every material you deleted, every image you unlinked, every mesh from an object you removed, all of it stays in the file until purged. This is why a scene with six objects is 300 MB. Run it more than once, or use the recursive version, because purging one layer often orphans the next.
While you are there: File > Clean Up > Make Local if the file has broken library links, and check the Outliner in Blend File mode to see what is actually in there.
8. Naming and hierarchy#
The unglamorous one. Cube.001 through Cube.247 is not a naming convention, and every pipeline downstream of Blender either depends on names or is made much harder by their absence. Object names, mesh datablock names, material names and UV map names all matter, and they are all different fields.
Blender's Batch Rename operator (Ctrl+F2) handles the mechanical part. Deciding the scheme is the part that is not mechanical.
9. Material and UV sanity#
Look for: objects with no material, objects with more material slots than they use, duplicate materials that should be one (Mat, Mat.001, Mat.002 all identical), meshes with no UV map, meshes with several UV maps where only one is meant to be active, and UV maps named inconsistently across objects that will share a shader.
File > Clean Up > Unused Material Slots handles some of it. The duplicate-material merge does not have a built-in operator worth relying on.
Why this list is the perfect candidate for automation#
Look at what those nine steps have in common. Every one is:
- deterministic in its mechanical action,
- conditional on inspecting the current state first,
- and identical across every asset that arrives.
That is not creative work. It is a decision tree an experienced artist runs from memory, and the reason it eats time is not difficulty, it is repetition and context switching. Ten objects means ten passes. Forty means the pass gets skipped and the problem surfaces at export time instead.
An agent that has the scene state directly can walk the same tree without the context switching. In Mixar the agent reads the actual scene: object count, mesh statistics, transform state, normal orientation, UV presence, material assignments. It can report what is wrong before changing anything, and in Plan Mode it drafts the sequence for approval before touching the file. That approval step matters here more than almost anywhere else, because a cleanup pass is destructive by definition and "merge by distance across the whole scene" is not something to run blind on a file somebody else made.
Cleanup before the thing you actually wanted to do#
Most cleanup is not the goal, it is the prerequisite. Three cases where skipping it costs the most:
Before retopology. Automatic remeshers fail on non-manifold input, and they fail in ways that look like the remesher being bad rather than the input being broken. The auto retopology guide covers which failures trace back to which input problem.
Before baking. A bake with inverted normals, unapplied scale or overlapping UVs produces a map that looks almost right, which is worse than one that looks obviously wrong. See automating baking in Blender.
Before export. Every issue on this list becomes an engine issue at import time, where it is far more expensive to diagnose. Covered in Blender batch export prep.
Cleanup is the first pass in a sequence that runs the same way every time. The AI agent for Blender pillar is the map of the rest of it.
A note on doing this across a whole scene at once#
The checklist above is written per object. Running it across a scene of eighty objects is where it stops being a checklist and starts being a project. Selecting all and entering Edit Mode does let some operators work across multiple meshes at once, but not all of them behave the way you would hope, and the ones that do give you a single undo step across the entire scene.
This is the point where people write a Python script, and it is the right instinct. The problem with the script is that it encodes one set of assumptions about what "clean" means, and the next file breaks them. A briefed pass sits between the two: it is repeatable like a script, and it inspects before acting like a human would.
Frequently asked questions
How do you clean up a messy Blender scene?
Work in order: apply transforms, delete loose geometry, merge by distance, fix non-manifold geometry, recalculate normals, resolve n-gons, purge orphan data, then fix naming and materials. The order matters because several steps depend on the ones before them. Recalculating normals on a non-manifold mesh, for example, produces a confidently wrong result.
How do you remove doubles in Blender?
Remove Doubles was renamed to Merge by Distance. In Edit Mode, select everything with A, then M > By Distance. Read the operator report to see how many vertices were actually merged, and raise the distance threshold if the mesh was built at a large scale and nothing was removed.
Are n-gons bad in Blender?
Not inherently. An n-gon on a flat, non-deforming, non-subdivided surface renders correctly and causes no problems. They become problems when the face is non-planar, when the mesh is subdivided, when it deforms, or when the target engine triangulates it differently from how you would have. Judge them by destination, not on principle.
Why is my Blender file so large?
Almost always orphan data. Deleted objects, unlinked images, unused materials and old mesh datablocks stay in the file until purged. Run File > Clean Up > Recursive Unused Data-Blocks, then save and reopen. Packed textures are the other common cause, visible under File > External Data.
Can Blender scene cleanup be automated?
Most of it, yes, because the checklist is identical every time and the order is fixed. What cannot be automated is intent: whether two coincident vertices are a mistake or a deliberate shading split. Mixar, a 3D editor built on Blender, reads the live scene, reports what is wrong before changing anything, and holds the whole plan for your approval, which matters because a cleanup pass is destructive by definition.