glTF light intensity requires unit conversion #91035
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#91035
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Ubuntu Linux 20.04
Graphics card: RTX 2080 Ti
Blender Version
Broken: 2.93.3
Worked: None as far as I know
Short description of error
When point lights are exported to a glTF file, it looks as though the intensity is supposed to be expressed in candela . In Blender, the intensity is expressed in watts; presumably it's the amount of illumination you are supposed to get from an incandescent bulb of that power. Unfortunately no unit conversion takes place during export, so for example a 100W bulb in Blender will be exported as a glTF light of intensity 100 candela.
Exact steps for others to reproduce the error
I hope this is helpful. If you need anything else please let me know, and thank you for your hard work on Blender!
Added subscriber: @PeteX-2
Added subscriber: @PratikPB2123
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @scurest
There is also a report on the addon's tracker: https://github.com/KhronosGroup/glTF-Blender-IO/issues/564
Added subscriber: @Grady
How is the conversion handled for non-point lights?
Sun lights, area lights, spot lights, what units should they be expressed in?
Added subscriber: @donmccurdy
Taking point lights as an example, I believe the conversion ought to go like this:
watts = blender_lamp.energy
LUMENS_PER_WATT = 683
PI = 3.14159
candela = watts * LUMENS_PER_WATT / (4 * PI)
For a 20W Point light, this produces 1087 cd. However, I've tested three different engines that all claim to do point lights in units of candela, and they're all consistently overexposed compared to the original Blender scene. In the test case I've got, 1cd produces a result much closer to the Blender original. But I don't have any way of knowing whether I'm just off by a constant factor here. I'm also a bit confused that the conversion table in the Blender documentation (see https://docs.blender.org/manual/en/dev/render/lights/light_object.html#power-of-lights) does not appear to use anything like the conversions above. It states that a candle is comparable to a 0.05 W point light in Blender. But the expression above yields .05 * 683 / (4*PI) = 2.71 cd. Any idea I'm missing here?
Added subscriber: @WCN
About this specifically, I think that's a red herring. "0.05" feels like the kind of number that's meant to give a ballpark estimate more than an exact definition. It might just be a big candle— Or a candle meant to show up better in renders that will inevitably be shown on low-dynamic-range monitors. Actually, if anything, I'd be inclined to interpret the fact that the conversion shifts the value by three (Base-10) orders of magnitude and still ends up at roughly one candela as a sign that the conversion ratio of 683 is appropriate for Blender.
May be worth pointing out too that the values in that table also all have vastly different conversion ratios from each other. The lowest ratio is
227
, and the highest is556
. Even between lights of the same type there is significant variation. To me that feels like an artist at the Blender Institute/Foundation arrived at those exact values through trial and error and copied and pasted them from their personal notes as a rule-of-thumb guide when they were writing the documentation.Added subscriber: @JulienDuroure
Changed status from 'Confirmed' to: 'Resolved'
Fixed by
9d903a93f0