Azure[Sky] - Dynamic Skybox v8.0.3

I do not own this asset yet, but from what I read in the author’s topic, the version 1.0 of Horizon[On] does not draw to the depth buffer, but the author sends the new shader by PM for those who need them before the release of the next version. The azure[Sky] fog is an image effect and only affects objects that draw to the depth buffer, if you already have these new shaders, i believe that azure[Sky] will work well with Horizon [On].

My intention is to make azure[Sky] work directly in the skybox. This way is much simpler and intuitive to add to the project, with only a script to manage the entire sky, even a begginer will be able to configure it.

So far so good, the problem is that the mesh of the skybox is a sphere of low quality and makes it impossible to write the calculations in the vertex program without having unpleasant results. For this reason, most of the equations are written in the fragment shader that calculates once for each pixel on the screen. Causing delays in the shader. But that is only evident in mobile devices.

The current version 1.0.2 is not optimized as it should be, my first intention was to work, for then optimize. I believe that will not perform well on mobile platforms. In tests I did on Windows PC, the performance was very good.

I used the FPSDisplay.cs script to count the fps. Found in Wiki:
http://wiki.unity3d.com/index.php?title=FramesPerSecond
In GI demo scene the fps was around 1100.
In the fog demo scene the fps was around 720. The terrain was the most responsible for the drop in frame rate.
FPS Test


The next version will jump to 2.0.0 because it will have many changes compared to the current version, the two versions will have a very different appearance from each other. For this reason the current version will continue in the package and will have all the improvements of the new version, but it will keep the visual characteristics it has now. Because depending on the graph style of each game, one of the versions can match better than the other.

So far I managed to reduce almost three times the number of math instructions in the fragment shader and get a much more realistic results than the current version.

  • The moon now is drawn directly into the skybox.
  • And now also implemented the rotation of the sky at night.
  • Added support for HDR.

Below is a simple demonstration of how it’s getting. " P.S. It is still in development. "
https://dl.dropboxusercontent.com/u/29523611/azure[Sky]DevDemo/azure[Sky] Demo1.html

It remains to add:

  • The scintillation of the stars.
  • The shadows on the moon.
  • The clouds.
  • Redo the fog scattering.
  • Maybe put some shooting stars across the sky.
  • Milky Way ?

I also intend to make an optional version of the shader to use in a Skydome, making it possible to write the calculations in the vertex shader to work in ps_2.0. To have more performance and be able to use quietly in mobile devices.

1 Like

* Added scintillation in the stars.
* Added shadow on the moon.
See the demo test:
https://dl.dropboxusercontent.com/u/29523611/azure[Sky]DevDemo/azure[Sky] Demo2.html
PS: The shadow on the moon will be controlled by sliders in the Inspector, where you can define the position, size and opacity, as well as in the first version. I did not add the sliders in the demo because I’m using for testing only.

Now I’m going to work in the clouds. What I’m planning to the clouds is:

I will use pre-rendered textures in a grayscale. In the RGB channels, will save the luminance of the clouds, based on the sun’s position.
Channel r: Will contain the cloud luminance with the rising sun.
Channel g: Will contain the cloud luminance with the sun at noon.
Channel b: Will contain the cloud luminance at sunset.

As time goes on, the shadows of clouds change according to the luminance and gives a more realistic effect. An example of what I’m talking about, is shown just above in the post #6.
Until now I got an excellent result for the clouds in the daytime, and I’m trying to get a harmonious effect in the transition between sunset and nightfall.

Finally, after about three months of trying, I managed to find a way to make an animation in loop for the clouds. If all goes well, the clouds will be animated.

See the GIF:
Panoramic View

Perspective View

2 Likes

Excellent work. How soon can we expect the asset?

I want to do as quickly as possible, the problem is that lack some things that are very time consuming to make. So I will first launch version 1.5 within a few days.

Version 1.5 will be just the 1.0 with the improvements that will be part of version 2.0. But trying to keep the graphic look of the first version.

You can see in the demo below:
https://dl.dropboxusercontent.com/u/29523611/azure[Sky]DevDemo/azure[Sky]%20Demo3.html

  • The equations were rewritten.
  • Night sky rotation was added.
  • The moon is drawn directly into the skybox.
  • HDR support added.
  • Only one draw call. All this is done in a single pass.

Only with changes in the equations, we can see great visual changes. The sunset is one example.
Before

Currently

To release azure[Sky] 1.5 still missing:

  • Redo the fog: It will be easy and fast because the calculations are almost the same as the sky.
  • Redo the Inspector: It’s a little time consuming, because I am rewriting everything in C#, have to respect some development requirements and do a lot of testing to make sure everything is working.
  • Animation in the clouds: It will be a variation of the sky shader, will have a sequence of images creating a loop animation, will be a test prototype to version 2.0.

For version 2.0, left to do the same things, but with much more realistic clouds, which is much more difficult to achieve and time consuming to render. Not to mention that you need to render the cloud once for each color channel.

So I decided to release 1.5 before because the clouds are much simpler to do.

Testing the fog of version 1.5 which will be released soon. The scenario used in the screenshot is the Island Demo.
See the screenshots

Here is the scene in the default settings. The ambient color is dark because the sun is rising.

Now the same settings with the fog applied.

Around noon.

At Night.

Released version 1.5.0!

Improvements:

  • Rotating night sky.
  • Animated clouds. Test for version 2.0
  • Equation improved.
  • New fog.
  • Moon drawn directly into the skybox.

Demo:
https://dl.dropboxusercontent.com/u/29523611/azure[Sky]_v1_5/Fog.html

Asse Store:

