question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider defaulting to `renderer.physicallyCorrectLights = true`

See original GitHub issue

The current R3F defaults include…

  • renderer.outputEncoding = sRGBEncoding
  • renderer.toneMapping = ACESFilmicToneMapping

… 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 https://github.com/mrdoob/three.js/issues/23614.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
bhoustoncommented, Mar 16, 2022

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.

0reactions
krispyacommented, Oct 2, 2022

The same is true for R3F users too. All our demos and tutorials are made with physicallyCorrectLights=false and making the change would mean at least updating all of those and educating users why their projects suddenly look wrong and why the same lighting tutorials and examples now look different.

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebGLRenderer#physicallyCorrectLights – three.js docs
Default is true . # .autoClearStencil : Boolean. If autoClear is true, defines whether the renderer should clear the stencil buffer. Default is...
Read more >
Physically Based Rendering and Lighting | Discover three.js
One difference between the real world and three.js, even when we use PBR, is that objects don't block light, by default. Every object...
Read more >
decay and distance with physically correct lighting in three.js
I don't know physically based lighting well but it seems to me real lights don't have a distance setting, they just have a...
Read more >
Three.js Shadows
Three.js by default uses shadow maps. The way a shadow map works is, for every light that casts shadows all objects marked to...
Read more >
Vanilla Three.js to React Three Fiber - Yihwan Kim
I think of react-three-fiber as providing JSX “syntactic sugar” for Three.js. ... renderer = new THREE. ... physicallyCorrectLights = true;.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found