Author Topic: Default Day Cycle But on a Different Scale?  (Read 1513 times)

Alright, this is going to be wicked hard to explain - so I'll try my best.

To me, the default day cycle at it's brightest point (FRACTION 0.201462) is too bright. I decided I was going to make a custom day cycle and change the Direct, Ambient, Fog, Shadow, Sky and Sun Flare Color at FRACTION 0.201462 to match the Skyland's static settings.

Code: (Skyland's Atmosphere Settings) [Select]
directLightColor 0.6 0.6 0.6
ambientLightColor 0.5 0.5 0.5
fogColor 0.900000 0.900000 1.000000
shadowColor 0.3 0.3 0.4 1.0
sunFlareColor 0.2 0.2 0.2

To me, these settings are what I believe would be listed at FRACTION 0.201462 if the Skylands had its own day cycle.

Now, I can easily change the default day cycle's variables at FRACTION 0.201462 to match the Skyland's settings, but that is not the issue. The issue is determining the next FRACTION's settings.

I have calculated the increments and decrements between each FRACTION point and tried adding/subtracting those values to the Skyland's settings for each FRACTION point, but the smooth transition that the default day cycle just isn't there. The variables will go over 1.0.

I have tried calculating the percentage of change between each FRACTION point's variables, but that takes way too long and probably isn't going to produce the desired results.

I was hoping someone would know an easier way of doing this.

It's half-past 3AM, I have to sleep. Hopefully I'll have some answers when I wake up later. Thanks guys!
« Last Edit: August 16, 2012, 03:20:45 AM by Awdax »

It's half-past 3AM, I have to sleep. Hopefully I'll have some answers when I wake up later. Thanks guys!
I seriously think this is a major portion of your problem

Lugnut, I look at this:
Code: [Select]
FRACTION 0.201462
DIRECTCOLOR 0.918310 0.920561 0.860337 1.000000
AMBIENTCOLOR 0.733295 0.901869 0.878237 1.000000
SKYCOLOR 0.602760 0.821364 0.962617 1.000000
FOGCOLOR 0.931623 0.953271 0.775089 1.000000
SHADOWCOLOR 0.474059 0.763197 0.780374 1.000000
SUNFLARECOLOR 0.917279 0.948598 0.469866 1.000000

then this:
Code: [Select]
FRACTION 0.0576022
DIRECTCOLOR 0.601383 0.621495 0.455957 1.000000
AMBIENTCOLOR 0.334940 0.434579 0.282273 1.000000
SKYCOLOR 0.361953 0.562198 0.691589 1.000000
FOGCOLOR 0.631374 0.733645 0.589658 1.000000
SHADOWCOLOR 0.152153 0.289428 0.485981 1.000000
SUNFLARECOLOR 0.641643 0.663551 0.328675 1.000000

and the only liable way I see of getting from 0.918310 to 0.601383 is by multiplying 0.918310 by 0.6548801602944539 since that comes out with .601383. But even then, the values at each FRACTION point have a different outcome when comparing them with each other and it won't be the same - and dividing or multiplying each RGB value to get the next is ridiculous.

What I'm trying to do is find the ratio between each point in the day cycle - but that varies each time, and like I said, having to apply that to each R, G and B value is crazy and probably not worth it.
« Last Edit: August 16, 2012, 09:50:37 AM by Awdax »

So you want an even transition between different points?

It depends how many transitions you want.
Basically, add 1 to how many you want and divide 1 by it.

If you wanted 8 transitions, 8+1 = 9
1/9 = 0.11111111

So just add 0.1111111 each time.

Kind of. Let me try explaining this again. Lets call FRACTION 0.201462 the "base time" - since that is midday.

Code: [Select]
FRACTION 0.201462
DIRECTCOLOR 0.918310 0.920561 0.860337 1.000000
AMBIENTCOLOR 0.733295 0.901869 0.878237 1.000000
SKYCOLOR 0.602760 0.821364 0.962617 1.000000
FOGCOLOR 0.931623 0.953271 0.775089 1.000000
SHADOWCOLOR 0.474059 0.763197 0.780374 1.000000
SUNFLARECOLOR 0.917279 0.948598 0.469866 1.000000

FRACTION 0.337133
DIRECTCOLOR 0.677570 0.596580 0.300790 1.000000
AMBIENTCOLOR 0.606444 0.668224 0.577670 1.000000
SKYCOLOR 0.687047 0.739429 0.967290 1.000000
FOGCOLOR 0.879475 0.883178 0.784130 1.000000
SHADOWCOLOR 0.231461 0.440841 0.467290 1.000000
SUNFLARECOLOR 0.560748 0.554772 0.241069 1.000000

Look at the color values from FRACTION 0.201462 compared to the ones at FRACTION 0.337133. I want to figure out how Badspot, kompressor or whoever coded the default day cycle determined how much the values would increase/decrease at each FRACTION.

What I want to do is use the Skyland's settings as the "base time." So this is how FRACTION 0.201462 would look:
Code: [Select]
FRACTION 0.201462
DIRECTCOLOR 0.6 0.6 0.6 1.000000
AMBIENTCOLOR 0.5 0.5 0.5 1.000000
SKYCOLOR 0.602760 0.821364 0.962617 1.000000
FOGCOLOR 0.900000 0.900000 1.000000 1.000000
SHADOWCOLOR 0.3 0.3 0.4 1.000000
SUNFLARECOLOR 0.2 0.2 0.2 1.000000

But what would FRACTION 0.337133's values be? Or even FRACTION 0.0576022? I want the same transition and change in values that the default cycle has, with the main difference being the "base time."

I hope I explained that better.

Have you ever thought that FRACTION could be the actual multiplier that was used to get those values?

Yes, but I don't think that is it. If FRACTION 1.0 were to be the brightest point (midday) than you could do what you said - but it isn't.



FRACTION 1.0 is a degree before FRACTION 0, and that's before sunrise. I just don't see how it would work.

Yes, but I don't think that is it. If FRACTION 1.0 were to be the brightest point (midday) than you could do what you said - but it isn't.



FRACTION 1.0 is a degree before FRACTION 0, and that's before sunrise. I just don't see how it would work.
Where did you get that picture?



I already know how to make day cycles and everything. The thing I'm wondering about is the change between each FRACTION.

Look at the color values from FRACTION 0.201462 compared to the ones at FRACTION 0.337133. I want to figure out how Badspot, kompressor or whoever coded the default day cycle determined how much the values would increase/decrease at each FRACTION.

I already know how to make day cycles and everything. The thing I'm wondering about is the change between each FRACTION.
Then why don't you ask demian for help, like in a PM? He seems to know a lot about daycycles.

Because it seemed to me I would have a better chance at getting an answer or help from someone since everyone could see the topic, let alone PMing one person.

I did PM him though, hopefully he has an idea.

Okay. So from what I gather you want to use the default day cycle but at midday you want to use the Skyland's lighting. Son, you are tired. All you need to do is add a those settings at fraction 0.25 and you're done. The game does the smooth transition automatically.

See, but if I add this into the default day cycle file, rename it, package it and everything - there will be gaps between the transitions.
Code: [Select]
FRACTION 0.25
DIRECTCOLOR 0.6 0.6 0.6 1.000000
AMBIENTCOLOR 0.5 0.5 0.5 1.000000
SKYCOLOR 0.602760 0.821364 0.962617 1.000000
FOGCOLOR 0.900000 0.900000 1.000000 1.000000
SHADOWCOLOR 0.3 0.3 0.4 1.000000
SUNFLARECOLOR 0.2 0.2 0.2 1.000000

Here is an example of what I'm trying to do.

Say this is the default day cycle:
Code: [Select]
FRACTION 0.0
DIRECTCOLOR 0.4 0.4 0.4

FRACTION 0.25
DIRECTCOLOR 0.9 0.9 0.9

FRACTION 0.5
DIRECTCOLOR 0.4 0.4 0.4

FRACTION 0.75
DIRECTCOLOR 0.2 0.2 0.2

It's too bright. I want FRACTION .25 to be the Skyland's settings. But I want the other fractions to match the same increments that the default cycle has. So if I were to finally figure it out, this would be my outcome:
Code: [Select]
FRACTION 0.0
DIRECTCOLOR 0.2 0.2 0.2

FRACTION 0.25
DIRECTCOLOR 0.6 0.6 0.6

FRACTION 0.5
DIRECTCOLOR 0.2 0.2 0.2

FRACTION 0.75
DIRECTCOLOR 0.0 0.0 0.0

Now the other fraction points match the midday point, and the increments between each one match the increments of the default day cycle.

Now this is an example, so the math and everything is off - but this is what I am trying to do. I want the midday fraction to be the Skyland's settings, but I want the other fractions to match up with the increments of the default cycle and fit with the midday fraction.