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

Animated meshes do not import their UVs

Open dgovil opened this issue 4 years ago • 1 comments

Describe the bug Importing meshes with time sampled UV attributes leads to the importer failing to import the UV attributes. This is problematic because exporting an animated mesh cache out from the exporter will write all primvars as timesampled even if they're not, so it's not possible currently to roundtrip an animated mesh cache while maintaining normals.

I get the following errors:

Warning: in assignUVSetPrimvarToMesh at line 199 of lib/mayaUsd/fileio/utils/meshReadUtils.cpp -- Could not read UV values from primvar 'map1' on mesh: /pCube1
Warning: in assignPrimvarsToMesh at line 678 of lib/mayaUsd/fileio/utils/meshReadUtils.cpp -- Unable to retrieve and assign data for UV set <map1> on mesh </pCube1>

We are working around this internally by converting uv primvars to static instead of time sampled if they only have one sample. I think this might be a worthwhile optimization to apply to all primvars on write, though is tangential to this issue since the importer should still deal with animated uvs.

Steps to reproduce Steps to reproduce the behavior:

  1. Import attached usda file with Maya USD importer

Expected behavior I would expect the imported uvs to match the ones in the usda file

Attachments anim_mesh.usda.zip

Specs (if applicable):

  • macOS Catalina and Big Sur
  • Compiler version: Apple clang version 12.0.0 (clang-1200.0.32.5) (reproducible on older clang versions too)
  • Maya 2018.5 and 2020.0
  • Maya USD commit SHA ddcd319b7785a8cc586b3106ecd16cba25f9cb3c
  • Pixar USD commit SHA d8a405a1344480f859f025c4f97085143efacb53

dgovil avatar Dec 04 '20 20:12 dgovil