meshfx // GLB NGONS
How to fix n-gons when you export a GLB
You fix n-gons for a GLB by triangulating them yourself in your 3D editor before export, because glTF holds triangles only and the exporter otherwise splits every face with five or more sides on its own. Choose cuts that follow the shape, keep your quad version as the source file, then check the shading in a glTF viewer.
pyrofx effects work today, and new accounts start with $5 of usage.
meshfx measures faults, checks repairs and makes LODs for a triangle budget. meshfx runs on the hosted API: try it in the Playground.
- glTF mesh faces: triangles only
- The exporter splits n-gons as it writes
- A GLB round trip brings back triangles
01 // WHY
What happens to an n-gon in glTF
A glTF mesh primitive is a list of triangles (or lines or points). There is no polygon record, so the exporter runs its own triangulation, and the quads and n-gons you modeled are gone when you import the GLB again. A flat, convex n-gon survives that split with no visible change. A concave or non-planar one can come out as long, thin triangles that streak the shading, most visibly on a normal-mapped surface.
02 // HOW TO
Triangulate before you export the GLB
- Select faces with more than four sides in your 3D editor.
- Cut concave and non-planar n-gons into quads along the shape, with connect vertices or a knife cut.
- Triangulate the rest with a beauty or shortest-diagonal method, or triangulate the whole mesh to see exactly what the GLB will hold.
- Save the quad version as your source file, since a GLB round trip returns only triangles.
- Export the GLB and check the shading in a glTF viewer.
meshfx measures holes, flipped faces and non-manifold edges. Each repair is checked against the source and undone with a warning if it moves the surface too far. Hosted meshfx runs are available in the Playground.
How do I triangulate ngons before exporting a GLB?
Select faces with more than four sides and run Triangulate Faces, cutting concave ones by hand first. The GLB holds the triangles you chose.
Are triangles acceptable in a game ready model?
Yes. A GLB holds only triangles and every engine renders triangles, so only the placement of the cuts matters.
Do I lose my quads if I use GLB for Godot?
Yes, in the file. Godot renders triangles anyway, so keep the quad version as your source and export the GLB from it.
Does three.js support ngons in a GLB?
No. A GLB stores triangles only, so ngons are split by the exporter before the file ever reaches GLTFLoader.
Explore meshfx outputs
Inspect compiled meshfx outputs and their reports. Hosted meshfx runs are available in the Playground.