|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001311||OpenClonk||Objects||public||2015-05-13 21:48||2015-11-29 23:03|
|Target Version||Fixed in Version|
|Summary||0001311: Time Controller ignores SetSkyAdjust()|
|Description||The time ignores sky colors. That makes the time object a bit less attractive. GetSkyAdjust() could help?|
I don't think this hurts performance since it seems like there is a lot more space for improving the performance. The time object performs its SetSkyAdjust() every ~0.5s, even if day or night == true. As far as I understand it right, the sky only needs to be colored as long as sunset or sunrise is true.
|Steps To Reproduce||var time = CreateObject(Environment_Time);|
...The sky will turn redish for a very short time.
|Tags||No tags attached.|
|On snapshot or on 6.0?|
|How do you propose to fix this? If the sky adjust is set by script as well the time object needs to do some mixing, or what else?|
Last edited: 2015-05-15 17:31
During day, the time object checks with GetSkyAdjust() whether the first sky color is the same as the original "daycolour = [255, 255, 255];". If not, GetSkyAdjust() becomes the new daycolour.
During night, the nightcolour gets overwritten.
SetSkyAdjust(RGBa(skyshade, skyshade, skyshade, a), GetSkyAdjust(true));
The second background color stays untouched like that. But for the value a and the previous r g b check the RGBa values from the first sky color have to be taken apart.
mh to be honest Im not sure what should happen when the sun is going down and someone performs the command. But usually, the command is called in the Initialize(). And usually, scenarios don't start during sunset.
|Then there would be an abrupt switch between a sky adjusted day and the first frame of the sunset. There some kind of interpolation is needed.|
|The first frame in my test was a pretty smooth darkening of the daycolour. The code look quite dynamic alrdy.|
Last edited: 2015-07-01 10:15
I made a test map which does what I suggested. For some reason I can't upload things here atm.
I hereby license TimeAndSkyColors.ocs under the CC-BY license
The test scen has a very fast day-night cycle and 2 SetSkyAdjust() examples in its script. Btw: Clonk Rage's time object used GetRGBValue() to respect the original custom sky color, too.
Edit: Upload worked now. And I forgot to mention that I don't overwrite the nightcolour in the scen. Wasn't sure anymore if thats good or bad.
Edit 2: There was something wrong with the cloud brightness.
Edit 3: Once again I forgot to license the stuff I uploaded. :P I hereby license TimeAndSkyColors.ocs and TimeAndSkyColorsCloudsFix.ocs under the CC-BY license
|Thanks, I am currently working on the controls branch, but I will have a look at the scripts soon, the scenario looked promising!|
|Pushed this under your name.|
Last edited: 2015-11-22 08:49
Armin, your changes have introduced bugs, like for example that Iron Peak had daylight even though it should always be night.
I therefore reverted most of your changes, if this problem of keeping the scenarios sky adjust is important to you, we need to think about it a lot more.
This would involve registering whenever SkyAdjust is called outside of the time object. Feel free to propose something which does not introduce bugs, and to the other developers, I will be the only accepting patches to this object, as I don't want to be fixing bugs on this all the time.
|Closed because of roadmap clearing. Future feature requests are to be directed towards Maikel.|
|2015-05-13 21:48||Armin||New Issue|
|2015-05-15 08:32||Maikel||Note Added: 0003611|
|2015-05-15 10:42||Armin||Note Added: 0003612|
|2015-05-15 13:28||Maikel||Note Added: 0003616|
|2015-05-15 17:23||Armin||Note Added: 0003617|
|2015-05-15 17:31||Armin||Note Edited: 0003617||View Revisions|
|2015-05-15 18:09||Maikel||Note Added: 0003618|
|2015-05-16 15:03||Armin||Note Added: 0003619|
|2015-06-04 18:46||Armin||Note Added: 0003657|
|2015-06-04 19:21||Armin||File Added: TimeAndSkyColors.ocs|
|2015-06-04 19:27||Armin||Note Edited: 0003657||View Revisions|
|2015-06-08 18:08||Armin||File Added: TimeAndSkyColorsCloudsFix.ocs|
|2015-06-08 18:09||Armin||Note Edited: 0003657||View Revisions|
|2015-06-08 19:10||Maikel||Note Added: 0003659|
|2015-07-01 10:15||Armin||Note Edited: 0003657||View Revisions|
|2015-10-16 00:33||Sven2||Target Version||=> 7.0|
|2015-10-27 21:53||Clonkonaut||Note Added: 0004052|
|2015-10-27 21:53||Clonkonaut||Status||new => resolved|
|2015-10-27 21:53||Clonkonaut||Resolution||open => fixed|
|2015-10-27 21:53||Clonkonaut||Assigned To||=> Clonkonaut|
|2015-11-22 08:31||Maikel||Note Added: 0004128|
|2015-11-22 08:31||Maikel||Assigned To||Clonkonaut =>|
|2015-11-22 08:31||Maikel||Status||resolved => new|
|2015-11-22 08:49||Maikel||Note Edited: 0004128||View Revisions|
|2015-11-29 23:03||Clonkonaut||Note Added: 0004162|
|2015-11-29 23:03||Clonkonaut||Status||new => closed|
|2015-11-29 23:03||Clonkonaut||Assigned To||=> Maikel|