meshfx // USD NGONS

How to fix n-gons in a USD file

You fix n-gons in a USD mesh by triangulating or quad-cutting them in your 3D editor, then setting subdivisionScheme to none before export. USD stores any polygon through faceVertexCounts, and its default subdivision setting smooths n-gons into extra quads in renderers that honor it, so the same file can look different in your engine.

pyrofx effects work today, and new accounts start with $5 of usage.

MODULE // meshfx AVAILABLE

meshfx measures faults, checks repairs and makes LODs for a triangle budget. meshfx runs on the hosted API: try it in the Playground.

  • faceVertexCounts: corners per face
  • subdivisionScheme defaults to catmullClark
  • Game meshes: set it to none

01 // WHY

How USD stores and smooths n-gons

A USD mesh keeps positions in points, the corner count of each face in faceVertexCounts, and the corners themselves in faceVertexIndices. A 5 in faceVertexCounts is a pentagon.

With subdivisionScheme unset, USD treats the mesh as a Catmull-Clark subdivision surface, which cuts every n-gon into quads around a center point when a renderer subdivides it. A game engine importer triangulates the base mesh instead, so the preview and the engine can disagree.

02 // HOW TO

Split n-gons and turn off subdivision

  1. Find n-gons: select faces by sides in your 3D editor, or look for values above 4 in faceVertexCounts in the .usda text.
  2. Split concave and non-planar n-gons into quads or triangles.
  3. Set subdivisionScheme to none on meshes meant for a game, so every program shows the same faces.
  4. Triangulate on export if your engine's USD importer splits faces differently from your editor.
  5. Export the USD, or a GLB for an engine without a USD importer.

FBX and USD input are not supported by meshfx. Export glTF, GLB, OBJ, STL or surface PLY first, then inspect the measured output. Hosted meshfx runs are available in the Playground.

04 // FAQ

USD n-gon questions

All questions →

README.FIX_NGONS_USD
Are ngons bad in a USD file for games?

They are valid USD and import fine, but the subdivision default can smooth them in previews. Split concave ones and set subdivisionScheme to none.

How do I triangulate ngons in a USD file?

Triangulate the mesh in your 3D editor and export it. The faceVertexCounts attribute then holds only threes.

Does Unreal Engine triangulate USD ngons?

Yes, when it builds a static mesh from the USD file. Check concave faces after import to be sure they split cleanly.

How do I clean up topology after a Boolean creates ngons in USD?

Connect the corners of the cut to nearby vertices so long ngons become quads and triangles, then export with subdivisionScheme set to none.

Explore meshfx outputs

Inspect compiled meshfx outputs and their reports. Hosted meshfx runs are available in the Playground.

All effects, guides and explainers →