Skip to content

Updates to Web Viewer to allow values outside of 'uisoftmin' and 'uisoftmax'#2930

Open
paytonGilbertson wants to merge 8 commits into
AcademySoftwareFoundation:mainfrom
paytonGilbertson:dev_color4_hsv
Open

Updates to Web Viewer to allow values outside of 'uisoftmin' and 'uisoftmax'#2930
paytonGilbertson wants to merge 8 commits into
AcademySoftwareFoundation:mainfrom
paytonGilbertson:dev_color4_hsv

Conversation

@paytonGilbertson

Copy link
Copy Markdown
Contributor

(#1817) Allow for users to manually input values outside of the soft min and soft max in the web viewer

Changes made in

  • viewer.js

paytonGilbertson and others added 5 commits May 14, 2026 11:37
`mx_rgbtohsv` and `xm_hsvtorgb` had hardcoded output alpha set to `1.0`. The alpha channel should forward the preexisting alpha value `_in.a` unchanged.
Signed-off-by: Payton Gilbertson <pgilbertson@ilm.com>
@jstone-lucasfilm

Copy link
Copy Markdown
Member

This looks very promising, thanks @paytonGilbertson!

As it turns out, we introduced a subtle bug in the MaterialX Web Viewer yesterday, and I've written up a proposed fix at #2931.

Since your work depends on the correct functioning of the Web Viewer, I'd like to review and merge the fix above before reviewing your improvement, so that your work can be tested in the full context of the working viewer.

@kwokcb kwokcb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you need to keep track of a soft and hard min/max as if there is a soft min/max but no hard min/max it will compute a different step size with this change.

@jstone-lucasfilm

Copy link
Copy Markdown
Member

@paytonGilbertson In addition to Bernard's review note above, which sounds logical to me, I'll just mention that #2931 has now been merged to main, and you can merge from main to your PR if you'd like to test with the full range of material examples.

if (nodeDefInput.hasAttribute('uistep'))
step = nodeDefInput.getAttribute('uistep').split(',').map(Number);
}
for (let i = 0; i < 4; ++i)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry for being nit-picky + lack of clarity and in the previous comment. Step is computed based on both hard / soft min / max. So to preserve previous logic soft min / max still needs to be stored somewhere and used here. Maybe just keep a stepMinValue and stepMaxValue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants