Hacker News new | past | comments | ask | show | jobs | submit login

If you care about color, you should not miss "The importance of being linear" http://http.developer.nvidia.com/GPUGems3/gpugems3_ch24.html and corresponding discussion on wrong gamma in a variety of programs http://www.4p8.com/eric.brasseur/gamma.html

The prettiest gradients won't look good if the output color doesn't match the displays gamma.




"The Importance of Being Linear" is an excellent article, but there is a caveat.

What do we mean by linear? A linear change in RGB equals a linear change in photons output? Let's call this physically-linear.

Or do we mean that if we sit 100 people down and show them rgb(32, 64, 16) and then rgb(64, 128, 32) that they agree that the second is "twice as bright"? Let's call this perceptually-linear.

Physical and perceptual linearity are not the same and have different use cases. Physical linearity is important when you are simulating lighting: shadows, shading, etc. etc.

Perceptual linearity is probably more important when it comes to scientific visualization, because we are trying to use colour as a form of transmission of information from the computer into our heads, so it makes sense to "spread" out the colour as much as possible (note: I do not have a background in visualization, just experience in CG. I welcome input from those who know the field better.)

Physical-linearity is as "easy" as calibrating to your monitor (gamma, etc.) Perceptual-linearity is... harder. You can start by investigating CIE-LAB colour spaces etc., but the story most definitely does not end there (for example, check out "Interaction of Color" by Josef Albers.)


Very interesting.

Gamma is a very complicated subject. Also the "legacy" aspect as mentioned, CRT had it, LCDs don't BUT to be "backwards compatible" they add this nonlinearity.

Looks like the same discussion of why are we talking about PAL/NTSC and interlacing in digital video formats.


The "legacy" theory is attractive but unfair. Ultimately, image reproduction is about controlling perception and human brightness perception is non-linear.

You should do any calculations in linear space (and possibly with a temporarily higher bit depth) but a linear display would not be desirable.

Imagine having a room with 10 independently controlled LEDs of equivalent brightness to a 10-watt incandescent lightbulb. Try to visualize the difference from going from 0 (pitch black) to 1 light, to 2, and then imagine 9->10. If you try this IRL you will notice that human brightness perception is very non-linear. To get the most bang per light switch, we need to make the later lightbulbs brighter to get the same punch. This is what monitors do with their bit depth.

It makes good sense for human perception to be non-linear: Earth has a very wide range of brightnesses we need to live in, and the difference in information we can acquire from being out in the sun vs. in the shade is not commensurate with the difference in brightness.

If you are in a very, very dark place (not a city at night) you will experience a very distinct non-blackness. Your eyes (brain?) are turning up the gain to try and extract information. (I don't know if this happens in a perfectly dark place.)

Uh sorry this was rambling. I should read that article...


Oh yes, human vision is non-linear, also adapted to a wide variety of situations (just try using a digital camera and see how several adjustments are needed and the eye does this "automatically")

But it's hard enough considering human non-linearity without adding any other non-linearities along the way (like the CRT ones)


It's true: although human perception is nonlinear in a similar fashion (logarithmic/expt) the exact way CRTs (and LCDs) transform is not based strictly on human perception (as far as I know). It is interesting to think of how it could be improved but I don't have any answers right now.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: