Anonymous Login
2017-11-21 15:00 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001311OpenClonkObjectspublic2015-11-30 00:03
ReporterArmin 
Assigned ToMaikel 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Product Version6.0 
Target Version7.0Fixed 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);
time->SetTime(602);
time->SetCycleSpeed(30);

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

-Relationships
+Relationships

-Notes

~0003611

Maikel (developer)

On snapshot or on 6.0?

~0003612

Armin (reporter)

Both.

~0003616

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?

~0003617

Armin (reporter)

Last edited: 2015-05-15 19: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.

~0003618

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.

~0003619

Armin (reporter)

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

~0003657

Armin (reporter)

Last edited: 2015-07-01 12: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

~0003659

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!

~0004052

Clonkonaut (developer)

Pushed this under your name.

~0004128

Maikel (developer)

Last edited: 2015-11-22 09: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.

~0004162

Clonkonaut (developer)

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

-Issue History
Date Modified Username Field Change
2015-05-13 23:48 Armin New Issue
2015-05-15 10:32 Maikel Note Added: 0003611
2015-05-15 12:42 Armin Note Added: 0003612
2015-05-15 15:28 Maikel Note Added: 0003616
2015-05-15 19:23 Armin Note Added: 0003617
2015-05-15 19:31 Armin Note Edited: 0003617 View Revisions
2015-05-15 20:09 Maikel Note Added: 0003618
2015-05-16 17:03 Armin Note Added: 0003619
2015-06-04 20:46 Armin Note Added: 0003657
2015-06-04 21:21 Armin File Added: TimeAndSkyColors.ocs
2015-06-04 21:27 Armin Note Edited: 0003657 View Revisions
2015-06-08 20:08 Armin File Added: TimeAndSkyColorsCloudsFix.ocs
2015-06-08 20:09 Armin Note Edited: 0003657 View Revisions
2015-06-08 21:10 Maikel Note Added: 0003659
2015-07-01 12:15 Armin Note Edited: 0003657 View Revisions
2015-10-16 02:33 Sven2 Target Version => 7.0
2015-10-27 22:53 Clonkonaut Note Added: 0004052
2015-10-27 22:53 Clonkonaut Status new => resolved
2015-10-27 22:53 Clonkonaut Resolution open => fixed
2015-10-27 22:53 Clonkonaut Assigned To => Clonkonaut
2015-11-22 09:31 Maikel Note Added: 0004128
2015-11-22 09:31 Maikel Assigned To Clonkonaut =>
2015-11-22 09:31 Maikel Status resolved => new
2015-11-22 09:49 Maikel Note Edited: 0004128 View Revisions
2015-11-30 00:03 Clonkonaut Note Added: 0004162
2015-11-30 00:03 Clonkonaut Status new => closed
2015-11-30 00:03 Clonkonaut Assigned To => Maikel
+Issue History