Handle polygon fields in mesh subset operations#1068
Open
Conversation
Contributor
meta-codesync bot
pushed a commit
that referenced
this pull request
Mar 3, 2026
Summary: reduceMeshInternal (used by reduceMeshByFaces, reduceMeshByVertices, and reduceMeshComponents) didn't handle the polyFaces/polyFaceSizes/polyTexcoordFaces fields. After a mesh subset operation, the polygon data would be stale. Add remapPolyFaces helper to filter and remap polygon data during mesh reduction, using the same active-vertex logic as triangulated faces. Also add verticesToPolys, polysToVertices conversion functions and reduceMeshByPolys for selecting mesh subsets by polygon. Reviewed By: fbogo Differential Revision: D94579400
e941b92 to
46bdae0
Compare
meta-codesync bot
pushed a commit
that referenced
this pull request
Mar 3, 2026
Summary: reduceMeshInternal (used by reduceMeshByFaces, reduceMeshByVertices, and reduceMeshComponents) didn't handle the polyFaces/polyFaceSizes/polyTexcoordFaces fields. After a mesh subset operation, the polygon data would be stale. Add remapPolyFaces helper to filter and remap polygon data during mesh reduction, using the same active-vertex logic as triangulated faces. Also add verticesToPolys, polysToVertices conversion functions and reduceMeshByPolys for selecting mesh subsets by polygon. Reviewed By: fbogo Differential Revision: D94579400
46bdae0 to
4787a76
Compare
cdtwigg
added a commit
that referenced
this pull request
Mar 3, 2026
Summary: Pull Request resolved: #1068 reduceMeshInternal (used by reduceMeshByFaces, reduceMeshByVertices, and reduceMeshComponents) didn't handle the polyFaces/polyFaceSizes/polyTexcoordFaces fields. After a mesh subset operation, the polygon data would be stale. Add remapPolyFaces helper to filter and remap polygon data during mesh reduction, using the same active-vertex logic as triangulated faces. Also add verticesToPolys, polysToVertices conversion functions and reduceMeshByPolys for selecting mesh subsets by polygon. Reviewed By: fbogo Differential Revision: D94579400
4787a76 to
872384c
Compare
meta-codesync bot
pushed a commit
that referenced
this pull request
Mar 3, 2026
Summary: reduceMeshInternal (used by reduceMeshByFaces, reduceMeshByVertices, and reduceMeshComponents) didn't handle the polyFaces/polyFaceSizes/polyTexcoordFaces fields. After a mesh subset operation, the polygon data would be stale. Add remapPolyFaces helper to filter and remap polygon data during mesh reduction, using the same active-vertex logic as triangulated faces. Also add verticesToPolys, polysToVertices conversion functions and reduceMeshByPolys for selecting mesh subsets by polygon. Reviewed By: fbogo Differential Revision: D94579400
872384c to
58d1584
Compare
meta-codesync bot
pushed a commit
that referenced
this pull request
Mar 4, 2026
Summary: reduceMeshInternal (used by reduceMeshByFaces, reduceMeshByVertices, and reduceMeshComponents) didn't handle the polyFaces/polyFaceSizes/polyTexcoordFaces fields. After a mesh subset operation, the polygon data would be stale. Add remapPolyFaces helper to filter and remap polygon data during mesh reduction, using the same active-vertex logic as triangulated faces. Also add verticesToPolys, polysToVertices conversion functions and reduceMeshByPolys for selecting mesh subsets by polygon. Reviewed By: fbogo Differential Revision: D94579400
58d1584 to
9de545e
Compare
cdtwigg
added a commit
that referenced
this pull request
Mar 4, 2026
Summary: Pull Request resolved: #1068 reduceMeshInternal (used by reduceMeshByFaces, reduceMeshByVertices, and reduceMeshComponents) didn't handle the polyFaces/polyFaceSizes/polyTexcoordFaces fields. After a mesh subset operation, the polygon data would be stale. Add remapPolyFaces helper to filter and remap polygon data during mesh reduction, using the same active-vertex logic as triangulated faces. Also add verticesToPolys, polysToVertices conversion functions and reduceMeshByPolys for selecting mesh subsets by polygon. Reviewed By: fbogo Differential Revision: D94579400
9de545e to
aadce7a
Compare
cdtwigg
added a commit
that referenced
this pull request
Mar 4, 2026
Summary: Pull Request resolved: #1068 reduceMeshInternal (used by reduceMeshByFaces, reduceMeshByVertices, and reduceMeshComponents) didn't handle the polyFaces/polyFaceSizes/polyTexcoordFaces fields. After a mesh subset operation, the polygon data would be stale. Add remapPolyFaces helper to filter and remap polygon data during mesh reduction, using the same active-vertex logic as triangulated faces. Also add verticesToPolys, polysToVertices conversion functions and reduceMeshByPolys for selecting mesh subsets by polygon. Reviewed By: fbogo Differential Revision: D94579400
aadce7a to
ffc1f2a
Compare
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
Summary: reduceMeshInternal (used by reduceMeshByFaces, reduceMeshByVertices, and reduceMeshComponents) didn't handle the polyFaces/polyFaceSizes/polyTexcoordFaces fields. After a mesh subset operation, the polygon data would be stale. Add remapPolyFaces helper to filter and remap polygon data during mesh reduction, using the same active-vertex logic as triangulated faces. Also add verticesToPolys, polysToVertices conversion functions and reduceMeshByPolys for selecting mesh subsets by polygon. Reviewed By: fbogo Differential Revision: D94579400
ffc1f2a to
fbbb3cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
reduceMeshInternal (used by reduceMeshByFaces, reduceMeshByVertices, and
reduceMeshComponents) didn't handle the polyFaces/polyFaceSizes/polyTexcoordFaces
fields. After a mesh subset operation, the polygon data would be stale.
Add remapPolyFaces helper to filter and remap polygon data during mesh reduction,
using the same active-vertex logic as triangulated faces. Also add verticesToPolys,
polysToVertices conversion functions and reduceMeshByPolys for selecting mesh
subsets by polygon.
Differential Revision: D94579400