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

Added vertex colour utility node and translation for USD preview surface #2016

Merged

Conversation

jonjondev
Copy link
Contributor

@jonjondev jonjondev commented Jan 23, 2022

This PR adds vertex colour functionality to the USD preview surface shader by adding a cpvColor utility node and implementing its connection as part of the USD translation of the displayColor primvar reader. While initial implementations utilised the MPxShaderOverride to add displayColor as a feature of the USD preview surface node itself, we eventually landed on adding it as a separate utility node, so that it could more closely mimick USD shade's functionality, and provide greater flexibility.

The images below demonstrate it in action (left is lambert shading, middle is preview surface shading, right is proxy shape):

@kxl-adsk kxl-adsk added import-export Related to Import and/or Export vp2renderdelegate Related to VP2RenderDelegate labels Jan 24, 2022
@fabal fabal force-pushed the J-Mo63/usdpreviewsurface-cpv-shading branch from 2a50db4 to c087d76 Compare January 25, 2022 00:24
Copy link
Collaborator

@JGamache-autodesk JGamache-autodesk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and covers the most frequent use case. Thanks!

@JGamache-autodesk
Copy link
Collaborator

The unit tests fail because test/lib/usd/translators/testUsdImportPreviewSurface.py is executed without UI in mayabatch.
Please move the unit test to test\lib\mayaUsd\render\vp2RenderDelegate\testVP2RenderDelegateUSDPreviewSurface.py which is a Maya-interactive test.

@jonjondev
Copy link
Contributor Author

The unit tests fail because test/lib/usd/translators/testUsdImportPreviewSurface.py is executed without UI in mayabatch. Please move the unit test to test\lib\mayaUsd\render\vp2RenderDelegate\testVP2RenderDelegateUSDPreviewSurface.py which is a Maya-interactive test.

Ah! Thanks for that. I'd been trying to figure out why it couldn't find any panels.

@fabal fabal force-pushed the J-Mo63/usdpreviewsurface-cpv-shading branch from cde28d5 to 351dd61 Compare January 27, 2022 03:37
@kxl-adsk kxl-adsk merged commit eaf5a2c into Autodesk:dev Jan 27, 2022
@jonjondev jonjondev deleted the J-Mo63/usdpreviewsurface-cpv-shading branch January 27, 2022 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
import-export Related to Import and/or Export vp2renderdelegate Related to VP2RenderDelegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants