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

[MAYA-126919] Request to use displayColor when disabling "Textured" in the viewport #2802

Open
chrizzFTD opened this issue Jan 4, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@chrizzFTD
Copy link

chrizzFTD commented Jan 4, 2023

Hi maya-usd team, happy new year!

I was unsure if this is a bug or a feature request, so I'm logging this as a "Feature request".

Context
This relates to the request from #2206 to allow a USD Stage to "listen" to the Textured control from the viewport toolbar:

image

Current Behavior

With the update from #2599, textures get disabled (good) but meshes are drawn with black color instead of drawing according to their displayColor property.

This magazines.zip zip file contains the usdz stage from entity/books_magazines01/books_magazines01.usda from the ALab phase 2.

Go to Create / Universal Scene Description (USD) / Stage From File... and select the zip file. You can see how toggling the Textured button goes from textured geometry to black geometry:

maya_disable_materials

When loading the complete ALab set, the same happens:

texture_disabled_shows_black_instead_of_displayColor

Expected Behavior

USDView and Houdini respect displayColor when disabling scene materials, which is why as a user, I would expect for Maya to do the same. In the ALab example, we can see that meshes which did not have a material previously applied, continue to draw with displayColor:

image

USDView exposes this with the Enable Scene Materials menu:

image

usdview_disable_materials

Houdini does it with the Display Materials on Objects toggle:

houdini_disable_materials

Could the Maya Textured toggle follow the same approach?

Thanks!

@chrizzFTD chrizzFTD added the enhancement New feature or request label Jan 4, 2023
@chrizzFTD chrizzFTD changed the title Request to respect gprim's displayColor when disabling "Textured" in the viewport Request to draw using displayColor when disabling "Textured" in the viewport Jan 4, 2023
@chrizzFTD chrizzFTD changed the title Request to draw using displayColor when disabling "Textured" in the viewport Request to use displayColor when disabling "Textured" in the viewport Jan 4, 2023
@santosd
Copy link
Collaborator

santosd commented Jan 5, 2023

Hi @chrizzFTD, Thank you for reporting this. I think this would be a great addition. I will go ahead and log this internally as I believe it may require some Maya side changes.

@santosd santosd self-assigned this Jan 5, 2023
@santosd santosd changed the title Request to use displayColor when disabling "Textured" in the viewport [MAYA-126919] Request to use displayColor when disabling "Textured" in the viewport Jan 5, 2023
@santosd
Copy link
Collaborator

santosd commented Jan 5, 2023

This issue was internally logged as MAYA-126919.

@wallworm
Copy link
Collaborator

We are working to address this. Since we found that this may not accommodate those studios/users that don't want the display colors in this case, we intend to make a User Preference that will choose the behavior: Case #1, keep current behavior and Case #2 display the displayColor.

@neilh-adsk neilh-adsk moved this to Scheduled in maya-usd Nov 6, 2023
@maya-usd-git-sync
Copy link

Issue synced internally to EMSUSD-742

@Ziethriel
Copy link

We are working to address this. Since we found that this may not accommodate those studios/users that don't want the display colors in this case, we intend to make a User Preference that will choose the behavior: Case #1, keep current behavior and Case #2 display the displayColor.

Having the user preference will be nice, since we probably wouldn't want to have the vertex colors in untextured mode. However we would like to have the option to "Toggle Display Colors Attribute" like mentioned in my issue below:

#3299

Maybe the keep current behavior can add this change?

@alex-savenko-at-cinesite

The suggested solutions (#1 and #2) can only be applied to diffuseColor input of USdPreviewShader. What happens if the preview shader has connections to opacity, specularColor or any other parameter of the preview shader? It would be great if those cases could be supported too. If you are planning to use a preference option already, can you please consider supporting option #3: "fallback option".

When hardware texturing is disabled, the preview shader should use fallback parameter of the connected UsdUVTexture or UsdPrimvarReader shaders instead of using the connected shaders themselves. In other words, the shader should behave in the same way as if the specified texture or the primvar was not found.

The benefits of the option #3:

  • it does not rely on an extra attribute (displayColor). All fallback values are specified in the shader itself
  • it supports all inputs of UsdPreviewShader, not just diffuseColor. This can be particularly important for metallic shaders that do not have a valid diffuse color.
  • it should not affect speed of the preview or the amount of GPU memory. It might be even faster than "displayColor" preview if displayColor is specified as a vertex attribute

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Scheduled
Development

No branches or pull requests

5 participants