-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Consider defaulting to renderer.physicallyCorrectLights = true
#2127
Comments
I agree. Everyone wants physicallyCorrectLights, and it was only added in this old fashion because we needed to not break backwards compatibility with people using incorrect lgihts. |
sounds like a good idea. just as someone that has never used physical lights before, is it harder to control? even without knowing the math, these are just higher numbers, correct? |
Since we are just going with a major soon, it would also be good timing to make the change. Would it need significant changes in existing demos/examples? |
If I remember correctly, the main change is that you'd want to increase intensity of the lights by a factor of PI when making the change. The behavior of https://threejs.org/docs/index.html?q=light#api/en/lights/PointLight Once the initial change is made, control should be easier and more natural. In particular I think the https://docs.google.com/spreadsheets/d/1Ce9XCC2Ub9eVjAQdYbYdLvlkDBJ_0GtAyRbSF0KJWzE/edit#gid=0 |
I implemented this in #2148 but ended up reverting since the migration for point lights was rather non-trivial. Are we able to give this the same treatment as color management? Maybe continue the discussion in three. |
Correcting my last comment, the changes required to migrate a scene to
Now obviously (2) is not a "physically correct" choice either (correct decay is 2, also non-default...), but at least you now have physical units for your lights, and any artistic tweaks are just in the light settings rather than the shading model. Lowering decay on lights seems OK to me.
three.js does expose this as a renderer setting but currently R3F does not, maybe the place to start would be to add that setting in R3F and document it with "recommended for new projects" or something like that? Totally understand it might be too painful a migration at this point, I suspect we'll see the same objections on the three.js repo. Maybe a more practical path would be to ensure this property is on by default (or omitted entirely) on WebGPURenderer. At the moment I don't see the option there, not sure how it's coded though. |
Summary of the practical differences here: mrdoob/three.js#23897 (comment) The main thing is that point and spotlights do not attenuate under default settings in the legacy mode, but they do attenuate by default in physical mode. Unfortunately that's a pretty hard breaking change. |
@krispya @CodyJasonBennett continuing the thread from #2338 (comment), could I ask what you mean by "the issue of decay not respecting physicallyCorrectLights", and what change you are hoping to see in three.js upstream? Does this refer to changing the default of Unfortunately, there is no acceptable "non-breaking" way to enable |
I would be referring to the default |
I see, thanks – The change to the default decay is already proposed ... ... so I will bump that thread again, feel free to leave feedback there as well! |
Yeah I feel the same way as Cody. I want to see |
I see. These defaults in three.js are what they are only for backward-compatibility, and to limit difficult migrations for users. So I think my advice would be to think of this in terms of what behavior and timing for changes are best for R3F users, rather than in terms of divergence from three.js defaults. But I certainly understand whichever decision you go with. |
The same is true for R3F users too. All our demos and tutorials are made with Right now it isn't something that comes up in the Discord form our users very often even though it is a GLTF workflow issue. Maybe something will change that, like more asset tooling, and we can reopen this issue. |
The current R3F defaults include...
... both of which are generally good defaults for a physically-based rendering workflow (even if tonemapping is pretty subjective). For the same reason I think it'd be a good idea to consider defaulting to
renderer.physicallyBasedLights = true
. This is the only mode in which lights imported with a GLB model will look as intended. Eventually I'd like to see that become the default in three.js as well — see mrdoob/three.js#23614.The text was updated successfully, but these errors were encountered: