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

Resolution of UDIM texture paths inside USDZ archives fails #1558

Closed
dalorin opened this issue Jul 13, 2021 · 2 comments
Closed

Resolution of UDIM texture paths inside USDZ archives fails #1558

dalorin opened this issue Jul 13, 2021 · 2 comments

Comments

@dalorin
Copy link

dalorin commented Jul 13, 2021

Description of Issue

It is not possible to resolve paths to UDIM textures that are located inside a USDZ archive. This is because the utility function _ResolveAssetAttribute located in materialParamUtils.cpp does not account for the presence of usdz reference syntax e.g. /path/to/file.usdz[0/texture.png] when sanity checking the suffix post-resolution here. As a result, the return SdfAssetPath object does not contain a resolved path and renderers will treat texture paths such as "0/texture.png" as absolute and fail.

Steps to Reproduce

  1. Create a USD file containing a model with attached texture using UDIMs.
  2. Run usdzip with -a flag against the USD file to create a usdz archive containing the texture files.
  3. Attempt to render the usdz archive with a hydra render delegate. In the case of arnold, the following output is produced:
    00:00:00 535MB ERROR | [texturesys] could not read resolved image filename = "2/alien_Opacity.1007.tif"

System Information (OS, Hardware)

CentOS 7, python 2.7.17

I have a patch for this issue that I will raise in a pull request if this issue is confirmed.

unionvfx added a commit to unionvfx/USD that referenced this issue Jul 14, 2021
…nction to fix resolution of UDIM texture paths internal to USDZ archives
@jilliene
Copy link

Filed as internal issue #USD-6786

@sunyab
Copy link
Contributor

sunyab commented Jul 16, 2021

Hi @dalorin, I can confirm the issue is exactly as you've said. We have a fix internally pending review and testing but it'll be at least a week or so before we can push that up due to some office outages. I'll add some notes to the PR as well. Thanks!

marktucker pushed a commit to sideeffects/USD that referenced this issue Aug 9, 2021
The transformation of the resolved path for the first udim tile
to re-include the "<UDIM>" placeholder did not account for the
possibility that the path would be a package-relative path,
like /foo/bar/asset.usdz[image.0001.jpg]. It does now.

Fixes PixarAnimationStudios#1558

(Internal change: 2180511)
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

No branches or pull requests

3 participants