Jump to content


File Information

  • Submitted: Apr 20 2011 06:10 PM
  • Last Updated: Jul 21 2011 09:23 AM
  • File Size: 2.46MB
  • Views: 5845
  • Downloads: 436

Download Day & Night Script 1.3

* * * * * 10 Votes

A new version of my day-night script and shader. Now supporting basic dynamic clouds and wind. Also some settings were tweaked.

What's New in Version 1.3 (See full changelog)

  • 1.2
  • - added dynamic cloud support
  • - tweaked some settings
  • - added night sky (moon is still missing)
  • 1.3
  • - added fog to the sky
  • - added controller for cloud density and intensity (darkness of colors)
  • - added options to change cloud and star texture via script

Pixel Perfect
Apr 20 2011 07:21 PM
Thankyou, will give this a try :)
Lets see...
the night time hours could use some fixing up. the stars are just blah and you could make the night sky darker. lol.

but other than that its pretty good.   B)
to make the nightsky darker change line 91 in scatter.frag to

finalcolor = mix(vec4(clamp(color,0.0,1.0),1.0),nightcolor,pow(1.0-zenith,2.0)*0.2);

if you have a better nightsky cubemap (or someoneelse) I would like to integrate it, but in the meantime you can simply change the night.dds to change the nightsky appeareance
this looks very good :)
thank you klepto.

I just have a report and a request if you don't mind:
- fog do not affect on the sky.

- shadow updates with dynamic day/night cycle looks jaggies in the edges. I know this is related to the editors shadow, but do you have any solutions to cover this? or at least we could have animated clouds without having day/night cycle.. :-??
Very nice stuff, thanks klepto2  :)
hi, thx for the feedback :)

- adding all shadow options to the light settings (like the directional light)
- adding a new night sky (grabbed from stellarium)
- minimum darkness will be configurable
- option to let fog effect sky.

Most is already done, so i will upload a new version today or tomorrow.
Thanks for share it klepto2...
have some possibility that you add a lens glare fx?  :D
I just tried this out but I think the object shadows should disappear at night or shouldn’t be as dark if this is possible.

Red Ocktober
Jul 20 2011 09:32 PM
this a magnificent piece of work... THANKS for sharing...

FullskiesBlueClear0016_2_L.mat  takes the fog (when i adjust the fog angle up), but scatter.mat  doesn't appear affected by distance fog...

originally got the wrong file... all working well with correct 1.3 file...


9 user(s) are online (in the past 60 minutes)

0 members, 7 guests, 0 anonymous users

Bing (2)