Skip to content

Populate polygon face fields in FBX I/O#1067

Open
cdtwigg wants to merge 2 commits intomainfrom
export-D94577295
Open

Populate polygon face fields in FBX I/O#1067
cdtwigg wants to merge 2 commits intomainfrom
export-D94577295

Conversation

@cdtwigg
Copy link
Contributor

@cdtwigg cdtwigg commented Feb 27, 2026

Summary:
Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Differential Revision: D94577295

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 27, 2026
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Feb 27, 2026

@cdtwigg has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94577295.

@meta-codesync meta-codesync bot force-pushed the export-D94577295 branch from 88cc0e7 to 549cd66 Compare March 3, 2026 23:43
meta-codesync bot pushed a commit that referenced this pull request Mar 3, 2026
Summary:

Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Differential Revision: D94577295
meta-codesync bot pushed a commit that referenced this pull request Mar 3, 2026
Summary:

Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Differential Revision: D94577295
@meta-codesync meta-codesync bot force-pushed the export-D94577295 branch from 549cd66 to ee8342b Compare March 3, 2026 23:43
cdtwigg added a commit that referenced this pull request Mar 3, 2026
Summary:
Pull Request resolved: #1067

Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Reviewed By: nickyhe-gemini

Differential Revision: D94577295
@cdtwigg cdtwigg force-pushed the export-D94577295 branch from ee8342b to 3ba7ccd Compare March 3, 2026 23:48
meta-codesync bot pushed a commit that referenced this pull request Mar 3, 2026
Summary:

Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Reviewed By: nickyhe-gemini

Differential Revision: D94577295
@meta-codesync meta-codesync bot force-pushed the export-D94577295 branch 2 times, most recently from b3a1db7 to 18e044e Compare March 4, 2026 06:11
meta-codesync bot pushed a commit that referenced this pull request Mar 4, 2026
Summary:

Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Reviewed By: nickyhe-gemini

Differential Revision: D94577295
@meta-codesync meta-codesync bot force-pushed the export-D94577295 branch from 18e044e to 8795e9e Compare March 4, 2026 19:19
cdtwigg added a commit that referenced this pull request Mar 4, 2026
Summary:
Pull Request resolved: #1067

Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Reviewed By: nickyhe-gemini

Differential Revision: D94577295
@cdtwigg cdtwigg force-pushed the export-D94577295 branch from 8795e9e to dfb6068 Compare March 4, 2026 19:23
meta-codesync bot pushed a commit that referenced this pull request Mar 4, 2026
Summary:

Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Reviewed By: nickyhe-gemini

Differential Revision: D94577295
@meta-codesync meta-codesync bot force-pushed the export-D94577295 branch from dfb6068 to 9365eef Compare March 4, 2026 19:24
cdtwigg added a commit that referenced this pull request Mar 4, 2026
Summary:
Pull Request resolved: #1067

Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Reviewed By: nickyhe-gemini

Differential Revision: D94577295
@cdtwigg cdtwigg force-pushed the export-D94577295 branch from 9365eef to 2ef81b1 Compare March 4, 2026 19:32
meta-codesync bot pushed a commit that referenced this pull request Mar 4, 2026
Summary:

Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Reviewed By: nickyhe-gemini

Differential Revision: D94577295
@meta-codesync meta-codesync bot force-pushed the export-D94577295 branch from 2ef81b1 to 0f0b467 Compare March 4, 2026 19:37
meta-codesync bot pushed a commit that referenced this pull request Mar 4, 2026
Summary:

Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Reviewed By: nickyhe-gemini

Differential Revision: D94577295
@meta-codesync meta-codesync bot force-pushed the export-D94577295 branch from 0f0b467 to a883197 Compare March 4, 2026 19:57
meta-codesync bot pushed a commit that referenced this pull request Mar 4, 2026
Summary:

Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Reviewed By: nickyhe-gemini

Differential Revision: D94577295
@meta-codesync meta-codesync bot force-pushed the export-D94577295 branch from a883197 to 336f33b Compare March 4, 2026 22:15
cdtwigg added 2 commits March 4, 2026 14:17
Summary:

MeshT currently only stores triangle faces (std::vector<Eigen::Vector3i> faces).
Characters can have arbitrary polygon topology (quads, n-gons) which is lost
during FBX loading when polygons are fan-triangulated. This adds a redundant
polygon representation alongside the existing triangle faces so that polygon
topology can be preserved. The existing faces field stays unchanged and all
downstream code continues to work.

Three new fields are added to MeshT:
- polyFaces: packed polygon vertex indices (all polygons concatenated)
- polyFaceSizes: number of vertices per polygon face
- polyTexcoordFaces: packed polygon texcoord indices (shares polyFaceSizes)

Also updates cast()/reset(), adds tests, updates compareMeshes(), adds Python
bindings with validation, and regenerates .pyi stubs.

Reviewed By: nickyhe-gemini

Differential Revision: D94577296
Summary:

Wire up the polyFaces, polyFaceSizes, and polyTexcoordFaces fields added
in the previous diff so they are populated during FBX load and written
during FBX save.

Load: copy raw polygon topology from PolygonData into the new mesh fields
alongside the existing triangulation.

Save: when polygon data is available, write actual polygons (quads, n-gons)
instead of only triangles; fall back to triangulated faces otherwise.

Reviewed By: nickyhe-gemini

Differential Revision: D94577295
@meta-codesync meta-codesync bot force-pushed the export-D94577295 branch from 336f33b to a3a8922 Compare March 4, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant