Gamma Correction for Celestia
Posted: 16.05.2004, 23:56
Have any Celestia developer minded about gamma setting in computer systems? In Celestia 1.3.1 it seems that gamma setting was an overlooked subject, since the rendering of planet Earth looks too dark.
I have a link to a page that explains very well about gamma correction in CRTs and desktop computers:
http://www.cgsd.com/papers/gamma_intro.html
Briefly explaining, the output of a monitor (in brightness) is approximately a power of the voltage applied to the R,G,B pins:
L = V^gamma
The "gamma" factor is the power in the above equation.
E.g., for a monitor that has a gamma of 2.5, if you apply the half of the voltage for color white, you will get on your screen (0.5)^2.5 = 0.177 the brightness of "white".
But the video adapter may apply a partial gamma correction, thus effectively changing the gamma factor of a computer system. This new gamma factor is know as "system gamma".
If you output RGB=(0x80,0x80,0x80) in a computer with system gamma of "1.8" you will get on the screen 0.287 times the brightness of "white".
The great thing about this is that the non-linear response of the monitor greatly increases the dynamic range of the monitor. E.g, for a computer+monitor with a system gamma of 2.0 is possible to simultaneously plot Pluto and Earth with their true relative brightness in the same picture.
Assuming level 255 (0xFF) for the cloud tops of Earth (albedo = aprox. 100%), an albedo of 80% for Pluto, 35% for Earth and Pluto at 39 AU from Sun, and a system gamma of 2.0, the Earth would be plotted with color level 151 (0x97), and Pluto with color level 6 (0x06). (I didn't post the math here to not increase this post size too much).
I did some tests by my own and I found that the system gamma for a friend of mine computer system's is roughly 2.0. To do this test you will need a photometer. I've built a simple one with a photodiode, a digital multimeter and a DC source (eg. a battery with a limiting resistor in series). This is so simple that anybody that has a digital multimeter can do. (I'll send a schematic of this if anybody shows interest).
I'm unsure if this post should be posted here or in Celestia Bugs.
I have a link to a page that explains very well about gamma correction in CRTs and desktop computers:
http://www.cgsd.com/papers/gamma_intro.html
Briefly explaining, the output of a monitor (in brightness) is approximately a power of the voltage applied to the R,G,B pins:
L = V^gamma
The "gamma" factor is the power in the above equation.
E.g., for a monitor that has a gamma of 2.5, if you apply the half of the voltage for color white, you will get on your screen (0.5)^2.5 = 0.177 the brightness of "white".
But the video adapter may apply a partial gamma correction, thus effectively changing the gamma factor of a computer system. This new gamma factor is know as "system gamma".
If you output RGB=(0x80,0x80,0x80) in a computer with system gamma of "1.8" you will get on the screen 0.287 times the brightness of "white".
The great thing about this is that the non-linear response of the monitor greatly increases the dynamic range of the monitor. E.g, for a computer+monitor with a system gamma of 2.0 is possible to simultaneously plot Pluto and Earth with their true relative brightness in the same picture.
Assuming level 255 (0xFF) for the cloud tops of Earth (albedo = aprox. 100%), an albedo of 80% for Pluto, 35% for Earth and Pluto at 39 AU from Sun, and a system gamma of 2.0, the Earth would be plotted with color level 151 (0x97), and Pluto with color level 6 (0x06). (I didn't post the math here to not increase this post size too much).
I did some tests by my own and I found that the system gamma for a friend of mine computer system's is roughly 2.0. To do this test you will need a photometer. I've built a simple one with a photodiode, a digital multimeter and a DC source (eg. a battery with a limiting resistor in series). This is so simple that anybody that has a digital multimeter can do. (I'll send a schematic of this if anybody shows interest).
I'm unsure if this post should be posted here or in Celestia Bugs.