maya-usd icon indicating copy to clipboard operation
maya-usd copied to clipboard

UsdGeomMesh degenerate triangles discarded

Open tryptik opened this issue 1 year ago • 1 comments

Describe the bug When importing Usd that uses meshes, Maya seems to discard degenerate triangles without warning. In addition, it fails to upadate the UV coordinates to account for the change in faces, which distorts the UV's and normals.

Steps to reproduce

  • Open Maya
  • Use "Create->Polygon Primitives->Cube"
  • From the "Modeling" menu set, use "Mesh->Triangulate" to triangulate the mesh
  • Optionally, add the cube texture file for better visualization.
  • Select the cube and export it as a .usda.
  • Using usdedit or an editor of your choice, open the exported file.
  • Select these face indices:
Image
  • Edit the indices to make the face degenerate and save the file.
Image
  • Re-import the .usda
  • Review the results.

Expected behavior Since any number of UsdGeomPrimvars could be applied in a similar manner as UVs, it may be best to have Maya error out when such a situation is encountered, as it may be difficult for users to diagnose this issue.

Attachments Here is the resulting cube_compare.mb file, with the good, imported and re-exported cube.

Image

Here is the resulting cube_compare.usda in UsdView:

Image

The middle cube is Usd's import of the cube with degenerate triangles, and the right cube is the re-export from Maya. Notably, Usd maintains the UV and normal mapping.

Specs (if applicable): MacOS 15.5 M1 Maya 2025.3 Cut: 202409190603-cbdc5a7e54 mayaUsdPlugin Bundle Version: 0.30.0 For API: 20250300 Maya USD commit: 966ce2d

tryptik avatar Apr 16 '25 18:04 tryptik

Thanks for reporting.

wallworm avatar Apr 28 '25 19:04 wallworm