-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Examples: Use color management in lightmap example. #26018
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
Related to #25872. What it was supposed to be depended on the output color space. Similar to the colors in helpers like BoxHelper, which we intentionally did not update. I think we are aiming for consistency with the assumption that colors were chosen before sRGB renderer output was used. That said, yes, Phong's specular property seems to be affected by these changes in a way that changes visual results more than other material color properties. I am unsure what to do with its default. |
|
Since sRGB output is the default now I think material color values other than 0xffffff and 0x000000 should be updated. For materials classes itself but also for classes creating materials like helpers etc.. Assuming sRGB output was used before (which was a project recommendation afaik), there is now a visual difference with color management enabled and it should be fixed, imo. |
|
When we chose 0x444444 for GridHelper, it was a hex code representing a color in sRGB color space. In r152, it still is supposed to be a hex code representing a color in sRGB color space. We never updated the color when sRGB output become available, even though that changed the assumed color space — are we sure we want to update it now? Aside: Primaries and fully-saturated blends of primaries (0xFFFFFF, 0xFFFF00, 0xFF0000) will not change. Only colors where RGB components are between 0 and 1, exclusive. |
|
@mrdoob What kind of previous setup would you consider as a baseline? I'm asking since as @donmccurdy pointed out, things evolved over the years and color space workflows can be different from app to app. I think we should pick something that we can use as a reference and I vote for setups that previously configured an sRGB output color space. Meaning With color management enabled, color defaults should produce the same visual result like this setup. And that means the previously 0x111111 specular color value was supposed to be in linear-sRGB (assuming sRGB workflow) and should now be updated to its sRGB pendant like we did in the examples. |
|
It may not be a surprise to hear that numbers like I personally didn't really notice when we changed color space mostly because the lines tend to be thin and hard to see the change. So I wouldn't worry too much about updating them, the ease of write/read is more important in that case imho. |
|
Okay, and what do you think about the specular value of |
|
Merging the PR but I won't change any other examples with an updated phong specular value. At this point, I think the conclusion is to not update the (default) colors of helpers and other material properties. |
|
I would prefer not to update default colors of helpers, yes. I'm wondering if there is something a bit different going on with MeshPhongMaterial's default specular color, and will try to look more closely into that... |
Related issue: -
Description
This PR enables color management in
webgl_materials_lightmap. Next to the changes in the example code, it was necessary to update the JSON asset.@donmccurdy I have noticed a small issue with
MeshPhongMaterial.specularand its default0x111111. This value was supposed to be in linear-srgb previously. But after enabling color management I think this value should be updated to0x494949to ensure visual consistency (the decimal version of this hex is now used in the JSON, btw).