# What is a non-manifold mesh and how to fix it

In your journey through the world of CGI, you have probably come across the word non-manifold once or twice. Maybe you got slapped with a *“mesh is non-manifold”* error too and wondered how your mesh became non-*something*. Surely having a manifold mesh is better.

But what does it mean to be *manifold*?

A manifold is a mathematical concept related to space. In a manifold space, objects resemble euclidean space up close even though they might look different as a whole. For 3D, this means manifold objects look like a plane when seen up close. Take the earth or any large sphere for instance. It looks plain when you are standing on its surface, but the object itself is spherical.

The second feature of manifold objects is that they are continuous. They wrap without any end or beginning. Cubes, Spheres, Torus are examples of manifold objects while a plane is an example of a non-manifold since it’s not continuous. Yep, the good old plane is a non-manifold, who would’ve guessed?

Manifold space can have any number of dimensions and it gets weird real fast. But we only care about 3D, so let’s stick to 2‑manifolds. Wait, 2? Remember we use 2D polygons to build 3D shapes, therefore meshes are 2‑manifolds.

These concepts don’t apply only to computer graphics. Our entire universe and every object we will ever hold are 2‑manifolds. Life being 2‑manifold is what allowed techniques like UV unwrapping to work for CGI. Since we are building 3D shapes from 2D shapes, we can cut them and unfold them into planes in 2D space.

*Disclaimer: I’m not a math guy, so I’ve tried to avoid lingo and keep it focused on 3D. If you are interested in the hardcore stuff, check out the Wikipedia page for manifold.*

## Non-manifolds ruin the fun

Non-manifolds complicate things. For one, **they can’t be unwrapped** without splitting the mesh. Having islands in the UV Map for continuous geometry is a recipe for a headache.

**Boolean operations** can give you trouble too. This has improved by leaps and bounds with Blender 2.80, so it’s not much of a problem anymore. Other software and algorithms may not take non-manifolds so kindly, though.

On the other hand, Manifold meshes are an absolute requirement for **fluid simulations**. They need meshes that have a clear separation between inside and outside, which Non-manifolds can’t give. Without a continuous surface, a mesh can’t encompass a closed volume and have an inside.

The biggest issue, and probably why you are reading this, is **3D printing**. Remember how our universe is 2‑manifold? Non-manifold geometry can’t exist in reality. We can’t print floating vertices or walls with no thickness. Even the thinnest piece of paper has some thickness. Thickness is also needed to have volume, every object we print must have an internal volume. Even “open” objects.

That doesn’t mean non-manifolds are *always* terrible, but if you are modeling for something other than rendering you will want to fix them.

## But I still don’t know what a non-manifold mesh is!

Non-manifold meshes aren’t always obvious, but it’s often easy to see that something about the geometry is wrong. The most common problem is **an edge connected to more or less than two faces**.

This also includes **internal faces**, since one of their edges has to be connected to three faces. Edges connected to only one face are called **Boundary edges** and they are also a non-manifold element. For instance, a plane is a non-manifold with four boundary edges.

Separate regions connected through a single vertex is what it’s called a **bowtie**. By regions, I mean multiple faces and edges, though two faces alone sharing a single vertex can also form a bowtie.

**Loose geometry** is also non-manifold since it’s not continuous and often doesn’t form a surface.

The most obscure problem is **normals pointing in opposite directions for adjacent faces**. This breaks the contiguous rule since one face is suddenly pointing the other way as if the surface was being twisted.

## Please tell me there’s an automatic fix

Nope. To fix a non-manifold mesh you will have to get your hands dirty. But don’t worry, Blender has your back.

Want to get started right away? Use the select menu in the 3D view. Jump into edit mode and make sure all geometry is deselected first, then go `Select > All by Trait > Non-manifold Geometry`

. You can also select more specific problems with `loose geometry`

and `interior faces`

.

Now that you know where the trouble is, you can use Blender’s modeling tools to perform surgery on the mesh. You can delete (`x`

) or separate (`p`

) loose geometry, fix normals (`Ctrl+N`

) or merge vertices (`Alt+M`

). Don’t forget about *Merge By Distance*, which can auto-merge vertices that are too close. We used to call this *Remove Doubles* in previous versions.

Interior faces can be deleted right away. Faces connected to more than three edges and boundary edges may take more consideration. A quick way to fix boundaries is to apply a solidify modifier or extrude inwards to create a volume.

I also recommend installing the Mesh Lint addon. Mesh lint lives in the mesh tab of the properties editor highlighting all kinds of problems. It even updates in realtime while you work! With this addon by your side, you can fix all non-manifolds and be sure you are not accidentally causing other issues like +6 poles.

As you can see, fixing a non-manifold mesh is easy once you know what is making it non-manifold. I hope you found this useful and are ready to tackle non-manifolds!

## Creating terrains just got a lot easier.

Mirage lets you create terrains and populate them with a simple UI and powerful features in realtime.

**Start creating your world today!**

## 2 Comments

Very nice article. In fact, a perfect example of why articles are still a great way to impart knowledge — not everything has to be a three minute video on YouTube. Many Thanks for sharing your knowledge.

Thanks for the blog. It’s super helpful.