0

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?

Thomas
  • 1,245
  • 1
  • 4
  • 16
  • The value of $E_v$ for the sun to the earth is about 100,000lux. – pmw1234 Jun 24 '22 at 14:38
  • @pmw1234 but what to do with the 100,000lux? how to bring them into an RGB value with respect to the exposure time? – Thomas Jun 27 '22 at 11:27
  • @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 Jun 27 '22 at 16:03
  • @NicolBolas which physically-based lighting model would you recommend to implement? can you post a paper regarding to the model? – Thomas Jun 27 '22 at 16:54

0 Answers0