Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UsdUtils] Add UDIM support for dependencies/usdz and switch material… #2133

Closed
wants to merge 1 commit into from

Conversation

lbiasco
Copy link

@lbiasco lbiasco commented Dec 13, 2022

…ParamUtils to use shared functions

This PR is a continuation of the work from #1477, which is closed since the related accounts are no longer accessible. I tried to vet these changes as much as possible, but I wouldn't be surprised if there are some uses of UDIMs that I missed, so definitely let me know of any uncommon cases to include tests for.

Description of Change(s)

  • Added three UDIM utility functions to UsdUtils: UsdUtilsIsUdimIdentifier, UsdUtilsGetUdimFiles, and UsdUtilsResolveUdimPath. These are also Python-wrapped.
  • Switched UsdImaging's materialParamUtils to use these functions (the previous UDIM utilities were moved and are used by the functions).
  • Changed _AssetLocalizer to use these functions and include UDIM files with dependency computation and USDZ creation.
  • Added a test module for these UDIM functions and an additional dependency computation test. I didn't add a new USDZ test since the dependency test should account for the changes.
  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@sunyab
Copy link
Contributor

sunyab commented Jan 3, 2023

Filed as internal issue #USD-7832

@sunyab
Copy link
Contributor

sunyab commented Mar 31, 2023

Hi @lbiasco, just wanted to mention that we iterated on your change internally and wound up with something a bit larger than your PR here. We've committed that separately and will close out this PR when that commit hits the dev branch shortly. Thank you!

@lbiasco
Copy link
Author

lbiasco commented Mar 31, 2023

Awesome, thank you for the update!

pixar-oss pushed a commit that referenced this pull request Apr 3, 2023
 and contains the following items:

Creates a new UsdShadeUdimUtils class which has methods for working with Udim files.  This includes detecting the presence of a UDIM identifier, reoslving UDIM paths, and subsituting indices back into an identifier string. The core logic for these methods was lifted from UsdImaging's materialParamUtils

Updates UsdUtils dependencies resolution logic to use these new methods to ensure UDIM tiles are are correctly included as dependencies.

Updates UsdImaging's material parsm to make use of this new method

As a result of this change, usdUtils now has a dependency on usdShade

Thanks to @lbiasco for the foundations of this change!

Fixes #2133

(Internal change: 2268797)
@sunyab
Copy link
Contributor

sunyab commented Apr 3, 2023

Closing per previous comment, thanks!

@sunyab sunyab closed this Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants