Autodesk / maya-usd

A common USD (Universal Scene Description) plugin for Autodesk Maya
760 stars 202 forks source link

VP2 RenderDelegate doesn't display shader output for materials #1848

Open dj-mcg opened 2 years ago

dj-mcg commented 2 years ago

Describe the bug USD Imaging (UsdView) supports the display of the output of custom shaders specified within the material. It appears that the VP2 Render Delegate does not draw these materials.

Steps to reproduce Steps to reproduce the behavior:

  1. Unzip the attachment
  2. Open the attached "GraphicsTest.usda" in UsdView
  3. Observe the green and white texture drawn on the mesh
  4. Open the same "GraphicsText.usda" file in MayaUSD
  5. Observe that only the display color (1,0,0) is displayed

Expected behavior MayaUSD displays the correct material data.

Specs (if applicable):

This is INTERNAL Pixar Jira MAYA-3152

dj-mcg commented 2 years ago

I realize this may not be something that is expected to be supported out of the box outside of HdSt, but users noticed this as this is a common format for our assets. Thanks for having a look

williamkrick commented 2 years ago

The team had a chat about this one today and we believe that it is a significant amount of work to solve. The glslfx file is a bit of shader code designed to work directly with the hdStorm shading system. It is unclear at this point how we could re-use it to render with Vp2RenderDelegate.

The challenge is we convert all the UsdPreviewSurface shader fragments to work with Maya to get support for lights and full-screen effects. We don't have an automatic process for that. So any non-trivial fragment most likely can't drop directly in. Meaning we need automatic conversion, or we need to allow the user to specify multiple versions of the fragment for different render delegates.

We are going to convert this issue to a feature.

gracekumagai commented 2 years ago

Hey @williamkrick, thank you for the feedback. We are going to look into using UsdPreviewSurface instead of glslfx with Maya.

santosg87 commented 1 year ago

@gracekumagai just checking back on this. was using UsdPreviewSurface with maya instead of glsl a successful endeavor?