Page 1 of 2

[April Fools] Color Temperature Adjustment

Posted: Mon Apr 01, 2013 2:44 am
by PyTom
I've finally started work on 6.16 with a quick new feature.

Many of us use Ren'Py late at night. Either you're playing an incredibly super-compelling game, or trying to fix a bug. Either way, you wind up staying up for many hours staring at a computer screen set to the wrong color temperature. The bright light disrupts your circadian rhythm, and keeps you awake - or at least it does for me. For my own benefit, I'm adding automatic color temperature adjustment to Ren'Py 6.16.

The algorithm is one taken from a Linux program called redshift. When the sun is over 3 degrees above the horizon, Ren'Py will display colors normally, using the full range of the red, green, and blue channels - nominally a 6500K color temperature. As the sun goes down, the color temperature will slowly lower, bottoming out when civil twilight is over, and the sun is 6 degrees below the horizon. How long this takes varies with your latitude, but is almost always over half an hour, so the changes are slow enough that it's hard to notice them.

Right now, I'm hardcoding the latitude at 40 degrees, and determining the longitude from the user's system clock. The former doesn't matter much - it's pretty valid unless you're right up against the arctic circle - but the latter might be off by a few hours if you're in a large timezone. Still, it should be enough to hit the low color temperature before bedtime, which is what matters.

