Yes, I’ve gotten permission to use this image on previous projects, but haven’t requested it yet for this project, which is one reason I couldn’t provide you with it for testing. But glad to hear that you’ve added the transparency option. I will grab it when the next version is released. Have you decided whether or not to add rain/snow to it? (I would be in favor of that–even if you kept it fairly simple.)
I will at least implement some sort of weather management regarding the sky/cloud parameters to simplify the process of setting up different basic weather types. When that’s done I’ll look into particle effects.
Hey, i tried the demo again, i saw tht stars just dissapear/new ones appear, alreay if move the camera a little bit?
Looks especialy confusing if you moce the camera more faster How youve done that stars? Am i able to exchange them, (cause o this issue)?
Oh ok, the tiled Star texture has already been discussed, so hope for an update to sue a whole star texture =)
Will buy it then
This is because I disabled mip mapping in the texture import settings of the stars texture, the flickering is very visible in small windows / low screen resolutions and it didn’t really show up while running my tests in fullscreen. I reenabled mip mapping (all you have to do is check “Generate Mip Maps” in the texture import settings of “stars_texture.png”) and updated the web players, check it out!
In case you still don’t like the texture it is in fact possible to swap it out for any other texture you’d like to have and the next update will even support using the built-in Unity skybox system at night.
Keep up the good work, I really like your coding-style, it’s very clean and well structured.
I think also it wouldn’t be a good idea to bloat up your script with features like weather. I would prefer a separate addon here.
I’m still having issues with the red sky. It still shows up even with very low falloff settings. But there is another problem with this. By setting the falloff parameter very low the switch between sunset and night is too fast. Maybe I need to tweak the sunlight coloring value a little bit…
p.s. A really cool feature would be to combine substance materials with your cloud shader.
That’s always nice to hear, thanks!
I’m currently implementing some basic weather management and I’ll see how complex it gets. It will be encapsulated in a separate script that you can use or ignore, no matter if I decide to release it as a separate addon or as part of the package. I won’t feel comfortable charging extra for it if creating it isn’t a decent amount of work, so I guess we’ll just wait and see how much time this is going to take.
I dived into this area of interest once again and I’m quite positive the next update will address this once and for all. I’m currently changing the way the script tries to adjust the sun color influence and so far it looks like my new way of doing it should finally satisfy everybody’s needs.
This would be very cool indeed. I’ll take a closer look as soon as I find the time, but you probably won’t see this in the next update.
Quick development update: 1.5 is shaping up nicely, I just updated the webplayers to the new version so that everybody can have a look. I’d love to get some feedback before actually releasing it.
Version 1.5 Changelog:
- Enabled mip mapping of the stars texture by default to avoid flickering
- Added support for using custom skyboxes at night (see readme for details)
- Greatly improved the parametrization of the sun color influence at sunrise and sunset
- Added internal pointers to commonly used components for faster access
- Split the sun and moon parameters into their own property classes
- Adjusted the cloud shading calculation to keep it from darkening some clouds too much
- Adjusted the color wavelengths to produce a more realistic blue color of the sky by default
- Made the moon phase influence the intensity of the sunlight reflected by the moon
- Replaced the lens flares with custom shaders that are correctly being occluded by clouds
- Enabled the new lens flares on mobile
it might also contain the first part of the weather type manager if I decide to include it.
Looks nice, can’t wait for the release.
I’ve found a little “bug” (unrelated to 1.5) regarding the cardinal direction. In my scene I’m using Z as North, so I’ve tried to rotate the Sky Dome by 270° (Y) that the sun goes up at East. But it seems the sun and moon position are broken if the skydome position is not at 0,0,0.
Is there any way to fix this? I’m not sure if you’ve taken the cardinal direction into account.
This looks great, I’m pretty new to this so sorry if this is a silly question. Would like work with something like the unity toon level kit that’s available on the asset store? If so how would I get it to work with that, to make the models all look correct with the transition etc.
cheers
Terry
Ah damn looks like I accidentally applied the correcting rotation not only to the sun position offset but also to the sky dome position. Thanks a lot for reporting this, I’ll fix it in the next update. If someone needs to fix this on his own until then, here are the required changes in Sky.cs:
Search for:
Sun.transform.position = transform.position + SphericalToCartesian(OrbitRadius, theta, phi);
Sun.transform.position = transform.rotation * Sun.transform.position;
Replace it with:
Sun.transform.position = transform.position
+ transform.rotation * SphericalToCartesian(OrbitRadius, theta, phi);
And do the same for the moon. This is really only necessary if you both rotate and move the sky dome, only rotating or only moving the sky dome works just fine. Thanks again for reporting this silentneedle!
I’m sot sure if I understand the question correctly, but if you’re asking about toon shaders: The package should work without any issues with both toon post-processing shaders and toon material shaders. In both cases the sky dome won’t be affected by the toon shaders as it doesn’t write to the depth buffer. If you want toon-looking clouds this could for example be achieved by replacing the cloud texture (just add some banding to it) and enabling ZWrite in the cloud shader (search for cutout shader). That way the toon post-processing would also affect the clouds.
Just a quick update on a few things:
- I decided to include some simple weather type management (fade between weather types) regarding the sky dome parameters (mainly cloud-related) but no particle effects for now as most of you wanted to keep the package focused, but some wanted to at least control the sky dome a little better. It’s wrapped in a single script that’s disabled by default and should be easily customizable. I hope this solution is okay for most of you guys, but as always I’m open for feedback. For now there will only be the three basic weather types clear, cloudy and stormy (+ any of your custom settings of course) as the focus of 1.5 is on all the other new stuff and changes. It’s still a possibility to offer some sort of addon containing rain and snow particles, snow shaders and weather sounds at some point in the future, but as most of you said that’s not the point of Time of Day itself.
- I thought those of you targeting high performance platforms (PC, consoles) for games like flight simulators may want to have 3D volume clouds. I therefore decided to start working on a volumetric cloud system (sold separately, fully compatible to Time of Day). I implemented a technique that (as far as I know) hasn’t been done in Unity before and isn’t even being used in most current AAA games (flight simulators might do something similar but the exact technical details are unknown in most cases). It offers superb performance compared to clouds consisting of hundreds of alpha blended particle renderers and is based on actual volume rendering of 3D textures. The results I achieved so far look really good, you can definitely look forward to it if you’re interested in that sort of thing.
- I’m going to submit Time of Day 1.5 for review this week.
Very, very interested to see your cloud system If it is a post process approach, I haven’t had good experiences with that
I read about the post-processing volume rendering approach but I actually managed to implement my cloud volumes in a normal fragment shader. Applying correct lighting has been quite the hassle but I achieved some very promising results. It will be Unity Pro only however as access to the depth buffer is required to handle intersecting objects. That’s all I can say for now, stay tuned.
So 1.5 has already been reviewed and is available for download! It’s amazing how fast the Asset Store reviewers do their work. I also updated the demo scenes and the screenshots in the first post, just make sure to refresh the page to clear the old ones from your cache.
Version 1.5 Changelog:
- Enabled mip mapping of the stars texture by default to avoid flickering
- Added support for using custom skyboxes at night (see readme for details)
- Greatly improved the parametrization of the sun color influence at sunrise and sunset
- Added internal pointers to commonly used components for faster access
- Split the sun and moon parameters into their own property classes
- Adjusted the cloud shading calculation to keep it from darkening some clouds too much
- Adjusted the color wavelengths to produce a more realistic blue color of the sky by default
- Made the moon phase influence the intensity of the sunlight reflected by the moon
- Replaced the lens flares with custom halo shaders that are correctly being occluded by clouds
- Enabled the new halo effects on mobile
- Moved all shaders into a “Time of Day” category
- Added a basic weather manager with three weather types
Thanks again for your support and the positive reviews in the Asset Store! If you haven’t rated the package yet it would be nice if you could do so - it really helps spreading the word.
Just picked this up on the asset store and have to say for optimisation and visual appearance this is really great! I’ve got both UniStorm and Silverlining which both haven’t hit the sweet spot for me and tend to have looked a bit limp. Your solution looks perfect and with a touch of mobile bloom gives a rich sky without much performance impact! I hope you continue to tweak and add more as you have created a very special system. Well done!
Same thing for me!
Excellent stuff - I also have both the two other solutions (which are both great - but they just didn’t “click” with me) - and I am very impressed by this one - and at $50 it is a no-brainer.
Looking REALLY forward to the volumetric skies though. I hope they will work equally well both from a first person kind-of-ground based view - as well as more of an overhead RTS style viewpoint.
The new version is very nice - it’s great to see this asset progressing.
One question re the new Space feature: I’ve created a custom skybox for the night sky. I’ve disabled the Space child object and pointed to my skybox in Render Settings. How can I configure Time Of Day so that the skybox is only displayed at night?
If I change Clear Flags on my main camera from Solid Color to Skybox, the skybox is visible at all times (i.e. including during the day).
Looks like I didn’t test the built-in skybox after changing the render queue in my shaders. It’s a minor change and I’ll submit a hotfix (1.5.1) today. It should be online around Monday.
The technical details in case somebody wants to fix this on his own before the hotfix is available: I changed the shader queues from “Transparent-X” (around index 3000) to “Geometry+X” (around index 2000). The built-in skybox shader is actually in the queue “Background” (which would be index 1000 and therefore before “Geometry”) so I thought this change should work without any issues. However, Unity apparently does something special and renders the built-in skybox at index 2500, leading to the issue that the built-in skybox renders in front of the dome.
After 3 days of waiting for review by the Asset Store team, 1.5.1 with the hotfix for built-in skyboxes is now finally available. Looks like the recent promotions put some extra workload on the reviewers.
I know it sux to say that… but Isn’t the red dawn now way too less? I’ve skipped some versions and find it hard to create a setting that works at all times with a nice evening morning now.