Author Topic: Day/Night Cycle Problems  (Read 461 times)

I made this custom day/night cycle and it works fine except the night time bit isn't NEARLY as dark as I set it to be and it has a weird yellow ambient light that isn't in the code.

Code: [Select]
//morning

FRACTION 0
DIRECTCOLOR 0.500000 0.500000 0.500000 1.000000
AMBIENTCOLOR 0.300000 0.300000 0.300000 1.000000
SKYCOLOR 1.000000 1.00000 1.00000 1.000000
FOGCOLOR 0.900000 0.900000 1.00000 1.000000
SHADOWCOLOR 0.300000 0.30000 0.40000 1.000000
SUNFLARECOLOR 0.200000 0.200000 0.200000 1.000000

//noon

FRACTION 0.25
DIRECTCOLOR 0.600000 0.600000 0.600000 1.000000
AMBIENTCOLOR 0.500000 0.500000 0.500000 1.000000
SKYCOLOR 1.000000 1.00000 1.00000 1.000000
FOGCOLOR 0.900000 0.900000 1.00000 1.000000
SHADOWCOLOR 0.300000 0.30000 0.40000 1.000000
SUNFLARECOLOR 0.200000 0.200000 0.200000 1.000000

//evening

FRACTION 0.4
DIRECTCOLOR 0.600000 0.600000 0.600000 1.000000
AMBIENTCOLOR 0.300000 0.300000 0.300000 1.000000
SKYCOLOR 1.000000 1.00000 1.00000 1.000000
FOGCOLOR 0.900000 0.900000 1.00000 1.000000
SHADOWCOLOR 0.300000 0.30000 0.40000 1.000000
SUNFLARECOLOR 0.200000 0.200000 0.200000 1.000000

//sunset

FRACTION 0.5
DIRECTCOLOR 0.600000 0.550000 0.550000 1.000000
AMBIENTCOLOR 0.121000 0.02800 0.00000 1.000000
SKYCOLOR 1.000000 0.262000 0.32200 1.000000
FOGCOLOR 1.000000 0.477000 0.00000 1.000000
SHADOWCOLOR 0.140000 0.14000 0.15400 1.000000
SUNFLARECOLOR 1.000000 0.71500 0.00000 1.000000

//night

FRACTION 0.6
DIRECTCOLOR 0.750000 0.750000 0.100000 1.000000
AMBIENTCOLOR 0.000000 0.00000 0.01000 1.000000
SKYCOLOR 0.140000 0.140000 0.65000 1.000000
FOGCOLOR 0.230000 0.230000 0.84000 1.000000
SHADOWCOLOR 0.230000 0.23000 0.75000 1.000000
SUNFLARECOLOR 0.400000 0.40000 0.40000 1.000000


//midnight

FRACTION 0.75
DIRECTCOLOR 0.650000 0.650000 0.090000 1.000000
AMBIENTCOLOR 0.000000 0.00000 0.01000 1.000000
SKYCOLOR 0.140000 0.140000 0.65000 1.000000
FOGCOLOR 0.230000 0.230000 0.84000 1.000000
SHADOWCOLOR 0.230000 0.23000 0.75000 1.000000
SUNFLARECOLOR 0.400000 0.40000 0.40000 1.000000

//latenight

FRACTION 0.9
DIRECTCOLOR 0.750000 0.750000 0.100000 1.000000
AMBIENTCOLOR 0.000000 0.00000 0.01000 1.000000
SKYCOLOR 0.140000 0.140000 0.65000 1.000000
FOGCOLOR 0.230000 0.230000 0.84000 1.000000
SHADOWCOLOR 0.230000 0.23000 0.75000 1.000000
SUNFLARECOLOR 0.400000 0.40000 0.40000 1.000000

Any ideas on what's wrong?

"DIRECTCOLOR 0.750000 0.750000 0.100000 1.000000"

I'm guessing that has something to do with it.

