-
-
Notifications
You must be signed in to change notification settings - Fork 56
Use correct diffuse color #991
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
Conversation
Thanks for this! In the pr's current state, it changes the behavior of colormode quite a bit. I think the existing colormode options should select a single color source, as the do in |
Uh, I don't quite understand, but the current color mode does have only one color source, which is consistent with the original behavior. The only difference from before is that when the color mode is not explicitly set (i.e. when using the default auto), Mesh rendering will integrate all colors. |
I think it would be helpful to do a full triage over the different Lines 57 to 68 in e08965a
My initial preference was to maintain the behavior of 'auto' (which selects one color source) and add a new option 'all' that combines them, but I'm also open to change the behavior of auto, but then we need to update its docs (in the above enum). |
From my usage perspective, the explicit "color_mode" configuration for mesh rendering appears counterintuitive. Based on typical workflow patterns:
I feel that color_mode may become a hidden feature, and most users may not pay attention to this attribute unless specific users are aware of color_mode and may use it in certain limited situations. |
I understand that some groups of users expect the behavior that you describe. But I also believe there are also users, especially in interactive settings (data explorations) who may have vertex colors and want to switch between a uniform color, vertex colors etc. at runtime. Anyway, with the current implementation we have the default that you want, but also the option to support the special cases I care about 😄 Are the CI errors related to the recent changes in pylinalg? |
Yes.. looks like we need to support 3D and higher ndim arrays as well. I will add it to the test suite and release a patch. |
Done. :) See pygfx/pylinalg#105. I also created pygfx/pylinalg#106 to prevent this from happening again. |
Fixed the logic of diffuse color, retained color_mode, compatible with previous behavior. By default, when color_mode is auto, diffuse color will use all "uniform color”, “vertex color”, and “color map".
See: #930 for detail.
Test Case 1: Vertex Color Test

Test Case 2: Compare Base Color

Note: In this test case, Due to the fact that extension “KHR_texture_transform” has not been implemented yet, there are some differences( The "glTF" logo appears slightly smaller) between the screenshot and the example