Autodesk / Autodesk/maya-usd

Texture paths are resolved differently by Maya and the exporter

Open
#3,201 1 comment 0 reactions 1 assignee Claimed by @santosg87 View on GitHub
bug
Dominant language
Wolfram Language
Stars
905
Forks
223
Avg merge
2d 5h
Merged PRs (30d)
16

Description

**Describe the bug**
Maya appears to try multiple ways to resolve a texture path, which can cause scenarios where a texture fails to resolve correctly for the USD exporter. This results in USDZ files without any textures at all.

It appears that Maya will try and find missing textures in sourceImages, even if the file node shows an absolute path that doesn't exist. As long as a texture with the same base filename exists in sourceImages, it will be substituted by Maya.

However, since this behaviour isn't exposed to USD, the asset path resolution will then correctly fail.

**Steps to reproduce**
Steps to reproduce the behavior:
1. Create a Maya workspace and add some textures to the `sourceImages` directory
2. Create a Maya scene in this workspace with an object.
3. Assign the texture to the object but make sure to use the absolute path.
4. Relocate the workspace
5. Try to export the scene to a USDZ

The USDZ will be missing the textures because the Path given to it by Maya does not actually exist.

**Expected behavior**
Maya should show the texture is missing. Instead it substitutes it with any filename match within sourceImages.
The USDZ will have missing textures because the path it is given does not exist.

Tried with Maya 2024.1 and the latest Maya USD version.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.