arnold-usd
arnold-usd copied to clipboard
Cannot open textures inside a usdz file
Arnold encounters error when loading a usdz file that has embedded textures.
To Reproduce
- Download usd test file simpleMaterial.usdz
- Run:
usdview --renderer Arnold simpleMaterial.usdz
- Get error
ERROR | [texturesys] Image "C:\Users\treborc\Documents\usdme\pxr\usd\lib\usdUtils\testenv\testUsdUtilsCreateNewUsdzPackage\nestedUsdz\simpleMaterial.usdz[0/USDLogoLrg.png]" does not exist. Also, it is not the name of an image format that OpenImageIO recognizes.
Expected behavior Able to open the usdz file without errors and load texture
Used Software Versions
- Arnold: [5.4.0.0]
- USD: [0.19.11]
- Compiler: [MSVC 2017]
- OS: [Windows 10]
These textures are most likely accessible through ArAsset, which either reads the contents into memory or provides a filehandle and an offset to access the file data.
There are two approaches, either using temporary files or passing the file data directly to an image node. I'm not a big fan of using temporary files for something like this. For example, there isn't a clear API that gives you a temporary file and still guarantees removal even in the case of a hard crash on Linux.
If we pass the image data directly to the image node in arnold, we can either use a unit8_t[]
similarly to the openvdb volume or pass the raw file handle.
The advantages of the filehandle and the temporary file approach is that we can still take advantage of OIIO's lazy loading, so that would be way more efficient than loading all the texture to memory.
Hi there
Is there any ETA for this to be picked up? It's currently blocking development of a pipeline project at our studio.
Alternatively, if someone could give some tips for a good starting point I'd be happy to give this a go myself.
Regards
Hi again
It'd be great to know if this is on the roadmap. I've developed a patch that decompresses the USDZ archive and rewrites the file path to point to the temp location, but there's almost certainly a better solution using ArAsset. I'm just not sure how to pass a file handle when a file path is expected.
Regards
Hi there, me again
I'd really love to get this implemented. It's one of the major remaining impediments to the way we'd like our pipeline to operate. Any chance of getting this on the roadmap?
Regards
Issue synced internally to ARNOLD-13226
Hi, Closing this ticket are Arnold 7.2.5 is now able to read usdz with textures. https://help.autodesk.com/view/ARNOL/ENU/?guid=arnold_core_7250_html