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-111691] Support for card drawMode with textures in Viewport2.0 #1382

Closed
radon199 opened this issue Apr 30, 2021 · 17 comments · Fixed by #1463
Closed

[MAYA-111691] Support for card drawMode with textures in Viewport2.0 #1382

radon199 opened this issue Apr 30, 2021 · 17 comments · Fixed by #1463
Assignees
Labels
enhancement New feature or request vp2renderdelegate Related to VP2RenderDelegate

Comments

@radon199
Copy link

Is your feature request related to a problem? Please describe.
Viewport 2.0 does not support the UsdGeom.modelAPI card displayMode with textures. Even if the texture attributes are assigned the card will draw as a default cross.
I think this is due to the fact that card draw mode is done with a custom material, and that material has not been translated into a Maya fragment graph like UsdPreviewSurface and the other related nodes have been.
We use this feature in production to remove the cost of drawing complex assemblies by instead drawing them as a single rendered card.
Can we have this feature of Hydra supported?

@radon199 radon199 added the enhancement New feature or request label Apr 30, 2021
@kxl-adsk kxl-adsk added the vp2renderdelegate Related to VP2RenderDelegate label May 3, 2021
@wtelford wtelford added the reproduced Issue has been reproduced label May 3, 2021
@wtelford wtelford removed their assignment May 3, 2021
@santosd santosd self-assigned this May 3, 2021
@radon199
Copy link
Author

radon199 commented May 3, 2021

The custom material I was mentioning is this, which UsdImagingGL will assign when processing the draw mode :
https://github.com/PixarAnimationStudios/USD/blob/release/pxr/usdImaging/usdImagingGL/shaders/drawMode.glslfx

@santosd
Copy link
Collaborator

santosd commented May 4, 2021

Hello @radon199 , Thank you for sending a link to the material. Wondering if you could send us a usd file that is setup to reproduce the issue so we can take a look at this one. Thank you.

@radon199
Copy link
Author

radon199 commented May 7, 2021

I have something and am just waiting on approval to add it here.

@radon199
Copy link
Author

@santosd Please find the following attached zip file containing and example usd, card textures and reference images.

As you can see the embedded display mode draws with the card images in Storm, but not in viewport2.0 where it draws as intersecting cards.

Also in Storm, when card images are not attached, the shader will only draw the face that points at the camera, to prevent the overlapping faces.

Storm (Through Maya2Hydra):
storm_hydra

Viewport 2.0:
viewport2

DisplayCardExample.zip

@santosd
Copy link
Collaborator

santosd commented May 13, 2021

Hi @radon199, am I missing something? Here are the results for me in VP2 and Hydra:

VP2
image

MtoH Hydra:
image

I also opened the file in USD view and still don't get anything on the cards.

@radon199
Copy link
Author

@santosd Sorry, I forgot to make the image file paths relative in the asset usd. Please see the following updated set of data that hopefully will work. I tested it in usdview on a second machine.

DisplayCardExample.zip

@santosd
Copy link
Collaborator

santosd commented May 13, 2021

@radon199, Thank you for the file. I should have caught that the paths were not relative, my bad. I spoke with the team and will be logging this one internally so that we can take a look into adding this support into the VP2 render delegate.

@santosd santosd changed the title Support for card drawMode with textures in Viewport2.0 [MAYA-111691] Support for card drawMode with textures in Viewport2.0 May 13, 2021
@dj-mcg
Copy link
Collaborator

dj-mcg commented May 26, 2021

FWIW, this is currently one of the last remaining blockers for adoption at Pixar. Thanks for having a look!

@williamkrick
Copy link
Contributor

@radon199 would it be alright with you if I use your DisplayCardExample scene as the basis for an automated test in MayaUSD?

@radon199
Copy link
Author

radon199 commented Jun 4, 2021

@williamkrick From my side (ie what is setting card mode and the textures) it is fine, only thing to note was the fridge asset itself is from the Pixar kitchen dataset.

@kxl-adsk kxl-adsk linked a pull request Jun 4, 2021 that will close this issue
@dj-mcg
Copy link
Collaborator

dj-mcg commented Jun 4, 2021

Hey folks, I'm asking about usage of the fridge asset with the USD team and Pixar legal right now. I'll hopefully have an answer for you shortly

@dj-mcg
Copy link
Collaborator

dj-mcg commented Jun 4, 2021

It sounds like the Pixar lawyers asked the USD team us to make sure that anyone downloading Pixar assets have to go through a EULA wall, which we probably don't want to have to force on users. There is already a Pixar test for cards mode that has a test asset we can probably copy in plugin/pxr/maya/lib/pxrUsdMayaGL/testenv/RefAssemblyDrawRepresentationsTest/

@williamkrick
Copy link
Contributor

Great I will use the existing asset. Thanks!

@wtelford wtelford removed the reproduced Issue has been reproduced label Jun 21, 2021
@dj-mcg
Copy link
Collaborator

dj-mcg commented Nov 20, 2023

Hi folks - I'm still not seeing the card images when opening the attached usda file when rendering with the vp2RenderDelegate despite this issue being closed a long time ago. I'm using Maya 2023.3 and MayaUsd 0.25.0. I'm on linux

@santosd
Copy link
Collaborator

santosd commented Nov 22, 2023

Hi @dj-mcg , looks like I validated this in Maya 2023, when I originally tested and I tried again today in Maya 2024 with 0.25.0 so it should be working on your end. Once thing to note is that we also added support for texture mode in Maya 2023.3. I know by default texture mode is turned off so in order to see the textures on the cards you would need to enable texture mode. Let me know if that helps, if not, I will take a look at 2023.3 and see if I see the issue on my end.

@dj-mcg
Copy link
Collaborator

dj-mcg commented Nov 22, 2023

@santosd - that was it! Thanks and sorry I missed that originally!

@dj-mcg
Copy link
Collaborator

dj-mcg commented Nov 22, 2023

Quick followup - is there an available interface to set drawMode on pointInstancers currently? I actually resorted to using a Pixar plugin... thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vp2renderdelegate Related to VP2RenderDelegate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants