-
Notifications
You must be signed in to change notification settings - Fork 202
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-102319 - Material import options rework #822
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The major item of this work is to remove the material import dropdown in favor of a single checkbox for importing materials or not. The strategy is to provide a list of shadingModes to try in the import options and let the code execute each one in sequence until a material is found. Major work: The shadingMode import option is now a list of shading modes to try. - Added code to extract array of tokens from options string. - Added code to generate options string containing arrays - The mayaUSDListShadingModes command will list the modes in a predefined order that tries more complex shading modes first. - The pxrRis shadingMode import has been made more strict to let other shading modes succeed. - Shading modes that declare a renderContext will no longer explore the universal context. This allow universal context shading modes importers to successfully run. Added materialConversion support for import modes. This mirrors the export mode exactly. - Added registry functions to register an importer with materialConversion. - Shares and uses the renderContext concept used for export. - Renamed shadingConversion to preferredMaterial to prevent confusion. This represents an optional "convertTo" that can be added on top of the "convertFrom" that materialConversion represents. Other work: The displayColor shading mode is removed in favor of a better handling of the exportDisplayColor geometry option. This fixes #520. - The exportDisplayColor now default to false - The exportOptions MEL script has been reworked to still present a Display Color material export that toggles the exportDisplayColor import option. Minor work: - SetPlugValue can now handle 4x4 matrices - UsdPreviewSurface added to the list of preferred materials on import. Support for displayColor import/export added. - PhongE removed from list of preferred materials on import. - Symmetric shader writer now skips hidden attributes. - vp2RenderDelegate will convert linear displayColor to Maya to provide better color match between the original lambert and the displayColor.
test/lib/usd/translators/UsdImportCustomConverterTest/UsdImportCustomConverterTest.usda
Show resolved
Hide resolved
mattyjams
approved these changes
Oct 9, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I had a few minor notes, but nothing too critical.
I have to admit that just reading through the code, it's a little confusing to understand how the conversion aspect of it works, but I'm hoping that becomes clearer once we start playing with it.
…lti_material_import
kxl-adsk
added
the
ready-for-merge
Development process is finished, PR is ready for merge
label
Oct 14, 2020
mattyjams
added a commit
to mattyjams/maya-usd
that referenced
this pull request
Oct 14, 2020
…odesk#822 Internally, we have a post-process to the testUsdExportSkeleton test that diffs the generated USD against this baseline. Following the merge of PR Autodesk#822, the test began to fail since displayColor was no longer being exported with shadingMode=none.
mattyjams
added a commit
to mattyjams/maya-usd
that referenced
this pull request
Oct 14, 2020
…ing Autodesk#822 Internally, we still run the testUsdExportRenderLayerMode test with MAYA_ENABLE_LEGACY_RENDER_LAYERS turned on. The test began failing following the merge of PR Autodesk#822 since displayColor was no longer being exported. This change gets the test passing again by turning on the exportDisplayColor when calling cmds.usdExport().
mattyjams
added a commit
to mattyjams/maya-usd
that referenced
this pull request
Oct 14, 2020
…utodesk#822 Internally, we have a post-process to the testProxyShapeDrawColors test that diffs a render generated from the viewport against a baseline. Following the merge of PR Autodesk#822, the test began to fail since displayColor was no longer being exported with shadingMode=none, so the color represented in the image was different. This change turns on the exportDisplayColor option to cmds.usdExport() so that displayColor is present in the exported USD, and the rendered image matches the baseline again.
mattyjams
added a commit
to mattyjams/maya-usd
that referenced
this pull request
Oct 14, 2020
…utodesk#822 Internally, we have a post-process to the testProxyShapeDrawColors test that diffs a render generated from the viewport against a baseline. Following the merge of PR Autodesk#822, the test began to fail since displayColor was no longer being exported, so the color represented in the image was different. This change turns on the exportDisplayColor option to cmds.usdExport() so that displayColor is present in the exported USD, and the rendered image matches the baseline again.
kxl-adsk
pushed a commit
that referenced
this pull request
Oct 15, 2020
…aseline update baseline USD file for testUsdExportSkeleton test following #822
kxl-adsk
pushed a commit
that referenced
this pull request
Oct 15, 2020
…rMode_displayColor_export enable exportDisplayColor in testUsdExportRenderLayerMode test following #822
kxl-adsk
pushed a commit
that referenced
this pull request
Oct 15, 2020
…s_displayColor_export enable exportDisplayColor in testProxyShapeDrawColors test following #822
This was referenced Oct 16, 2020
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
ready-for-merge
Development process is finished, PR is ready for merge
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The major item of this work is to remove the material import dropdown in favor of a single checkbox for importing materials or not. The strategy is to provide a list of shadingModes to try in the import options and let the code execute each one in sequence until a material is found.
Major work:
The shadingMode import option is now a list of shading modes to try.
Added materialConversion support for import modes. This mirrors the export mode exactly.
Other work:
The displayColor shading mode is removed in favor of a better handling of the exportDisplayColor geometry option. This fixes #520.
Minor work: