﻿---
title: Preparing meshes
description: Control the tetrahedrons with Triangulate, Tetrahedralize, Autocage, Extrude, Span Layers and density regions, and check meshes before you simulate.
url: https://help.tangerina.io/deformable/v0.8.0/user-guides/engine/preparing-meshes/
---

# Preparing meshes – Engine – Deformable v0.8.0

A deformable object simulates a mesh of tetrahedrons, not your polygons. This page shows the tools that make the
tetrahedrons, how many to use, and how to check a mesh before you use it.

## How many tetrahedrons

More tetrahedrons give smoother bending and finer cracks. Fewer tetrahedrons simulate faster. A few hundred per
object is often enough. On Free, a Deformable Scene simulates up to 2,500 tetrahedrons, and every object
counts, floors included, but one that is disabled.

The plugin counts them for you at the start frame: after a create action, once its tools finish, it names the new
object with its count and the scene's total, such as **Created Cube: 1,840 tetrahedrons; scene total 2,812**. The count
comes from the object's rest shape, written at the start frame.

**See it in:** [Blender](https://help.tangerina.io/deformable/v0.8.0/user-guides/blender/how-the-plugin-works/#count-the-tetrahedrons) · [Maya](https://help.tangerina.io/deformable/v0.8.0/user-guides/maya/how-the-plugin-works/#count-the-tetrahedrons) · [C](https://help.tangerina.io/deformable/v0.8.0/user-guides/c/tools/#fill-a-cage-with-tetrahedrons) · [Rust](https://help.tangerina.io/deformable/v0.8.0/user-guides/rust/tools/#fill-a-cage-with-tetrahedrons) · [Python](https://help.tangerina.io/deformable/v0.8.0/user-guides/python/tools/#fill-a-cage-with-tetrahedrons)

### Use fewer tetrahedrons

| The object was made with | To use fewer tetrahedrons |
|---|---|
| An autocage | Lower **Target Face Count** on its Autocage. |
| Your own mesh as the cage (Polygon Mesh) | Use a simpler mesh, for example decimated before the object reads it, or switch to an autocage. **Maximum Area** only splits triangles. It never merges them. |
| Any cage | Leave **Maximum Edge Length** on its Tetrahedralize at 100, as the create actions set it. On a fine cage, a smaller value adds tetrahedrons inside. |

The cage sets the tetrahedron size. To use more tetrahedrons, make a finer cage: raise **Target Face Count** on the
Autocage, or lower **Maximum Area** on the Triangulate. To add detail only where an object bends or breaks, use a
[density region](https://help.tangerina.io/deformable/v0.8.0/user-guides/engine/preparing-meshes/#density-regions) instead of a finer cage
everywhere.

## Triangulate

Triangulate turns a polygon mesh into a cage of well-shaped triangles. It keeps your materials, normals and UV maps.

| Setting | Default | What it does |
|---|---|---|
| Maximum Area | 1 | Largest triangle area. Bigger triangles are split. 0 sets no limit. The create actions set 10,000, so the cage keeps your mesh's own triangles. |
| Quality | 20 | Smallest triangle angle, in degrees, from 1 to 20. |
| Closed Boundary | On | Treat the mesh as the closed boundary of a solid: watertight, with no holes. A bare object made from a non-closed polygon mesh turns it off. |

**See it in:** [Blender](https://help.tangerina.io/deformable/v0.8.0/user-guides/blender/how-the-plugin-works/#where-the-settings-are) · [Maya](https://help.tangerina.io/deformable/v0.8.0/user-guides/maya/how-the-plugin-works/#the-attribute-editor) · [C](https://help.tangerina.io/deformable/v0.8.0/user-guides/c/tools/#triangulate-a-polygon-mesh) · [Rust](https://help.tangerina.io/deformable/v0.8.0/user-guides/rust/tools/#triangulate-a-polygon-mesh) · [Python](https://help.tangerina.io/deformable/v0.8.0/user-guides/python/tools/#triangulate-a-polygon-mesh)

## Tetrahedralize

Tetrahedralize fills a closed triangle cage with tetrahedrons. The cage triangles stay the boundary exactly.

| Setting | Default | What it does |
|---|---|---|
| Maximum Edge Length | 1 | A size limit for the tetrahedrons inside the cage. It is also the base size of density regions. The create actions set 100, except **Create Primitive Object**. |
| Density Regions | None | The density regions it reads. See [Density regions](https://help.tangerina.io/deformable/v0.8.0/user-guides/engine/preparing-meshes/#density-regions). |

Maximum Edge Length does not split the cage triangles, and they set the size of the tetrahedrons next to them. So on a
coarse cage, a smaller value changes nothing. For example, a 2 m cube made with **Create Object from Polygon Mesh** has
12 tetrahedrons at any Maximum Edge Length, and some of their edges are about 2.8 m long. With **Maximum Area** 0.1 on
its Triangulate, the same cube has about 1,000 tetrahedrons, and about 3,100 once Maximum Edge Length is 0.2.

![A cube with a coarse cage holds 12 tetrahedrons, and the same cube with a finer cage holds about 1,000.](../../images/preparing-meshes-coarse-and-fine-cage.svg "On a coarse cage, a smaller Maximum Edge Length changes nothing. A finer cage gives more tetrahedrons.")

The cage must be closed, made of triangles, with its faces pointing outward. A polygon cage gives the error
**Tetrahedralize needs a triangle cage**: put a Triangulate or an Autocage before it.

**See it in:** [Blender](https://help.tangerina.io/deformable/v0.8.0/user-guides/blender/how-the-plugin-works/#where-the-settings-are) · [Maya](https://help.tangerina.io/deformable/v0.8.0/user-guides/maya/how-the-plugin-works/#the-attribute-editor) · [C](https://help.tangerina.io/deformable/v0.8.0/user-guides/c/tools/#fill-a-cage-with-tetrahedrons) · [Rust](https://help.tangerina.io/deformable/v0.8.0/user-guides/rust/tools/#fill-a-cage-with-tetrahedrons) · [Python](https://help.tangerina.io/deformable/v0.8.0/user-guides/python/tools/#fill-a-cage-with-tetrahedrons)

## Anisotropy

Triangulate and Tetrahedralize both have **Anisotropy** settings. They stretch the elements along up to two
directions, for example to use long elements in a tall column.

| Setting | Default | What it does |
|---|---|---|
| First Scale | 1 | Element size along the first direction, as a factor from 0.02 to 50. |
| First Direction | (1, 1, 1) | The first direction. |
| Second Scale | 1 | Element size along the second direction, as a factor from 0.02 to 50. |
| Second Direction | (1, 1, 1) | The second direction. |

A scale of 1 changes nothing.

**See it in:** [Blender](https://help.tangerina.io/deformable/v0.8.0/user-guides/blender/how-the-plugin-works/#where-the-settings-are) · [Maya](https://help.tangerina.io/deformable/v0.8.0/user-guides/maya/how-the-plugin-works/#the-attribute-editor) · [C](https://help.tangerina.io/deformable/v0.8.0/user-guides/c/tools/#stretch-the-elements) · [Rust](https://help.tangerina.io/deformable/v0.8.0/user-guides/rust/tools/#stretch-the-tetrahedrons) · [Python](https://help.tangerina.io/deformable/v0.8.0/user-guides/python/tools/#stretch-the-tetrahedrons)

## Autocage

Autocage wraps any mesh in a new, closed triangle cage at a small gap. The mesh may be non-closed, have holes or be made
of many parts.

| Setting | Default | What it does |
|---|---|---|
| Scale Gap | 1 | Size of the gaps the cage bridges, as a factor from 0.1 to 10. Raise it to close over handles and thin gaps. |
| Target Face Count | 300 | Number of cage triangles to aim for. The create actions set 100. |
| Target Tetrahedron Count | 0 | Used when Target Face Count is 0: sizes the cage for a tetrahedron count instead. 0 sets no target. The final count also depends on Tetrahedralize, so check it. |

**See it in:** [Blender](https://help.tangerina.io/deformable/v0.8.0/user-guides/blender/creating-objects/#create-object-with-autocage) · [Maya](https://help.tangerina.io/deformable/v0.8.0/user-guides/maya/creating-objects/#create-object-with-autocage) · [C](https://help.tangerina.io/deformable/v0.8.0/user-guides/c/tools/#build-a-cage-around-any-mesh) · [Rust](https://help.tangerina.io/deformable/v0.8.0/user-guides/rust/tools/#wrap-any-mesh-in-a-cage) · [Python](https://help.tangerina.io/deformable/v0.8.0/user-guides/python/tools/#wrap-any-mesh-in-a-cage)

## Extrude

Extrude turns a triangle mesh into one layer of tetrahedrons, three per triangle. It makes thin objects such as
floors, sheets and panels.

| Setting | Default | What it does |
|---|---|---|
| Thickness | 0.1 | Distance between the two layers. |
| Direction | Both | **Up** along the normals, **Down** against them, **Both** half each way. |

![Three slabs extruded from the same plane: Up grows along the normal, Down against it, and Both half each way.](../../images/creating-objects-extrude-direction.svg "Direction sets which way Extrude grows the layer: along the normals, against them, or half each way.")

The mesh it extrudes must be made of triangles: put a Triangulate with **Closed Boundary** off before it, as the create
actions do.

**See it in:** [Blender](https://help.tangerina.io/deformable/v0.8.0/user-guides/blender/creating-objects/#thin-objects-from-non-closed-polygon-mesh) · [Maya](https://help.tangerina.io/deformable/v0.8.0/user-guides/maya/creating-objects/#thin-objects-from-non-closed-polygon-mesh) · [C](https://help.tangerina.io/deformable/v0.8.0/user-guides/c/tools/#make-a-thin-shell) · [Rust](https://help.tangerina.io/deformable/v0.8.0/user-guides/rust/tools/#extrude-a-triangle-mesh-into-a-shell) · [Python](https://help.tangerina.io/deformable/v0.8.0/user-guides/python/tools/#extrude-a-triangle-mesh-into-a-shell)

## Span Layers

Span Layers fills the space between two triangle layers. The second layer must have the first layer's vertices and
triangles, for example a copy that you moved or sculpted. Use it for a shell of varying thickness.

![Two layers with the same triangles, and the shell of varying thickness that Span Layers fills between them.](../../images/preparing-meshes-span-layers.svg "Span Layers needs a second layer with the first layer's vertices and triangles, such as a moved copy.")

Triangulate the first mesh before you copy it: the copy then has the same triangles however you bend or sculpt it,
while two meshes triangulated one at a time can get different ones. Do not add, delete or reorder the copy's vertices
or faces.

When the two layers do not match, the tool says **Span Layers needs two layers with the same triangles, such as a
triangulated mesh and a moved copy of it**. Triangulate the first mesh, delete the copy, copy the first mesh again and
redo your change to the copy.

**See it in:** [Blender](https://help.tangerina.io/deformable/v0.8.0/user-guides/blender/creating-objects/#thin-objects-from-non-closed-polygon-mesh) · [Maya](https://help.tangerina.io/deformable/v0.8.0/user-guides/maya/creating-objects/#thin-objects-from-non-closed-polygon-mesh) · [C](https://help.tangerina.io/deformable/v0.8.0/user-guides/c/tools/#fill-the-space-between-two-layers) · [Rust](https://help.tangerina.io/deformable/v0.8.0/user-guides/rust/tools/#fill-the-space-between-two-layers) · [Python](https://help.tangerina.io/deformable/v0.8.0/user-guides/python/tools/#fill-the-space-between-two-layers)

## Hollow and thin-walled objects

An autocage is filled solid. **Create Object with Autocage** gives a cup, a box or a pipe the mass of its whole
outline, the inside included, several times the mass of its walls, and nothing can fall into it. Make such an object
from its walls instead:

- **From the non-closed polygon mesh**, the walls without thickness: a bare object from a non-closed polygon mesh, with
  **Thickness** set to the wall thickness and **Direction** to **Down**, which grows the walls inward when the normals
  face out. The walls follow the vertex normals, which lean at sharp corners, so give a box a few cuts first.
- **From two layers of the non-closed polygon mesh**, for walls you model on both sides: **Span Layers** on the mesh and
  a copy moved inward by the wall thickness.
- **From a closed mesh with the walls modelled**: **Create Object from Polygon Mesh**. Its own triangles set the
  tetrahedron count, so a finely cut prop can pass the 2,500 tetrahedrons of Free on its own:
  a pipe cut fine enough for its thin walls made over 11,000. Use fewer triangles, or one of the routes above.

Or keep the autocage and set the material's **Density** to the real mass divided by the cage's volume. The object
then weighs what it should, but its cage still fills the inside.

**See it in:** [Blender](https://help.tangerina.io/deformable/v0.8.0/user-guides/blender/creating-objects/#hollow-and-thin-walled-objects) · [Maya](https://help.tangerina.io/deformable/v0.8.0/user-guides/maya/creating-objects/#hollow-and-thin-walled-objects) · [C](https://help.tangerina.io/deformable/v0.8.0/user-guides/c/tools/#make-a-thin-shell) · [Rust](https://help.tangerina.io/deformable/v0.8.0/user-guides/rust/tools/#make-thin-objects) · [Python](https://help.tangerina.io/deformable/v0.8.0/user-guides/python/tools/#make-thin-objects)

## Density regions

A density region changes the tetrahedron size inside a mesh. Use it to add detail where an object bends or breaks,
and to keep the rest coarse.

Inside the region, the tetrahedrons aim for this edge length:

```text
Maximum Edge Length ÷ ∛(Density Scale)
```

**Maximum Edge Length** is the setting of the object's Tetrahedralize. **Density Scale** is the region's. So a Density
Scale of 8 gives half the Maximum Edge Length, and 27 gives a third. 1 changes nothing. Below 1 asks for larger
tetrahedrons, but the cage limits them, so count the tetrahedrons to see the result. The region uses the convex hull of
its mesh.

![A block of tetrahedrons with a density region at Density Scale 8: inside the region, the tetrahedrons are half as long.](../../images/preparing-meshes-density-region.svg "Inside the region, a Density Scale of 8 aims for half the Maximum Edge Length.")

The create actions set Maximum Edge Length to 100. At that value, a Density Scale of 8 aims for tetrahedrons 50 units
long, far larger than the cage's, so the region adds almost nothing. Set Maximum Edge Length first, to about the size of
the tetrahedrons outside the region, for example 0.5 for an object 2 m wide. On a coarse cage, this leaves the outside
as it is.

For example, a UV sphere made with **Create Object with Autocage** has 212 tetrahedrons. With Maximum Edge Length 0.5
and a density region at its center, it has about 700 at Density Scale 8 and about 1,500 at 27. With Maximum Edge
Length left at 100, it has 278 at any Density Scale.

A region that a Tetrahedralize reads but that is not a density region is named in a warning: **not a density region:
`<name>`**.

**See it in:** [Blender](https://help.tangerina.io/deformable/v0.8.0/user-guides/blender/creating-objects/#regions) · [Maya](https://help.tangerina.io/deformable/v0.8.0/user-guides/maya/creating-objects/#regions) · [C](https://help.tangerina.io/deformable/v0.8.0/user-guides/c/tools/#fill-a-cage-with-tetrahedrons) · [Rust](https://help.tangerina.io/deformable/v0.8.0/user-guides/rust/tools/#mesh-some-parts-finer) · [Python](https://help.tangerina.io/deformable/v0.8.0/user-guides/python/tools/#mesh-some-parts-finer)

## Verify Mesh

**Verify Mesh** checks one mesh for what keeps it from being a clean, closed mesh, selects every problem it found, and
lists the problems with their counts, such as **Sphere: non closed boundary (12), small angle (3)**. A clean mesh
reports **`<mesh>`: no issue**. The create actions run the same check with the same defaults.

Its options:

| Option | Default | What it checks |
|---|---|---|
| Angle Threshold | 2 | A face whose smallest corner angle is below this, in degrees. |
| Gap Threshold | 0 | Corners of a face closer than this fraction of the mesh radius. 0 reports only corners at the same position. |
| Planar Threshold | 0.05 | A face farther off its plane than this fraction of its radius. |
| Check UV Consistency | Off | Corners the UV map puts elsewhere, with **UV Threshold** as the allowed distance over the face radius. |
| Same UV | Off | Corners of a face that share their UVs. |
| Convex | Off | Reflex corners. |
| Closed Boundary | On | Edges with one face, and inward normals. |
| Self Intersection | Per Island | **Skip**: no self-intersection check. **Per Island**: faces crossed by an edge of the same part. **Full**: every face crossed by an edge. |

### Common problems and fixes

| Problem | What it means | Fix |
|---|---|---|
| non closed boundary | The mesh has holes: edges with one face. | Fill the holes, or use an autocage. |
| non manifold | An edge has more than two faces. | Separate or rebuild those faces. |
| inverted normal, inward normals | Faces point inward. | Make the normals point outward. |
| co located vertices, near vertices | Vertices sit on top of each other. | Merge the vertices that share a position. |
| degenerate edge, degenerate face | Zero-length edges or zero-area faces. | Delete or dissolve them. |
| small angle | Very thin triangles. | Remesh the area, or lower **Angle Threshold** if the shape needs them. |
| non planar | A polygon is bent off its plane. | Triangulate the faces. |
| self intersection | Faces pass through each other. | Move the faces apart, or use an autocage. |

**Check Co-located Vertices** runs Verify Mesh with a gap threshold of 0.001, so it also reports vertices that are
very close but not at the same position. Merge them.

**See it in:** [Blender](https://help.tangerina.io/deformable/v0.8.0/user-guides/blender/creating-objects/#verify-mesh) · [Maya](https://help.tangerina.io/deformable/v0.8.0/user-guides/maya/creating-objects/#verify-mesh) · [C](https://help.tangerina.io/deformable/v0.8.0/user-guides/c/tools/#check-a-mesh-for-problems) · [Rust](https://help.tangerina.io/deformable/v0.8.0/user-guides/rust/tools/#check-a-mesh-before-you-use-it) · [Python](https://help.tangerina.io/deformable/v0.8.0/user-guides/python/tools/#check-a-mesh-before-you-use-it)

## Overlapping objects

Two objects whose tetrahedrons overlap at the start push apart hard, or get glued. Two actions find them:

- **Find Intersecting Objects** adds to the selection every deformable object that overlaps a selected one.
- **Keep Intersecting Objects in Selection** deselects the selected objects that overlap no other selected one.

Both compare the rest tetrahedrons, as the last update computed them, and report the objects they found or kept,
such as **Found 2 intersecting objects: Floor, Wall**, or **No intersecting objects**.

**See it in:** [Blender](https://help.tangerina.io/deformable/v0.8.0/user-guides/blender/creating-objects/#find-intersecting-objects) · [Maya](https://help.tangerina.io/deformable/v0.8.0/user-guides/maya/creating-objects/#find-intersecting-objects) · [C](https://help.tangerina.io/deformable/v0.8.0/user-guides/c/tools/#find-overlapping-objects) · [Rust](https://help.tangerina.io/deformable/v0.8.0/user-guides/rust/tools/#find-objects-that-start-inside-each-other) · [Python](https://help.tangerina.io/deformable/v0.8.0/user-guides/python/tools/#find-objects-that-start-inside-each-other)
