-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
Set WebGLRenderer's useLegacyLights = false by default #25479
Conversation
About half of examples break. |
@LeviPesin Where can we see the diff images? |
After the run will be finished you will be able to see them in the Output screenshots artefact. |
Found them. Thanks! |
@donmccurdy regarding #24975 (comment)... I still think this is too big of a breaking change and it'll be better to use the transition to WebGPU for this (ie. |
Can I ask what the concern with the change is? That people will ask why the lighting changed? There will be adjustments like this that have to be made on WebGPU when it's released so it would be nice if the project could find a way to feel comfortable making changes like this especially since it's a one line change to "undo". Colors and lights haven't really been displayed correctly by default ever afaik and it feels like it's constantly being deferred. Some of this progress feels a little too glacial, imo. One thing that might help improve the user visibility and understanding of impact of these types of changes is to make the "migration" page more prominent or understandable in the README - ie renaming it to something like "Migrating Breaking Changes" and moving the link location so it's more findable. Likewise the breaking changes could also be listed or at least more clearly linked at the top of the latest release notes. I've been surprised to see how many people don't know about the migration guide. |
That's true... We could be better at making it more clear which changes are breaking and which ones are not. |
I've spent some idle brain cycle on this today and it may indeed be a good idea do this change now so by the time If we're going to change this... Anything else? |
Discussed in 2017 in this lengthy thread. |
Summary of current vs. proposed defaults: https://docs.google.com/spreadsheets/d/1Gv2SToWQSmsGfsp4V-Kh59nxAHMZqIJQ3QYMXvHhZ7s/edit#gid=0 All else being equal, making these changes cleanly in a single release would probably be best. Some changes offset the migration cost of others. Pairing However, physical vs. legacy lights is less intertwined with the other color space-related properties. If we want to split it off I'm fine with that, too.
Note that it's |
I'm going to commit the new screenshots as a first step before fixing the examples. |
List of examples fixed:
|
Based on the discussion in #25537, we should clarify how the examples should be updated. The obvious and most pragmatic way is to just toggle the The examples could also be updated in a more extensive manner: Making the scale of the scenes more realistic (assuming 1 world unit = 1 m) which ensures proper scaling of objects and consequently more reasonable lighting properties (position/distance and intensity/candela values). Besides, some examples might be overexposed or too dark or the contribution of certain lights to the overall lighting is worthy of improvement (e.g. #25537 (comment)). Assuming the project wants to favor physically correct renderings, I vote for b) although this will make the updating process more time consuming. |
I think setting |
I also think b is better -- it is more time consuming, but we get in return that almost all examples will be physically-realistic. |
Code-wise this PR is a one line change that swaps the default of |
@gkjohnson Sorry, I have misread your comment. I've also deleted my answer since it was misleading. Yes, just adding |
To reiterate I think this should happen in steps and we should not block changing the default of this flag on updating all the light intensities in the examples. I think we do the following:
|
@gkjohnson I'd be concerned if we'd be turning on the option for users before we are comfortable using it ourselves. See the line of comments in #25537 for example. So I think it's necessary to at least go through the exercise of updating a number (TBD, not necessarily all ~200) of our existing examples before turning this on by default. @WestLangley @mrdoob Given the feedback in #25537 and above, would you prefer one of these options?
I'm not personally eager to do the full overhaul on all examples linked above... 😇 Moreover, I'm not sure that all users need to be thinking in term of absolute units, even in |
I was going to do (A) but the correctness discussion in #25537 scared me away 🙃 |
I agree - I just intended to suggest that it should not be necessary to block on every example having been updated in order to flip the flag default. |
I have had extensive discussion with @donmccurdy offline. Here is a summary of what I think:
|
Perhaps
@mrdoob I think the implication of @WestLangley's comment above is that we only want to have the correctness discussion for a few (~4) examples. The remainder can be converted by eye, without worrying much about units. This still leaves us a choice of (A) or (B). |
After a series of PRs, it should be possible to change the default value of When changing the default we should consider to directly deprecate the legacy lighting code path so it can be removed in ten releases. While migrating the examples, I've noticed it is not always obvious how to restore the lighting in the scene especially when spot and point lights are used. Next to a note in the migration guide, it would be good to highlight the change in the forum with a separate topic (similar when color management was turned on by default).
The light intensities also change since the "artist-friendly light intensity scaling factor" |
Let's make a fresh PR that changes the default of |
Sounds good! |
Okay, I'll try to file a PR in the next days! |
Related issue: #24975
Description
Testing how many examples break with this change.