Jump to content
  • Advertisement
Sign in to follow this  
fluke

rgb color temperature

This topic is 3669 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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 ...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
oh so I was thinking that you would need more precision to store those values ... I am propably not qualified to answer your questions :-)

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!