-
Notifications
You must be signed in to change notification settings - Fork 351
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
Document edge case for image nodes #1776
Document edge case for image nodes #1776
Conversation
This changelist documents an edge case in the handling of image node channels, improving the robustness of the MaterialX specification, and aligning it with the current behavior of the MaterialX codebase.
Question about the behavior, as it doesn't match what we do in USD imaging. If the original image was RGBA, and the alt is RGB, I think RGB1 makes more sense than RGB0, especially if one is treating the image as premultiplied. In other words, we fill in channels with zero yes, but alpha is filled with one. Principle of least surprise, and more correct. |
That's a really interesting proposal, @meshula. If we were to follow the line of thought you suggest here, then perhaps it would be more consistent to state that referenced image data is processed through a The rule set for These rules are stated here in the specification, and I'll copy the relevant details below:
|
That sounds preferable indeed. |
@meshula I'd be fine with moving over to that approach in MaterialX, as long as these rules would be acceptable to the USD team as well. Does that sound like a path forward that would work for both teams? |
Here is the algorithm that we have, maybe we can work to reconcile differences. Note that UINT textures have an odd behavior, but I think that specific behavior does not matter to MaterialX? The fundamental difference we have is that we are propagating missing channels and your rules are appending a 1. I will send you a note as to why this is.
|
@meshula I'd recommend that we take this update in two steps, first aligning the specification and codebase for MaterialX, and then updating both in tandem to propose a new expected behavior for image nodes. If that sounds fine to you, then I'll merge this existing change, and add a new GitHub Issue for the additional change proposed here. |
I've added a corresponding GitHub Issue for this proposal here: |
e2659ba
into
AcademySoftwareFoundation:dev_1.39
This changelist documents an edge case in the handling of image node channels, improving the robustness of the MaterialX specification, and aligning it with the current behavior of the MaterialX codebase.