Anonymous Login
2021-09-18 04:45 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001311OpenClonkObjectspublic2015-11-29 23:03
Assigned ToMaikel 
Product Version 
Target VersionFixed in Version 
Summary0001311: Time Controller ignores SetSkyAdjust()
DescriptionThe 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 Reproducevar time = CreateObject(Environment_Time);

SetSkyAdjust(RGBa(255,255,255,200), RGB(255,0,0))

...The sky will turn redish for a very short time.
TagsNo tags attached.
Attached Files




Maikel (developer)

On snapshot or on 6.0?


Armin (reporter)



Maikel (developer)

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?


Armin (reporter)

Last edited: 2015-05-15 17:31

View 2 revisions

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[0], skyshade[1], skyshade[2], 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.


Maikel (developer)

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.


Armin (reporter)

The first frame in my test was a pretty smooth darkening of the daycolour. The code look quite dynamic alrdy.


Armin (reporter)

Last edited: 2015-07-01 10:15

View 4 revisions

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


Maikel (developer)

Thanks, I am currently working on the controls branch, but I will have a look at the scripts soon, the scenario looked promising!


Clonkonaut (developer)

Pushed this under your name.


Maikel (developer)

Last edited: 2015-11-22 08:49

View 2 revisions

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.


Clonkonaut (developer)

Closed because of roadmap clearing. Future feature requests are to be directed towards Maikel.

-Issue History
Date Modified Username Field Change
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
+Issue History