About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
Wrong night
Author Message
Jben Offline
Member

Post: #1
Wrong night
Hi,
I having a little problem, I set up correctly a Day and Night cycle based on the real cycle but when it's Night, I feel that the sun shines from below the ground, and clouds appear white super visible and what breaks the mood of the night.

Would someone help me please?
07-01-2011 11:52 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kulesz Offline
Member

Post: #2
RE: Wrong night
Well, as for clouds there is a code in tutorial:
Code:
// update clouds
   Clouds.layered.update();
   REP(Clouds.layered.layers())Clouds.layered.layer[i].color=ColorBrightness(horizon.max()*(255.0f/164));

You can also adjust the horizon/sky color in the tl table (from tutorial), so it'd be darker in the night hours (between 22 - 6). You can also extend the table (and functions), so it would also be able to change ambient lighting relative to the time of day. It worked for me quite well.
(This post was last modified: 07-02-2011 11:01 AM by kulesz.)
07-02-2011 11:00 AM
Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #3
RE: Wrong night
Ok, thank you for that answer, I tackle to try it.
07-02-2011 03:23 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #4
RE: Wrong night
I understood the idea for the clouds but still there as the sun continues to illuminate through the soil, it has nothing to do with the ambPow ();

Look for yourself:
[Image: screenir.jpg]

Please help me :/
I have tried many things.
(This post was last modified: 07-03-2011 02:25 AM by Jben.)
07-03-2011 02:17 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #5
RE: Wrong night
The reason the sun shines through is because of culling. If you look up from underneath the terrain, you will see that you can see right through the terrain, meaning there's nothing to block the light from the sun.

1) Simply disable the light all together ( e.g. Sun.light_color = Vec(0); or Sun.image = NULL; ).
2) Disable culling on the terrain materials so you can see the terrain from both sides (there's the checkbox name Cull on the Material Editor, make sure it's unticked).
(This post was last modified: 07-03-2011 04:32 AM by Driklyn.)
07-03-2011 04:30 AM
Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #6
RE: Wrong night
Thank you Driklyn for setting, it fixed nowsmile
07-03-2011 03:39 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #7
RE: Wrong night
Hum, in the Editor, it works but not in play, any ideas?
07-03-2011 05:22 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Dandruff Offline
Member

Post: #8
RE: Wrong night
Try saving the materials and the world if you haven't already. If you disabled the light in the world editor, disable it in code too.
07-03-2011 07:05 PM
Find all posts by this user Quote this message in a reply
Post Reply