KhronosGroup / KhronosGroup/glTF

[KHR_lights_punctual] Clarification needed regarding light intensity

Open
#2,473 21 comments 2 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
7.8k
Forks
1.2k
Avg merge
17h 26m
Merged PRs (30d)
5

Description

Hello, after going through several discussions/issues here about this I couldn't find any definitive answer on this matter... The KHR_lights_punctual extension specifies an intensity without addressing how to use it, though it specifies a formula for handling light range.

I find this kind of confusing and not being an expert in radiosity I'm struggling a bit to understand what to do with this "light intensity" (even the name seems to be debated from what I saw) as the specs don't seem to explain anything other than it's in candela.

How is one expected to use this "intensity" value in order to get a correct light attenuation value?
If possible maybe it would be a good idea to add details on this in the documentation.

To add to the confusion, I've tested several models and none of them seem to work the same way regarding light intensity...

- GLTF Blender-IO translates 200W lightbulbs to 10.000cd lights which seems high but coherent from what I've been reading
- The [PointLightIntensityTest](https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/PointLightIntensityTest) from glTF-Sample-Assets uses lights with intensities of 1cd which is very low but are expected to produce very bright results
- Both BabylonJS, ThreeJS and the gltf-Viewer app seem to expect light intensities far lower than what GLTF Blender-IO generates, which means that if Blender's export is wrong, lights should not use candelas as their units and the documentation is wrong...

Please refer to [gltf-Blender-IO issue](https://github.com/KhronosGroup/glTF-Blender-IO/issues/2493#issue-2867747474) for screenshots and more details.

Contributor guide

Open the contributing guide

Research direction

Start with the KHR_lights_punctual specification and the linked gltf-Blender-IO issue. Compare the PointLightIntensityTest assets with the Blender, BabylonJS, ThreeJS, and gltf-Viewer behavior described in the issue. Done means reaching a definitive explanation of intensity and attenuation and documenting the expected interpretation.

Written by the indexing model from the issue text.

Assessment

Tech stack
blender, three.js
Domain
computer-graphics, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.