I'm not quite sure what the low color temperature should be. Right now, I have it set to 3500K, which is an incandescent light bulb temperature, but I might back that off a little to 4000K or so, to try to balance out color fidelity a little. Here are some screenshots of the color temperature adjustments. To get a good feel for them, you have to look at them in the context they were meant to be seen in - for the 3500K picture, you want to be seeing it in a room lit by only consumer-grade light bulbs at night. You should also display it fullscreen, against a black background - so the brightness of your desktop doesn't overwhelm it.

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 3:25 am
by jack_norton
You need to calculate also if developers/player are using LED bulbs! :D

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 3:35 am
by Jake
Real men live at 7-8000K. Grr!

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 8:35 am
by Keul
(FYI, there's also an other program called f.lux: http://stereopsis.com/flux/ for Win, Mac, Linux, iOS) and for those interested in redshift: http://jonls.dk/redshift/)

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 8:41 am
by AxemRed
Good. The default color temperature was so hot I almost burned myself one time.

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 8:45 am
by nyaatrap
It's interesting function. I may not use it personally but it'll be useful to collecting data.
Thought I think 3500k is too low. It can be my monitor setting, but I think many *neet* (who supports current industry lol) might be seeing games in a almost permanent conditions, so I think varies should be minimum.

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 9:54 am
by PyTom
nyaatrap wrote:I may not use it personally but it'll be useful to collecting data.


Right now, there isn't an interface to disable it. It's on by default - I see this as a sort of safety feature, so I don't want to let people disable it by default. It will try to detect if something like f.lux or redshift is active, and won't run in that case - but I can't see having a series of buttons on the preferences screen to let people control this. That would just overcomplicate things.

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 10:06 am
by nyaatrap
I need to set my color temperature permanent always as an artist, so I don't want to force to change it outside of my intension. I think many artist think same way.

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 10:07 am
by Cadenza
nyaatrap wrote:I need to set my color temperature permanent always as an artist, so I don't want to force to change it outside of my intension. I think many artist think same way.
I'd have to agree with this.

It's a cool concept, though, I just think lots of people wouldn't like how it can't be disabled..

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 10:17 am
by nyaatrap
Yeah. we always adjust our eyes to monitors. If they're suddenly change out side of we can't expect, we need to afraid our eyes.

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 10:34 am
by LateWhiteRabbit
PyTom wrote: Right now, there isn't an interface to disable it. It's on by default - I see this as a sort of safety feature, so I don't want to let people disable it by default. It will try to detect if something like f.lux or redshift is active, and won't run in that case - but I can't see having a series of buttons on the preferences screen to let people control this. That would just overcomplicate things.
nyaatrap wrote:I need to set my color temperature permanent always as an artist, so I don't want to force to change it outside of my intension. I think many artist think same way.
I'm in the same boat as Nyaatrap, PyTom. This is a seriously BAD feature for artists. It is for the same reason I don't use similar programs for my desktop. Artists need to see true colors. I need to see what my image colors are actually looking like in the program and further more, I need to KNOW what image colors my players are going to see. We use software to calibrate our monitor colors to create art, and now the program the art is going into is going to mess with those colors? No thanks.

A lot of us have day jobs, and work on our VNs at night - we aren't concerned about our circadian rhythms, and I have no desire to have to test every screen of my game at every time of the day to see what it is doing. As artists, we are ALREADY fine-tuning our color temperatures.

This is, quite honestly, a distressing feature to me. Even if I myself can turn it off, now I have to worry about the people playing my game having it on by default, so I'm STILL stuck with testing every screen at every time of day. I think this is something better left for people to do on their own with external programs, not something that is forced on them by a specific program.

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 10:47 am
by Cadenza
Wouldn't this also affect tinting? I know some artists integrate different lighting and colour temperatures to sprites and backgrounds to fit certain times of day or weather, and it looks like this feature would conflict with that.

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 10:51 am
by LateWhiteRabbit
Cadenza wrote:Wouldn't this also affect tinting? I know some artists integrate different lighting and colour temperatures to sprites and backgrounds to fit certain times of day or weather, and it looks like this feature would conflict with that.
It certainly would. From PyTom's example images, it would turn a scene painted to be midday into dusk depending on the time of day the player was viewing the scene. As a game maker, that is NOT something I want to be out of my hands.

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 11:22 am
by Jake
LateWhiteRabbit wrote:From PyTom's example images, it would turn a scene painted to be midday into dusk depending on the time of day the player was viewing the scene. As a game maker, that is NOT something I want to be out of my hands.
Try a simple experiment. Wait until this evening, take a digital photograph without flash of a white piece of paper in the same room you use your computer in; take another one late at night once the sun has well and truly gone down and you have the lights on. It's pretty much guaranteed that when you take the photo, the paper looks pretty much white to you, because your eyes adjust very easily and quickly to ambient light.

Try it, then look at the photos in the cold light of day* tomorrow, and you'll wonder what you were thinking.




* This is a really weird expression, since daylight has a much higher colour temperature than most artificial bulbs.

** And this is all leaving aside the fact that you as an artist may carefully calibrate your monitor, but nobody else does so it's a complete waste of effort for screen-displayed graphics anyway. ;-)

Re: Color Temperature Adjustment

Posted: Mon Apr 01, 2013 11:45 am
by LateWhiteRabbit
Jake wrote:
LateWhiteRabbit wrote:From PyTom's example images, it would turn a scene painted to be midday into dusk depending on the time of day the player was viewing the scene. As a game maker, that is NOT something I want to be out of my hands.
Try a simple experiment. Wait until this evening, take a digital photograph without flash of a white piece of paper in the same room you use your computer in; take another one late at night once the sun has well and truly gone down and you have the lights on. It's pretty much guaranteed that when you take the photo, the paper looks pretty much white to you, because your eyes adjust very easily and quickly to ambient light.

Try it, then look at the photos in the cold light of day* tomorrow, and you'll wonder what you were thinking.




* This is a really weird expression, since daylight has a much higher colour temperature than most artificial bulbs.

** And this is all leaving aside the fact that you as an artist may carefully calibrate your monitor, but nobody else does so it's a complete waste of effort for screen-displayed graphics anyway. ;-)
And....? What is the purpose of that experiment? I'm well aware of color perception and ambient light. The point of that is to take a photo or create art in the same lighting conditions as it will be viewed. Which is what I am doing already by working on a calibrated monitor. It doesn't matter if the player has calibrated their monitor or not - they will still get a more accurate version of the color I am using than if the program is changing the color temperature ON TOP of them not having a calibrated monitor.

If we were working with photographs or text, it might make a little more sense, but we are talking about hand drawn and hand painted images with carefully selected color palettes, where every color is personally chosen by an artist.

It is a poor choice of feature for a visual medium that depends on art. If PyTom really wants the feature in RenPy, it should be off by default, with instructions on how to enable it for the writers or programmers that wish to use it. As for us artists, we don't want anything mucking with how our monitor displays colors, circadian rhythms be damned.