filament icon indicating copy to clipboard operation
filament copied to clipboard

Luminous efficacy

Open will-ca opened this issue 9 months ago • 5 comments

Filament uses 683 in some places to convert from physical luminosity (watts) to perceptual luminous flux (lumens). 683lm/W is the peak luminous efficacy of monochromatic 555nm green light, and sometimes used as a simplification.

https://github.com/google/filament/blob/74b09c708a71a934b192fbfd1fd14e032b00f9ae/docs/Filament.md.html#L1246-L1260

https://github.com/google/filament/blob/74b09c708a71a934b192fbfd1fd14e032b00f9ae/filament/include/filament/LightManager.h#L814-L816

https://github.com/search?q=repo%3Agoogle%2Ffilament+683+NOT+language%3ACSV+NOT+language%3ASVG+NOT+language%3A%22Wavefront+Object%22+NOT+language%3AText&type=code

FYI There is an open discussion about this constant in the Blender and Khronos GLTF repositories. Apparently the correct number is 177.83, not 683, and can be calculated using the spectral distribution of the D65 standard illuminant from Rec.709 specified for GLTF.

https://github.com/KhronosGroup/glTF-Blender-IO/issues/2493#issuecomment-2687469019

https://github.com/KhronosGroup/glTF/issues/2473#issuecomment-2688156071

will-ca avatar Mar 06 '25 22:03 will-ca

Thanks @will-ca. This was something I've always wanted to revisit because of exactly what you said (683 works for monochromatic green light). That said, is 177.83 correct? Shouldn't the value be computed from the intended light color (when possible)? (which of course would be a problem since I imagine this would require spectral upsampling and there's no single answer to that in many cases)

romainguy avatar Mar 07 '25 23:03 romainguy

That said, is 177.83 correct? Shouldn't the value be computed from the intended light color (when possible)?

I'd raised this as an aside:

But there are also other elisions where the intensity in general does not account for color, for example the RGB channels are not normalized to the intensity in any render engine that I'm aware of.

@UX3D-haertl had this to say:

It was decided that the conversion should use a fixed factor (instead of being related to the light color). But the reference color for conversion should be RBG (1,1,1) which sRGB defines as D65 instead of a specific green wavelength.

https://github.com/KhronosGroup/glTF-Blender-IO/issues/2493#issuecomment-2688571328

Personally I think some level of simplification is inevitable. It appears the GLTF people have decided the appropriate amount deals with intensity only relative to the white point.

I'd monitor or ask in the linked issues for more information. I haven't personally examined the methodology behind 177.83. From https://github.com/KhronosGroup/glTF-Blender-IO/issues/2493#issuecomment-2687469019, it sounds like maybe the decision is only being made in these last couple weeks.

Then there is also the distinction that this is about GLTF, so render engines might use other models internally while still being physically accurate.

will-ca avatar Mar 09 '25 02:03 will-ca

Thanks. I'm not against simplifications but a 6x radio between a white and a green light is hardly a rounding error 😅 I have light meters somewhere, I should try to measure lights as the same wattage but with different color temperatures to see if it's worth worrying about it.

romainguy avatar Mar 09 '25 03:03 romainguy

Heh. Personally I just want any standard coefficient so implementations don't have to keep reinventing it.

I find the colour aspect isn't so bad if you think of the intensity as the "bulb", and the color as separate a tinted filter in front of it. Which I guess is actually how strongly colored lights would be created, at least before LEDs. Though not colour temperature, where the dominant factor for (electrical) wattage efficiency will probably be Planck's law...

Based on the other discussions I think a significant portion of the 6X difference from 683 to 177 is due to UV and near-IR.

will-ca avatar Mar 09 '25 19:03 will-ca

If I'm understanding the quoted code correctly, Filament isn't using 683 as the luminous efficacy but rather 683 * efficiency. Which means that if you want to have a final value of 177, you just need to set the efficiency to 26%.

fintelia avatar Oct 15 '25 04:10 fintelia