<p>I've implemented the Phong shading model and I would like to improve the brightness depending to the distance of the light, its spectrum, luminosity and the cameras exposure time.</p>
<p>Each of your light sources has a position, spectrum and a luminosity.</p>
<p>for example our sun has the following information:</p>
<p>Spectrum: 6.25, 7.239, 7.1916 (650 nm, 510nm, 475 nm of wavelength)
Luminosity: 3.86e26 (I've found these values online)</p>
<p>When rendering the scenario, for each fragment I am calculating the distance (meters) from the surface to the light (sun).</p>
<p>How can I calculate some kind of brightness? I tried the following:</p>
<pre><code>float brightness = luminosity / (4 * PI * pow(distance, 2))
</code></pre>
<p>but when doing so, the brightness value is around &quot;42261897.7&quot; so it is way to high.</p>
<p>afterwards the brightness multiplied with the phong shading model will be multiplied with the exposure time (0.001). So the final brightness is &quot;42261.8977&quot;.
As you can imagine, this value is as well way to high... What am I doing wrong? How can I get a brightness factor which I can multiply to my color value?</p>
<p>So how to bring the luminosity, exposure time and spectrum together into the phong lighting model?</p>

CC BY-SA 4.0
2022-06-24T14:38:03.123Z
The value of $E_v$ for the sun to the earth is about 100,000lux.
pmw1234
CC BY-SA 4.0
2022-06-27T11:27:35.253Z
@pmw1234 but what to do with the 100,000lux? how to bring them into an RGB value with respect to the exposure time?
Thomas
CC BY-SA 4.0
2022-06-27T16:03:36.947Z
@Thomas: "*So how to bring the luminosity, exposure time and spectrum together into the phong lighting model?*" Why would you want to? If you want to perform more accurate lighting, then perform *more accurate lighting*. Phong is pretty bad; move on to more physically-based lighting models. They're not that hard to implement, and HDR actually makes sense with them.
Nicol Bolas
CC BY-SA 4.0
2022-06-27T16:54:05.750Z
@NicolBolas which physically-based lighting model would you recommend to implement? can you post a paper regarding to the model?
Thomas
<lighting>
Light brightness calculation
Thomas
# Light brightness calculation

(Asked by: username_0 on 2022-06-24)

I've implemented the Phong shading model and I would like to improve the brightness depending to the distance of the light, its spectrum, luminosity and the cameras exposure time.

Each of your light sources has a position, spectrum and a luminosity.

for example our sun has the following information:

Spectrum: 6.25, 7.239, 7.1916 (650 nm, 510nm, 475 nm of wavelength)
Luminosity: 3.86e26 (I've found these values online)

When rendering the scenario, for each fragment I am calculating the distance (meters) from the surface to the light (sun).

How can I calculate some kind of brightness? I tried the following:

```
float brightness = luminosity / (4 * PI * pow(distance, 2))

```

but when doing so, the brightness value is around "42261897.7" so it is way to high.

afterwards the brightness multiplied with the phong shading model will be multiplied with the exposure time (0.001). So the final brightness is "42261.8977".
As you can imagine, this value is as well way to high... What am I doing wrong? How can I get a brightness factor which I can multiply to my color value?

So how to bring the luminosity, exposure time and spectrum together into the phong lighting model?

**Tags:** lighting

> **Comments:**
> **username_1**: The value of $E_v$ for the sun to the earth is about 100,000lux.  
> **username_0**: @username_1 but what to do with the 100,000lux? how to bring them into an RGB value with respect to the exposure time?  
> **username_2**: @username_0: "*So how to bring the luminosity, exposure time and spectrum together into the phong lighting model?*" Why would you want to? If you want to perform more accurate lighting, then perform *more accurate lighting*. Phong is pretty bad; move on to more physically-based lighting models. They're not that hard to implement, and HDR actually makes sense with them.  
> **username_0**: @username_2 which physically-based lighting model would you recommend to implement? can you post a paper regarding to the model?  

---

## 0 answers

