Material Import fails to set texture paths when shader inputs:file properties are connected
andrewkaufman opened this issue · 5 comments
Describe the bug
I have a Material Prim serving as an interface for a shader network. Attributes on the Material connect to attributes on the shaders. When I load this scene via the Layer Panel it all works as expected. When I instead File->Import this scene, the textures fail to load onto the Maya shaders (even with importUSDZTextures=1
).
Steps to reproduce
- Download the usdz from the source data google drive link below
- Open Maya, load maya-usd plugin
- Open Layer Editor, Create Stage from File, Select the usdz, Enable texture shading in the viewport -> Success
- File New, File->Import, Select the usdz, Enable "Import USDZ Textures" in the file type specific import options, Enable texture shading in the viewport -> Fail
Expected behavior
The viewport should render steps (3) and (4) the same way, which should appear as a cube mesh with a cracked stone texture.
Attachments
Source data: https://drive.google.com/file/d/1qUHkOrtXG55vjtSAMl-i0qhnykPgezqr/view
Specs
- Maya 2024.2
- Maya USD 0.25.0
Additional context
The Material Prim is serving as an interface for the shader network. The AssetPath texture inputs are specified on the Material Prim, and the actual inputs:file
properties on the UsdUVTexture shaders are connected to the inputs on the Material Prim. If I delete this interface & instead set the Shader prim inputs directly, then the Maya textures are setup correctly via File->Import.
thank you for reporting this.
I will bring the discussion to the team to investigate a bit deeper, although, this might be just a limitation of the importer. As maya would have to change those connections in order to convert the shader network properly - i could be wrong on this though. I will take a look at your original file attached and see what i can find :)
I don't see why Maya would have to remove those connections when importing. The equivalent Maya shader network should be custom attributes added to the shadingEngine
and connected to the fileTextureName
on the file
shaders.
PS. @santosg87 I will try to open up permessions on the example file. I granted you access for now, but I may have to swap the link to a different storage to make it fully open to the public.
I have replaced the google drive link with a new one that is hopefully fully open to the public. Let me know if you have trouble accessing it.