Skip to content
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

Implement support for physically based light intensity units #3252

Closed
mvaligursky opened this issue Jun 21, 2021 · 7 comments · Fixed by #4618
Closed

Implement support for physically based light intensity units #3252

mvaligursky opened this issue Jun 21, 2021 · 7 comments · Fixed by #4618
Assignees
Labels
area: graphics Graphics related issue feature

Comments

@mvaligursky
Copy link
Contributor

mvaligursky commented Jun 21, 2021

The engine is currently not using physically based units to specify light intensity, which would allow an easy way to realistically set up lights in the scene.

some references:

This would be useful when implementing support for punctual lights #2061 which specifies light intensities in physical units.

Note that Blender does not correctly export light intensities into gltf format, as it exports them in watts instead of expected lumens. KhronosGroup/glTF-Blender-IO#564

@slimbuck
Copy link
Member

Bump priority up on this.

@MAG-AdrianMeredith
Copy link
Contributor

Bump! It might not be physically based but does anyone know what the units currently are?

@slimbuck
Copy link
Member

Is this something @GSterbrant might want to investigate?

@GSterbrant
Copy link
Contributor

It's actually a bit complicated, since it's different for different types of lights. Filament describes it very well here: https://google.github.io/filament/Filament.md.html#lighting/units

Of course this puts even more emphasis on the importance of it. Using 1 for the sun intensity doesn't really translate to using 1 as intensity for a spotlight.

@MAG-AdrianMeredith
Copy link
Contributor

MAG-AdrianMeredith commented Jul 26, 2022

This might help https://docs.google.com/spreadsheets/d/1Ce9XCC2Ub9eVjAQdYbYdLvlkDBJ_0GtAyRbSF0KJWzE/edit#gid=0

Basically, different lights use different units. GLTF spec is the one that probably makes sense. I think threejs had a nasty flag like usePhysicalLights to enable the change

@GSterbrant
Copy link
Contributor

We'd probably a flag like that too, to not break old projects...

@mvaligursky
Copy link
Contributor Author

closing as its fixed in #4618

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants