rgb color temperature

Started by
3 comments, last by fluke 15 years, 8 months ago
given a blackbody color (http://www.vendian.org/mncharity/dir3/blackbody/UnstableURLs/bbr_color.html), what is the proper way to apply that color to a pixel? i've tried a simple multiply operation, which has given results similar to what photoshop produces when selecting Image > Adjustments > Photo Filter and selecting something like Cooling Filter (80). however, as you might expect, the further away you get from the white point, the darker the image becomes. Which means you have to preserve the luminosity somehow. I tried an rgb to hsl conversion, then took an average of the difference of min/max rgb luminance values, and plugged that back into an hsl to rgb function. this produced a better result, but was still a bit darker than photoshop's output - even at a relatively low 8000k (kelvin) range. any idea how they are achieving this temperature shift without affecting the brightness?
Advertisement
Quote:what is the proper way to apply that color to a pixel?
On which hardware platform?

Quote:any idea how they are achieving this temperature shift without affecting the brightness?
Who is achieving this in which game?

You might want to look into tone mapping ... search for Erik Reinhard High-Dynamic Range ...
this really has nothing to do with a platform. it's just a 'simple' image processing technique.

and i'm not familiar with this being used in any game - but it is done in photoshop, lightroom, and aperture as a method of correcting white balance.

also, tonal compression is definitely not the way to accomplish this. this works with simple 8-bit image (or at extremes, 12-bit raw images), not hdr/radiance.
oh so I was thinking that you would need more precision to store those values ... I am propably not qualified to answer your questions :-)
ok, i've figured out why there are subtle differences in the output.. well, kinda:

photoshop/lightroom use a reference white of D50. the Bradford transform can be used to convert a color space to this reference white. for more info, see this link: http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html

having read this, obviously just using a simple hsl conversion to preserve the luminosity was NOT the correct way of achieving the intended result.

i know zilch about color theory, so i'm probably a little over my own head here, but if anyone knows how to perform this transformation so i can easily apply a temperature value such as one from the list provided in my first post, to an image - that would help a lot!

This topic is closed to new replies.

Advertisement