"DIRECTCOLOR 0.750000 0.750000 0.100000 1.000000"

I'm guessing that has something to do with it.
oh man yeah.. I swear I changed directcolor, must have missed it.. totally overlooked that lol

Testing now

Yeah that was part of the problem, the other part was I dropped a 0 in front of all the places on the night values... lol

Here's the fixed code if anyone wants it (although I'll probably release it)
Code: [Select]
//morning

FRACTION 0
DIRECTCOLOR 0.500000 0.500000 0.500000 1.000000
AMBIENTCOLOR 0.300000 0.300000 0.300000 1.000000
SKYCOLOR 1.000000 1.00000 1.00000 1.000000
FOGCOLOR 0.900000 0.900000 1.00000 1.000000
SHADOWCOLOR 0.300000 0.30000 0.40000 1.000000
SUNFLARECOLOR 0.200000 0.200000 0.200000 1.000000

//noon

FRACTION 0.25
DIRECTCOLOR 0.600000 0.600000 0.600000 1.000000
AMBIENTCOLOR 0.500000 0.500000 0.500000 1.000000
SKYCOLOR 1.000000 1.00000 1.00000 1.000000
FOGCOLOR 0.900000 0.900000 1.00000 1.000000
SHADOWCOLOR 0.300000 0.30000 0.40000 1.000000
SUNFLARECOLOR 0.200000 0.200000 0.200000 1.000000

//evening

FRACTION 0.4
DIRECTCOLOR 0.600000 0.600000 0.600000 1.000000
AMBIENTCOLOR 0.300000 0.300000 0.300000 1.000000
SKYCOLOR 1.000000 1.00000 1.00000 1.000000
FOGCOLOR 0.900000 0.900000 1.00000 1.000000
SHADOWCOLOR 0.300000 0.30000 0.40000 1.000000
SUNFLARECOLOR 0.200000 0.200000 0.200000 1.000000

//sunset

FRACTION 0.5
DIRECTCOLOR 0.600000 0.550000 0.550000 1.000000
AMBIENTCOLOR 0.121000 0.02800 0.00000 1.000000
SKYCOLOR 1.000000 0.262000 0.32200 1.000000
FOGCOLOR 1.000000 0.477000 0.00000 1.000000
SHADOWCOLOR 0.140000 0.14000 0.15400 1.000000
SUNFLARECOLOR 1.000000 0.71500 0.00000 1.000000

//night

FRACTION 0.6
DIRECTCOLOR 0.0300000 0.0300000 0.0300000 1.000000
AMBIENTCOLOR 0.010000 0.01000 0.03000 1.000000
SKYCOLOR 0.100000 0.100000 0.150000 1.000000
FOGCOLOR 0.150000 0.150000 0.30000 1.000000
SHADOWCOLOR 0.0150000 0.015000 0.10000 1.000000
SUNFLARECOLOR 0.400000 0.40000 0.40000 1.000000


//midnight

FRACTION 0.75
DIRECTCOLOR 0.0300000 0.0300000 0.0300000 1.000000
AMBIENTCOLOR 0.000000 0.00000 0.03000 1.000000
SKYCOLOR 0.100000 0.100000 0.150000 1.000000
FOGCOLOR 0.150000 0.150000 0.30000 1.000000
SHADOWCOLOR 0.0150000 0.015000 0.10000 1.000000
SUNFLARECOLOR 0.400000 0.40000 0.40000 1.000000

//latenight

FRACTION 0.9
DIRECTCOLOR 0.0300000 0.0300000 0.0300000 1.000000
AMBIENTCOLOR 0.010000 0.01000 0.03000 1.000000
SKYCOLOR 0.100000 0.100000 0.150000 1.000000
FOGCOLOR 0.150000 0.150000 0.30000 1.000000
SHADOWCOLOR 0.0150000 0.015000 0.10000 1.000000
SUNFLARECOLOR 0.400000 0.40000 0.40000 1.000000