it runs a world-clock which you can set your “seconds in a day” and based of of that you have timestamp entries.
so for example say i want a sunrise starting at 6.30 ending at 7.30, you just add a transition with this start and end time, set a skybox (or not), set the density, color and intensity.
I wanna make a free asset out of it, since i didn’t find a good free one (if i’m mistaken please let me know)
so any suggestions what to add to this?
here are some vids:
With Stars
added the possibility to start/stop a collection of atmosphere sounds.
… any other ideas to add?
should i make an editor window for it for ease of use?
This is looking great! Is there a possibility to control the sun angle? Now it looks like the sun is rising more or less vertically.
Custom editor window for easy adjustment of color curves would be great.
Some suggestions:
-Possibility to adjust sunrise/sunset time (day is longer than night during summer season, a 6 AM to 6 PM day basically only happens near the Equator)
-Moon phase based on moon position relative to the Sun
-Stars skybox rotation at night (I don’t know if you already have this?) - basically, all stars should move across the sky at the same pace as the Sun does
Keep up the good work! Looking forward to seeing more of this!
ok thanks I’ll try implementing these things tomorrow, and start on a editor window
i’ll have to think about the possibility of changing day/night length. this happens mostly because we move around the sun in an ellipse… but here its the sun rotating around the world.
you would need to be able to set the position for the center where the sun rotates around, set an ellipse path and be able to give the path a rotation offset so that there is a difference in the day/night curve…
edit: or i 'll just fake it with a speed you can set for your sun/moon with a entering time and exiting time
The problem with setting different speeds for the sun during day and night is that actually during summer months the sun stays above the horizon more than 180º (so it doesn’t rise from east and set in west - on the Northern hemisphere it rises from northeast and sets closer to northwest, which makes the day last longer). Probably the easiest way to replicate this would be to do some math in the script that determines the sun position on the skydome at each moment, and then just set the position / rotation of the sunlight each frame, instead of continuously rotating the sun at a certain speed.
I’m just being picky about the accuracy of such a system, the thing is I’ve been wishing for a proper day/nicht cycle for a long time; I used Cryengine for years and at some point started to notice flaws like the moon being lit from the opposite side of where the sun actually set, the stars and moon being stationary during nighttime, and the inability to create a longer day and shorter night with accurate results.
Hi i have moon and sun position script based on this Computing planetary positions from my old project, this acurate enough i think, if u want it i’ll try cleaning it since this realy old.
basically this calculate sun and moon altitude and azimuth based on time (hh/mm/ss/dd/mm/yyyy) and position LAT/LON.
Im also try implementing stars rotation, but didn’t accurate enough since i didn’t have base start time when stars position are in reality.
since im not good at shader, im stuck at making moon, clouds, and stars realistically :(. so i just grab sphere object for moon
@mliukka that would mean that you should be able to choose a geographical position on a sphere.
all sounds interesting but maybe a bit more work than i bargained for a free asset @Ysgramor thanks I’ll have a look. if it works i’ll implement it. If not, i’ll finish this as is and maybe start a new one where you have all these global positioning based options.
Hi all, after few hours of cleaning stuff, here some example project so far, fell free to modifying it for best result.
I’ll also trying to fixing some “unfinished” code, like the starfield (currently didn’t move as expected).
This file size big because of 2 huge starmap texture.
Sorry for Uncleaned Script, maybe later i’ll clean it
maybe I’ll get some spare time “again” to expanding, after im abandoned this:smile:
Sun and moon calculations are based on link i gave earlier, detailed calculation things explained there, im just convert it into C#
Im ready for some help if ure feel lost in my script
Added clouds, not moving yet and not sure if they need to move…
you can set overall cloud density for the sky, min-max size and min-max height for the clouds to randomly generate individual size and height for a cloud.
Wow for a free System this looks pretty awesome!
Respect that you are sharing this. Can you also show a video to storm / tempest skyes when you increase the cloud ratio? Since I am working on a dark horror game I am pretty interested to see how I can use your asset for creating dark / foggy nights. Fog Ratio and options are possible to set?
there is no change in cloud texture (yet?) if you increase or decrease cloud density. see video.
I was thinking of adding in a weather system… but thats for an other time… would be cool though, generating lightning, rain, clustering clouds and such
as you can see in the screenshot of the editor, you can set fog color and fog density, didn’t think it necessary to adjust fog mode.