This asset looks great! Any ETA on the 2.0 update with the enhanced clouds?

Also, based on the way that you are doing your cloud system, do you think cloud lightning would be possible? (example below)

In post number 22, I explain what I want to improve in the clouds to version 2.0.
Currently the best result I got was this:
See the Image

The clouds will be more realistic and adorned, but the problem is the rendering time. The 1.5.0 version took 25 hours to render, even that clouds this release are very simple. Now imagine how long it will take to render these new clouds, and will be necessary to render the same frame three times, one for each sun position to catch the luminance.

How the new clouds will be more realistic, I’m afraid that with only 60 frames the animation does not get smooth, I think it will need 120 frames, that will double the rendering time and the number of images for editing. This will give me a lot of work to do. But I think if everything works as I imagine, will have a cool result.

The new shader will process the clouds in an additional pass, where I can make use of the texture opacity, improving the visual appearance of the sky, the moon will cross behind the clouds and the clouds will interact with the Sun Shaft image effect.

If is needed to use 120 frames for the animation, will only increase the space of the package in the hd, the performance will remain the same.

The good side of using this method to clouds is that the clouds are more realistic, the movement of the clouds are almost real and has a low cost performance than if it were generated in real time.

The downside, is that it increases the size of the package.

About lightning, at the moment I still can not think of any way to create this effect. Sorry.

If my explanation seemed confused, sorry, my English is bad.

For some reason the exposure slider has no effect in my scene, any ideas?

Make sure HDR is not selected in the Options tab.

This option does not allow the shader computes the tone mapping internally, giving the developer the option of using different tone mapping, such as the image effect “tonemapping” of Unity, located in Component>Image Effects>Color Adjustements>Tonemapping.

The exposure slider is used only in the internal tone mapping of the shader. It will only take effect in the scene, if the HDR option is disabled.

If you work with the HDR option enabled, the correct is to change the exposure directly by the image effect component, which also has this feature. Remembering that when using the tonemapping image effect, for it to work correctly, your camera should also have enabled the HDR option.

That’s the only reason I know that prevents the exposure slider working.

Thank you, I eventually worked out the issue last night. I’m glad I asked as I did not know about the Tonemapping image effect and HDR is worth experimenting with visually. Ok so bare with me here I might be doing something wrong again but I cannot seem to get any stars to appear at night time and no sun spot too. Also at night my terrain still remains very lit, I assume it’s ambient lighting or something - admittedly I need to have another play today and will suss that one I thinks.

Few Feature suggestions:
Scattering Wavelength Adjustments (good for over worldly planets)
Fog Density Time Curves (good for having fog change more dynamically over the day etc )
Fog Color Gradients (can be fun and good for other planets)

Really liking what I see so far, the fog is awesome. Thanks.

I’ve managed to get my get my lighting fixed but noticed something very strange, if I add tonemapping and HDR my reflections and lighting on world objects gets fixed to that point in time the day and night cycle. It took me a long time to figure out this was happening. Is this the correct behaviour, when it gets dark my world objects stay fairly lit and the reflections stay as they started on play? No stars working either, thanks again. It’s almost perfect.

Ok sussed it out, sorry for the running commentary. I needed to setup a reflection probe for reflections to update every frame. Durr :wink:

Just missing stars?

Sorry for the delay

This was supposed to be implemented, I’ll write these things on paper because I forget.

It is a good suggestion

The color of the fog automatically adjusts according to the sky settings.

Strange, this happens in the demo scene included in the package?

  • Make sure the Textures Tab, the fields “Star Field (Cube Map)” and “Star Noise (Cube Map)” is not empty.
  • In the texture import setting of this textures, the “Mapping” option must be: 6 Frames Layout.

Try to create a new scene, delete the default light and drag one of prefab included in the package into the scene, press in the “Options tab” the button “Send material to Sky Skybox”, to apply the material in the sky skybox.

If the problem persists, please send your project or scene by MP for me to figure out what’s going wrong.

Yes the no stars does happen in the demo’s including your examples online when testing on Safari. Is it a Open GL compatibility issue maybe? I’m on OSX. I’ve never seen any stars, even in your product screenshots. No way I can easily send the project, it’s about 20GB but I’m happy to skype and setup a test example.

The cloud shader to version 2.0 is almost ready, just need to render the animation of clouds, it takes a long time. Until now a 20 percent already rendered.

Some images of a same frame of the new cloud system.
Screenshots










Sweet, nice man. I shall look forward to trying this out. I’ve still no luck with the stars strangely. I occassionally see the odd twinkle on my UI cam so am wondering if it’s not working due to a multiple camera setup. Is it dependant on deferred pipeline? Anyway I kind of want to use my own cubemap for the stars as shown below. Can you think of a way to allow this when combined with Azure which I love. Thanks for the updates, can we download yet? :wink:

I need that program you use for clouds, expensive it is.

Well, the problem of the stars was successfully resolved thanks to the help of @Beloudest , have a lot to thank him.

It was just a syntax error when used the “dot” function.

As I have not the opportunity to test the package on operating systems other than Windows, I could not realize my mistake.

I wore a command like this to make the stars appear and disappear.

dot(sunDir.y, float3(0, -1, 0));

Strangely DirectX did not cause error, but in OpenGL is need to write this way.

dot(float3(0, sunDir.y, 0), float3(0, -1, 0));

I will be correcting the problem and update the package and demos as well as possible.

It’s just Apple for you, they like to be awkward at any opportunity! No problem. :slight_smile:

azure[Sky] 2.0 - Submitted to the Asset store

See the first post for more information.

The price will be adjusted to $45. There’s still time to secure the purchase for $40 while is in pending review.