Skip to content

Fix UV shell connectivity when importing non-indexed faceVarying UVs - #4719

Merged
seando-adsk merged 1 commit into
Autodesk:devfrom
paulgolter:pgolter/fix-nonindexed-facevarying-uv-import
Aug 27, 2026
Merged

Fix UV shell connectivity when importing non-indexed faceVarying UVs#4719
seando-adsk merged 1 commit into
Autodesk:devfrom
paulgolter:pgolter/fix-nonindexed-facevarying-uv-import

Conversation

@paulgolter

Copy link
Copy Markdown
Contributor

Problem

When a mesh has a faceVarying UV primvar without authored indices (primvars:st but no primvars:st:indices — common for USD written by other DCCs), the importer creates one Maya UV per face vertex with no sharing.

The imported UV values themselves are correct, but no UVs are shared between neighboring faces, so every face becomes its own UV shell. A cube that should import with 14 UVs in a single shell instead imports with 24 UVs in 6 shells, and the layout falls apart into individual faces as soon as the UVs are edited.

The same data imports correctly when authored with indices, so whether an asset arrived intact depended on how the exporting application chose to write its UVs.

maya_uv_report_01

Fix

In assignUVSetPrimvarToMesh, when a faceVarying UV primvar has no authored indices, weld values that are equal on the same mesh vertex into a single shared UV and synthesize the assignment indices. Welding per vertex restores connectivity between adjacent faces without fusing UV islands that merely overlap in UV space (e.g. stacked/mirrored shells). The result is identical to what an indexed export of the same data would produce.

Indexed primvars, other interpolations, and the left-handed winding reversal are untouched.

Tests

Added a right-handed and a left-handed cube with non-indexed faceVarying UVs to the UsdImportUVSetsTest fixtures (both variants), with new cases in testUsdImportUVSets.py asserting values, UV count (14), and shell count (1). All existing UV set, mesh, and color set import tests pass.

A faceVarying UV primvar without authored indices was imported with one
Maya UV per face vertex, so every face ended up in its own UV shell even
where values matched along shared edges.

On import, weld UV values that are equal on the same mesh vertex into a
single shared UV and synthesize the assignment indices. Welding per
vertex restores the connectivity between adjacent faces without fusing
UV islands that merely overlap in UV space. Indexed primvars are
unaffected, as is the left-handed winding reversal.

Add right- and left-handed non-indexed cubes to the UV set import test
fixtures and cover both in testUsdImportUVSets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@seando-adsk
seando-adsk requested a review from barbalt August 26, 2026 16:33
@seando-adsk seando-adsk added the import-export Related to Import and/or Export label Aug 26, 2026
@barbalt barbalt added the ready-for-merge Development process is finished, PR is ready for merge label Aug 26, 2026
@seando-adsk
seando-adsk merged commit e8fcaaa into Autodesk:dev Aug 27, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

import-export Related to Import and/or Export ready-for-merge Development process is finished, PR is ready for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants