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

Add support for outline selection hilighting and disabling color-quantization #469

Merged
merged 2 commits into from
May 1, 2020

Conversation

marsupial
Copy link
Contributor

Outline hi-lighting was added in 22.05, and color-quantization can make things extremely slow.

@kxl-adsk kxl-adsk requested a review from pmolodo April 27, 2020 19:46
@kxl-adsk kxl-adsk added the mtoh Related to legacy Maya to Hydra plugin. label Apr 27, 2020
Copy link
Contributor

@pmolodo pmolodo left a comment

Choose a reason for hiding this comment

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

This looks good to me!

template <typename T>
void _CreateNumericAttribute(
MFnDependencyNode& node, const TfToken& attrName, MFnNumericData::Type type,
typename std::enable_if<std::is_pod<T>::value, T>::type defValue) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Definitely approve of this addition (and the usage of enable_if!)

#endif
#if USD_VERSION_NUM >= 1911
R"mel(
attrControlGrp -label "Enable color quantization" -attribute "defaultRenderGlobals.mtohColorQuantization" -changeCommand $cc;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe change this to "Enable color quantization for selection-coloring", since that's a bit more descriptive.

Alternatively... I'd be fine if we didn't even make this an option, and just left it always off.

Copy link
Contributor Author

@marsupial marsupial Apr 27, 2020

Choose a reason for hiding this comment

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

The color quantization is on the frame buffer as a whole, it just happens to run in the 'colorizeTask'.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, really? Yuck... maybe I'm not understanding what this is doing, or why it's there, then - my knowledge of color science / color management is limited. But I'm not sure in what situations you'd want this on...?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does two things, a quantization/dithering (so that banding is less apparent) and conversion from linear->sRGB.

I imagine tying into Maya's color-management will eventually be the way to handle such things, but until then I'd like an easy way to make sure this is off.

Copy link

@kxl-adsk kxl-adsk left a comment

Choose a reason for hiding this comment

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

We maintain compatibility with older versions of USD as stated in https://github.com/Autodesk/maya-usd/blob/dev/doc/build.md#2-download-and-build-pixar-usd.

Your PR is failing to compile with USD 19.11 with the following error

\lib\mayaUsd\render\mayaToHydra\renderOverride.cpp(461): error C2039: 'SetColorizeQuantizationEnabled': is not a member of 'pxrInternal_v0_19__pxrReserved__::HdxTaskController'

Please fix it.

@marsupial
Copy link
Contributor Author

marsupial commented Apr 30, 2020

Fixed....Must have back ported that into our 19.11

@kxl-adsk kxl-adsk merged commit 5333400 into Autodesk:dev May 1, 2020
ppt-adsk pushed a commit that referenced this pull request Sep 27, 2023
…owser_ux

HYDRA 480 - add title to browser, make it stay in front of Maya main …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mtoh Related to legacy Maya to Hydra plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants