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

use the un-linearized lambert transparency to author displayOpacity when using displayColors shading mode #751

Conversation

mattyjams
Copy link
Contributor

Prior to PR #707, the un-linearized transparency value was being used to compute a transparency "average", which was then used to author displayOpacity on the bound gprim if it did not already have an authored displayOpacity, as well as a displayOpacity input on the shader prim. It looks like an unintended side effect of #707 was that it was made to use the linearized transparency for this purpose instead. Note the use of the linearized transparency instead of the previously un-linearized mayaTransparency here:
https://github.com/Autodesk/maya-usd/pull/707/files#diff-5fe2e05011c04068f0f7249a36061532R138

Both of these behaviors seem somewhat dubious. It doesn't really seem like the shading mode exporter should be authoring displayOpacity of the bound gprim, since that is more a property of the geometry than the material. It also doesn't appear as if the displayOpacity input being authored on the shader prim is used for anything.

Ignoring those two oddities for now, the changes here should address the "regression" introduced by #707. We can revisit the behavior of the displayColors shading mode (or better yet work towards removing it!) in follow-up commits.

Prior to PR Autodesk#707, the un-linearized transparency value was being used to
compute a transparency "average", which was then used to author displayOpacity
on the bound gprim if it did not already have an authored displayOpacity, as
well as a displayOpacity input on the shader prim. It looks like an unintended
side effect of Autodesk#707 was that it was made to use the linearized transparency for
this purpose instead.

Both of these behaviors seem somewhat dubious. It doesn't really seem like the
shading mode exporter should be authoring displayOpacity of the bound gprim,
since that is more a property of the geometry than the material. It also
doesn't appear as if the displayOpacity input being authored on the shader prim
is used for anything.

Ignoring those two oddities for now, the changes here should address the
"regression" introduced by Autodesk#707. We can revisit the behavior of the
displayColors shading mode (or better yet work towards removing it!) in
follow-up commits.
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.

OK, I see the mistake I made in previous PR. Fix looks good to me.

@JGamache-autodesk JGamache-autodesk added the ready-for-merge Development process is finished, PR is ready for merge label Sep 9, 2020
@kxl-adsk kxl-adsk merged commit c74651e into Autodesk:dev Sep 9, 2020
@mattyjams mattyjams deleted the pr/use_unlinearized_lambert_transparency_for_displayOpacity branch September 9, 2020 20:32
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants