logoalt Hacker News

Rendering the Visible Spectrum

105 pointsby signa11last Saturday at 8:56 AM18 commentsview on HN

Comments

strogonofftoday at 3:14 PM

It is very interesting that whereas an incandescent lightbulb and a white LED (e.g., that Macbook screen) appear to us the same colour, their underlying spectra are very different (a solid black body radiation spectrum from the former and a choppy one from the latter).

I vaguely recall this is also known to cause a phenomenon where certain material can appear a false colour under certain light (especially a problem in case of, say, physical paintings and their various pigments), if whatever bands it reflects would align with the spectrum of emitted light in an unfortunate way.

(NB: even though the topic is relevant to his field of work, the author of the paper is not the digital videographer and YouTuber Brandon Li.)

mark-rtoday at 2:29 PM

There's something that tends to go unrecognized, a function of the way our monitors work. Any color that is made of multiple primaries, such as magenta, cyan, or yellow, will naturally be brighter because more photons are emitted from the display. Not twice as bright, since our eye response is non-linear, but noticeably brighter.

show 1 reply
quietbritishjimtoday at 10:59 AM

> The final piece of the puzzle is gamma correction. Applying gamma correction to these RGB coordinates produces a new set of values which we call (R', G', B') that are related to the original by a transfer function 6 ... The reason this is done is to account for how our eyes perceive brightness nonlinearly. We can distinguish changes in dark shades much more easily than light shades because a linear increase R in has much more of a relative effect when R is small. Switching to (R', G', B') therefore provides more resolution in dark regions of the image where the eye is more sensitive to variations in brightness.

I'm surprised that this isn't mentioned much earlier and much more prominently. Instead, it's practically a footnote.

Maybe I'm mistaken, but I would bet 90% of the awkwardness in the very first image is from averaging these values (R', G', B') for the gradients rather than switching to the true linear values, averaging, then converting back. This classic MinutePhysics video covers it well:

https://www.youtube.com/watch?v=LKnqECcg6Gw

show 1 reply
halloletoday at 2:02 PM

> we write the color associated with a spectral distribution as C[S] where C is the function that takes a distribution and outputs the corresponding color.

Unrelated, but can anyone tell me the purpose of using the square bracket notation here, instead of the usual parentheses?

show 1 reply
mncharityyesterday at 12:31 AM

> The right approach would have been to select a color appearance model (CIECAM02 is the standard), convert all our colors to this coordinate system, do the mixing in this coordinate system and then convert back to RGB. That being said, I did not want to deal with all the extra complexity that would have come along with this. Instead, I opted for a much simpler approach.

Python's nice `colour` package supports several color appearance models.[1]

[1] https://colour.readthedocs.io/en/master/colour.appearance.ht...

show 1 reply
enriqutotoday at 7:26 AM

These wavelength-indexed spectra always seem a bit weird... the blue is so cramped! When you plot them by frequency they feel just right. We say "ultraviolet" and "infrared" for a reason; never "infraviolet" or "ultrared".

It's like a piano that had the high notes to the left.

11111011today at 2:28 PM

Interpolate between the spectral color and gray for existing distortion.

Designating 460nm blue in terms of the Abney affect to render a realistic spectrum.

zeristortoday at 11:31 AM

This doesn't account for Tetrachromacy does it

https://en.wikipedia.org/wiki/Tetrachromacy

It would be interesting to learn more about colours spaces developed with Tetrachromacy in mind. I guess the rest of us should be classed as visually impaired.

show 2 replies
zombottoday at 12:09 PM

Screw, me, I was reading the title as "Rendering the Vibe Spectrum". I clearly need a break.