Skip to content

Commit b2b403c

Browse files
committed
Add technical definition for manifoldness
1 parent c14d206 commit b2b403c

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

tutorials/3d/csg_tools.rst

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,26 @@ The :ref:`CSGPolygon3D <class_CSGPolygon3D>` node extrude along a Polygon drawn
9191
Custom meshes
9292
~~~~~~~~~~~~~
9393

94-
Any mesh can be used for :ref:`CSGMesh3D <class_CSGMesh3D>`; the mesh can be
95-
modeled in other software and imported into Godot. Multiple materials are
96-
supported. There are some restrictions for geometry:
94+
Custom meshes can be used for :ref:`CSGMesh3D <class_CSGMesh3D>` as long as the
95+
mesh is *manifold*. The mesh can be modeled in other software and imported into
96+
Godot. Multiple materials are supported. A manifold mesh has some restrictions
97+
for geometry:
9798

9899
- it must be closed,
99100
- it must not self-intersect,
100101
- it must not contain internal faces,
101102
- every edge must connect to only two other faces.
102103

104+
Godot uses the `manifold <https://github.com/elalish/manifold>`__ library to
105+
implement CSG meshes. The technical definition of "manifold" used by Godot is
106+
the following, adapted from that library's `definition of "manifold"
107+
<https://github.com/elalish/manifold/wiki/Manifold-Library#manifoldness-definition>`__:
108+
109+
Every edge of every triangle must contain the same two vertices (by index) as
110+
exactly one other triangle edge, and the start and end vertices must switch
111+
places between these two edges. The triangle vertices must appear in clockwise
112+
order when viewed from the outside of the Godot Engine manifold mesh.
113+
103114
.. image:: img/csg_custom_mesh.png
104115

105116
CSGCombiner3D

0 commit comments

Comments
 (0)