Autodesk / maya-usd

A common USD (Universal Scene Description) plugin for Autodesk Maya
769 stars 201 forks source link

Maya USD v0.20.0 and Pixar USD v21.11 #2810

Open nicolaspopravka opened 1 year ago

nicolaspopravka commented 1 year ago

Describe the issue The released v0.20.0 of mayaUSDPlugin.mll fails to load with Pixar USD v21.11 rebuilt from source, the version it was supposedly built against, because of missing symbols. Indeed, some header files are different between the ones shipped with USD for Maya 2023 and found in C:\Program Files\Autodesk\MayaUSD\Maya2023\0.20.0\mayausd\USD\devkit.zip, and Pixar's. It appears that USD was forked at Autodesk and the fork was used to build the released USD for Maya 2023 plugin.

There are two options to fix this problem:

  1. have access to the fork, rebuild USD from it, and link against it at runtime; all missing symbols should then be found
  2. rebuild and link v0.20.0 of USD for Maya 2023 against Pixar's USD v21.11; all missing symbols should then be gone

The first option is less work than the second, and more desirable. One difference in the forked version of USD is discussed here and could be cherry-picked in a local branch of v21.11. But are there others ? It's hard to tell without access to the fork. Are we then forced to rebuild USD for Maya 2023 ? Or would merging this commit be enough ?

Specs:

Additional context The use of USD rebuilt from source is required because a local branch with some minor fixes/improvements is used. But this isn't an issue with USD for Maya 2022 : the shipped plugin appears to work well when dynamically linked against the rebuilt USD (v21.08 in this case).

seando-adsk commented 1 year ago

Yes it is true that at Autodesk we have an (internal) fork of USD and some changes on top of v21.11 that we used to build USD. Along with that no-python ABI compatible change you mentioned we have an update to MaterialX v1.38.3 (includes one .h change). We also build both Alembic and OpenEXR statically (to avoid conflicts with libs from Maya). We don’t guarantee that our built version of USD is binary compatible with one that you would build from the source. Which is one reason why we provide a USD devkit.

Option 2 (rebuilding MayaUsd) against your own USD build should not be difficult. There is a build.py in the repo very similar to the Pixar one. If you have trouble building MayaUsd let us know and we can help.

Sean

nicolaspopravka commented 1 year ago

Thanks, that's good to know. I did rebuild USD for Maya in the past. I just rebuilt it for 2023 and the plugin loads, as expected. No need yet for MaterialX. It's not part of my USD build then, and I don't mind a regression, if any. I do have Alembic with HDF5 support though. But because HDF5 is needed, not Alembic, for a USD plugin. Anyway, it seems to work.

maya-usd-git-sync[bot] commented 1 year ago

Issue synced internally to EMSUSD-744