pex-gl / pex-renderer

Physically based renderer (PBR) and scene graph for PEX.
https://pex-gl.github.io/pex-renderer/examples/index.html
MIT License
234 stars 16 forks source link

Document lights #188

Open dmnsgn opened 5 years ago

dmnsgn commented 5 years ago

Describe physically based lighting Attenuation

vorg commented 10 months ago

We should probably align units with gltf spec https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual/README.md

Brightness of light in. The units that this is defined in depend on the type of light. point and spot lights use luminous intensity in candela (lm/sr) while directional lights use illuminance in lux (lm/m2)

dmnsgn commented 1 month ago
Which slightly differs filament: Light type Unit
Directional light Illuminance ($lx$ or $\frac{lm}{m^2}$)
Point light Luminous power ($lm$)
Spot light Luminous power ($lm$)
Area light Luminous power ($lm$)
Image based light Luminance ($\frac{cd}{m^2}$)

where point/spot use luminous power in lumen instead of luminous intensity in candela (lumens per square radian):

Photometric term Notation Unit
Luminous power $\Phi$ Lumen ($lm$)
Luminous intensity $I$ Candela ($cd$) or $\frac{lm}{sr}$
Illuminance $E$ Lux ($lx$) or $\frac{lm}{m^2}$
Luminance $L$ Nit ($nt$) or $\frac{cd}{m^2}$
vorg commented 1 month ago

Reminder to self: balance accuracy with developer experience (based on now fiddly DOF/FocalLength is).