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

Material Import fails to set texture paths when shader inputs:file properties are connected #3836

Open
andrewkaufman opened this issue Jun 25, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@andrewkaufman
Copy link

andrewkaufman commented Jun 25, 2024

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

  1. Download the usdz from the source data google drive link below
  2. Open Maya, load maya-usd plugin
  3. Open Layer Editor, Create Stage from File, Select the usdz, Enable texture shading in the viewport -> Success
  4. 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

Via Layer Editor:
image

Via Import:
image

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.

@andrewkaufman andrewkaufman added the bug Something isn't working label Jun 25, 2024
@santosg87
Copy link
Collaborator

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 :)

@andrewkaufman
Copy link
Author

andrewkaufman commented Jun 26, 2024

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.

@andrewkaufman
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants