Search Unity

Azure[Sky] - Dynamic Skybox

Discussion in 'Works In Progress' started by DenisLemos, May 1, 2015.

  1. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    375
    When I change my terrain's layer from ground to default performance will back to normal! just wonder why!

    Anyway performance is cool now. Thanks.
     
    Last edited: Jun 3, 2017
  2. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    It's good to know that it works now!

    I think now I know what it can be!

    Is the ground layer not created in the same allocation as the "AzureMoonSphere" and "AzureSkydome" layers? When I set up Azure, I created the layers in the following allocations.
    Layers.jpg

    The layers are not imported together with the package, so you need to create the two layers again and set them to the Skydome, Moon Sphere and MoonCamera which are located inside the prefab. In demonstration scenes and prefabs, the camera that renders the moon texture is configured to render only the "AzureMoonSphere" layer that was allocated in Layer8. See if your "Ground" layer is not also allocated in the same Layer8, otherwise the camera that renders the texture of the moon will render all terrains again. I did it here and the frame rate fell from 900 to just over 60.

    So try to create the two Azure's layers again and define the Skydome with the "AzureSkydome" layer and set the Culling Mask of the MoonCamera to render only the "AzureMoonSphere" layer.
    Also, define the sphere of the moon with the "AzureMoonSphere" layer.

    It is therefore extremely important to read and follow correctly all the steps of the Quick Start Guide of the documentation.
     
    ftejada and Crossway like this.
  3. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    375
    Thanks for help, isn't there a way to change sky color in this new version?
     
  4. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    In this new version, to increase performance the Mie and Rayleigh data is pre-computed using a standard wavelength value. But you can still change the color of the sky by changing the "Mie Color" and "Rayleigh Color" values located on the "Scattering" tab.

    I will soon send an update with the option to control the wavelength or use the pre-computed data. Controlling the color of the sky by changing the wavelength reproduces better results, but at the same time requires a lot of extra physical calculations.
     
    Crossway likes this.
  5. Georacing

    Georacing

    Joined:
    Nov 10, 2016
    Posts:
    4

    Hi !
    I tried this, but it did not correct my problem. Here is a more accurate picture of the artifact.

    I feel that the distortion of the wave is not used by the fog, and it is considered as a plan without modification of the vertex.
    This is the configuration of my shader:

    I tried to insert on my shader the UNITY_TRANSFER_FOG and other flag for apply flog, but it did not correct my problem :/ .
    Would you have a solution?
     
  6. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    Making water draw correctly in the depth buffer is not so simple, especially when the vertices of the plane are modified to simulate the wave balance.

    What happens is that when you change a vertex position by vertex shader, this vertex will continue to draw in the depth buffer based on its original position. Then the water will be considered by the fog as a plane without modifications.

    I still do not know how to do this, but developers of water systems like PlayWay use Command Buffers to make water draw properly to the depth buffer with vertex transformations included.

    Other water systems create their own mesh with the displacement of the waves being applied directly in the mesh and not by the shader. This is more expensive for performance, but makes the vertices correctly draw to the depth buffer even when animated.


    UNITY TRANSFER FOG is only used to apply the standard Unity fog to objects using the shader. This will not work with Azure fog.
     
    Last edited: Jun 7, 2017
    Georacing likes this.
  7. Georacing

    Georacing

    Joined:
    Nov 10, 2016
    Posts:
    4
    Thank you for your help ! Continu to improve your asset, it's a great wordk :D
     
  8. AurimasBlazulionis

    AurimasBlazulionis

    Joined:
    Aug 13, 2013
    Posts:
    209
    Hello, I have a problem with sun disappearing from the skybox when it reaches the horizon. Even if the sunlight is kept enabled by removing the multiplication by SunRuse, the sun disappears from the skybox. I am using realistic/elevation mode with a vertex skydome.
     
  9. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    I did not quite understand your question. When you say the sun, are you referring to the solar disk or the Mie brightness?

    I suppose you are referring to the solar disk and the multiplier Azure_SunRise quoted some posts ago. Well, the Azure_SunRise multiplier quoted at postage number #449 only influences the intensity of directional light of the sun and the moon and nothing more. And in the latest update v4.0.1 you no longer need to remove this multiplier in the script, because you now have the option in the "OPTIONS" tab to use or not the automatic control of the directional light intensity of the sun and the moon.
    OptionsTab.png

    The solar disk is programmed in the shader to automatically disappear when it crosses below the horizon line, but depending on the sky settings it may disappear when still high in the sky or even not appear when covered by the brightness of Mie. Notice in the Aerial Perspective example scene that every day has a different configuration and more precisely on Wednesday the solar disk is more visible in the sky, especially on the horizon.

    I removed the terrain to get better view.
    SunDisk1.jpg
    Some of the properties that influence whether the solar disk will be visible is Mie and Rayleigh located on the SCATTERING tab.

    In the image below Mie is set to zero and Rayleigh is given a smaller value. Consequently the solar disk is more visible when near the horizon line.
    SunDisk2.jpg

    In the next image, Rayleigh receives a larger value and the solar disk begins to disappear in a position above the horizon because it has more particles in the atmosphere that hide it when it comes near the horizon.
    SunDisk3.jpg

    And finally, when Mie receives a higher value, the sun's brightness scattered in the atmosphere ends up hiding the solar disk.

    SunDisk4.jpg

    Rayleigh also defines the extinction of stars. The higher Rayleigh's value at night, the fewer stars will appear near the horizon.

    Let me know if you have a different question than the answer I submitted.
     
  10. AurimasBlazulionis

    AurimasBlazulionis

    Joined:
    Aug 13, 2013
    Posts:
    209
    Ok, not a problem anymore. I had Light Speed property set too low (5). As you can see from the screenshots, the sun would just pop in from a small change in time. Thanks for the info.
    1497612254.png
    1497612258.png
     
    Last edited: Jun 16, 2017
  11. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    151
    @_7stars first of all congratulations for your asset. I've bought it today and it's a pleasure playing with it.

    At the moment, the first thing the I'd like to ask you is what parameters I've to modify to have more contrast light/shadows during the daytime, in particular during the midday.
    Another question is about the color of the shadow. I thinl that I should modify the ambient gradient in the lighting section, but doing this I haven't got the desidered eye-looking.

    Could you help me?
    Thanks in advance for you support.
     
  12. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    Hi!
    First, thank you for supporting Azure!

    I am not an expert in lighting, but getting good lighting in the scene will depend on several factors.

    The lighting you do as you normally would in standard Unity mode. The difference is that in Azure the colors are extended to gradients and the sliders are extended to curves, giving you the option to set different values at any time of the day.

    All parameters of the "Lighting" tab are important, but if you want more contrast between light and shadows, you can try to modify the intensity and color of the directional light of the sun and set a darker ambient color.

    Below is an image of the scene at noon with the default values.
    Lighting1.jpg


    In the image below I just set a darker ambient color to the noon.
    Lighting2.jpg

    And lastly, I increased the intensity of the sun a little at 12h.
    Lighting3b.jpg

    Also, do not forget the post-processing effects that are essential to enhance the look of the scene. I recommend Unity's Post Processing Stack or Scion, with these plugins it is possible to get visual quality AAA and they are better to setting contrast and color correction.

    The image below has the same lighting values shown in the first image. The difference is only in the Color Grading setting.
    Lighting4.jpg


    To change the color of the shadows, I think it is only possible to do this by changing the ambient color. Remember to make the changes only at the time of day you intend, to avoid unconfiguring the rest of the day's cycle.
     
    ftejada likes this.
  13. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    151
    Thank you very much.

    I'll check your suggestions.
     
  14. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    532
    Hi @_7stars

    I tell you a problem that is happening to me with the water from PlayWay water system.

    I think it's because of Azure because with a normal directionalLight and the default Unity SkyBox does not pass the error.

    With Azure are generating very rare shadows in the Water. I leave video for you to see...


    Do you know why this error is happening and how to solve it?

    Unity Version 5.6.1p2 and the last beta version of PlayWay Water.

    regards
     
  15. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    532
    I already found out because that's the problem. Azure does not create a "Reflection Probe" ?? Believe that Azure 3x version if generated

    That is why when I start the cycle of the day at night, at dawn and during all the daylight, these strange shadows remain ... because I do not update the reflection ....

    How can I make Azure update my reflection probe every time I want?
    That was with Azure 3x. It was a very good option that should re-include


    regards
     
  16. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    The use of GI dramatically decreases performance, I received many emails with complaints from users saying that Azure had drastically reduced the performance of their games. And when we investigated the problem to find out the cause, we discovered that the reason for the loss of performance was because users always left GI active and blamed Azure for it. Some users even did bad reviews of the package, and the asset was not even the responsible for the problem.

    The control of GI directly by the Azure Inspector was to facilitate the development and customization of the project, but after so many complaints we considered that this feature was actually causing confusion and problems to the user of the asset, so we decided to remove this option.

    Now the user is who needs to add the reflection probe in the scene if he wants to use the GI, but this is very simple to do. With just a few clicks of the mouse the reflection probe will be working on the scene without problems, the difference is that the configuration you did by the Azure Inspector, now has to be done directly by the Inspector of the reflection probe.

    The only drawback is that Azure v3 gave you the option of updating the reflections via script with a predetermined time interval, and this option was very good for performance, contrary to what some users thought and complained about the package:).

    But this is also very simple to achieve, you just need to use a little script. This link has a very simple example of how to do it.
    https://www.reddit.com/r/Unity3D/comments/3ihs8b/a_generic_reflectionproberefreshtimer_script_for/

    To update the reflection probe, you can simply set in the reflection probe inspector the Refresh Mode to Every Frame, which the reflection probe will automatically update in each frame. But if you want to gain some performance, it is advisable to set the Refresh Mode to Via Scripting and use the script of the link to update the reflection probe in larger time intervals because in many cases you do not need to update the reflection probe at all frames, but only when the change in lighting is perceptible.
     
    ftejada likes this.
  17. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    532
    Hi

    To that I meant, that the option of using Azure could be set if you wanted reflection probe and if you wanted updates in each frame or every time, it was very good and very versatile. Since it allowed you to have everything within your asset.

    It is a pity that you have removed it. Could not have this option and that by default was disabled in Azure. So people who did not know, would not perform badly entry. And even put a warning on the inspector when activating the option of reflection probe in Azure.


    I'm going to look at the link you sent me. Thank you very much for the explanation and for the link.

    Anyway one question Can you tell me in which part of the Azure 3x code is what creates the reflection probe and the configuration options for its update (Awake, per frame ....)

    I would like to adapt that to Azure 4.x. I think it's better to have it encapsulated with azure

    regards
     
  18. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    Ok!

    I'll bring this feature back in the next update I'm working on.
     
    ftejada likes this.
  19. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    (WIP)
    New Optional Sky Model Added!

    new Precomputed Atmospheric Scattering

    After a long time, I finally managed to create the pre-computed tables properly.

    Previously I was using RenderTextures, but this only worked inside the Editor, because after building the project, for some reason the RenderTextures were being destroyed or cleared from memory.

    Then I tried to compute the tables using only Texture2D, but in this way the process was incomplete and it took 320 Textures2D (more than 80MB).

    Now the precompution process of the Inscatter table is complete and everything works in a single Texture3D with 32 layers and only 8MB as proposed. It should be noted that it is working in DirectX9 and DirectX11 even after building the project.

    You will have an option on the Scattering tab where you can switch between the default sky model and the new precomputed model.

    (The test terrain is from Horizon[ON])
    NewSkyModel1.jpg



    This new sky model is extremely more realistic and physically correct than the default sky model currently in Azure. The earth's shadow is realistically projected into the atmosphere and the viewer's altitude variation affects how we see the sky.
    NewSkyModel2.jpg

    The basis of the new sky model is already implemented, but there are still other things to add such as: Solar disk, moon, stars, etc...

    And this will take a little time for me to do and I'll need to duplicate some properties in the Inspector, because some features of the sky will need to have two different settings, one for when the viewer is at low altitude and one for when the viewer is in High attitude. An example are the stars that may not be visible when the viewing point is low in the sky, but become visible when the viewer is at high altitude.
    Thank you very much if you have read this far!
     
  20. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    532
    Very thankful

    For when will be the update of the new sky model?
     
  21. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    The new sky model will be in beta in the next update!

    I can not set a date for the next update because it is impossible to predict possible problems during development.
     
    ftejada likes this.
  22. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    301
    @_7stars
    I have a few questions;
    1. what is the difference between azure and azure light?
    2. is there a difference in performance? and is this difference due to different implementations or is it just because of different feature sets?
    3. does azure work in vr?
    4. do you have plans to add weather?
     
  23. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    Hi!
    The implementation is the same in both versions, the difference in performance may occur dependent on the active features, some features require more processing than others. It is possible that Azure[Sky]Lite performs a little better because it is a cleaner version with fewer features and a smaller number of variants and conditions.

    The main differences are:

    Azure[Sky] Lite
    Days of the Week: Just one day to customize.
    Time Mode: Simple mode only.
    Curve Mode: Based on Timeline.
    Fog Mode: Realistic only.
    Cloud Mode: Empty Sky and Static Clouds.
    Sky Model: Default sky model based on Preetham paper.
    Output System: Yes.
    Weather System: No.

    Azure[Sky] Dynamic Skybox
    Days of the Week: Seven different days to customize.
    Time Mode: Simple Mode and Advanced Mode(based on date, time and geographical location).
    Curve Mode: Based on Timeline or Sun/Moon Elevation.
    Fog Mode: Realistic and Projected.
    Cloud Mode: Empty Sky, Static Clouds and Dynamic Clouds.
    Sky Model: Default sky model based on Preetham paper.
    Output System: Yes.
    Weather System: No.

    Azure[Sky] Dynamic Skybox Road Map:
    * New sky model much more realistic with variation of altitude.
    * Volumetric Fog Scattering.
    * Volumetric Clouds.
    * Weather System.
    Some of these features are already being implemented, others are still under study.

    With the implementation of the new sky model, Azure[Sky] Dynamic Skybox will be practically two sky system in one.

    [Edited]
    Many customers say Azure works seamlessly in VR, but I do not have a VR device for testing, so I can not give proper support on that platform. But from what I've been told, Azure works on VR without problems until then!
     
    Last edited: Jun 30, 2017
    ksam2 likes this.
  24. n0rb

    n0rb

    Joined:
    Feb 22, 2013
    Posts:
    14
    Hello @_7stars,

    I purchased your asset Azure Sky Dynamic Skybox while it was still v3 and everything worked fine.
    I see you recently upgraded to the completely rewritten v4.

    However when I try to download and import the package within the Unity Asset Store tab I only seem to receive v3:


    What can I do to receive the newest version?

    Regards

    Edit: Sorry! I just saw I need to use Unity 5.6 to use v4 ...
     
    DenisLemos likes this.
  25. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    441
    hi @_7stars
    congrats for your asset!
    I have a question: how can I obtain a cloudy sky using the dynamic clouds? seems to be cool, but are light clouds...
    thanks in advance (waiting the weather management!)
     
  26. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    The current dynamic clouds were made to simulate thin clouds of low density, although it has the option to control the density, this type of cloud will not fulfill the task of simulating completely cloudy skies. The feature to make overcast sky will come along with the weather control feature, because these two features need each other to function properly.

    But still, with the current cloud type you can achieve a similar effect as shown in the image below. It is not ideal, but it is what you can do with this type of cloud.

    Note that the gradients are customized based on the curve mode set to "Elevation".
    AzureDynamicCloud.jpg
     
  27. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,588
    I understand version 4 and up is a completely rewritten system. How is performance compared to older version 3?

    [EDIT]
    Also, is there an upgrade price if I start with the Azure Lite version and later want to step up to the full package?
     
    Last edited: Jul 6, 2017
  28. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    441
    thanks @_7stars for your reply.. is there any ETA for the weather system?

    another question, how can I set to view the moon with the texture and not just a bloom light? thanks
     
  29. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    Hi magique!

    I never had time to do the tests with all the necessary thoroughness comparing the two versions. My tests were more generic.

    But I would not even need to compare the two versions to know that Azure 4 performs better than the old version, just by having drastically reduced the number of calculations on the shaders already had a great improvement in performance. In fact, depending on the configuration in the Azure Inspector, some shader variations run on Shader Model 2.0.

    Another great feature to improve performance is the ability to switch between pixel shader and vertex shader and also switch between skybox or skydome.

    Depending on the Azure setup, you will get a different performance. For example, if you use a skydome with 20,000 polygons and set the shader by vertices. The shader calculations will be calculated once for each vertex (20,000 times per frame).

    But if you set the shader per pixel, the calculations in the shader will be calculated once for each pixel. If you are at a resolution of 1920x1080, the calculations will be calculated 2,073,600 times per frame, which is a value immensely larger than the 20,000 times per frame when using a skydome with the vertex shader.

    I've now done a quick test just to demonstrate the difference in frames per second between the new and old versions. Comparing just fps is not the best way, but you can already have a good idea of the difference in performance in the new version of Azure.

    My Setup:
    • Windows 7
    • Intel Core i7-4790 CPU @ 3.60GHz x8
    • RAM 8GB
    • Nvidia GeForce GTX 760 2GB

    Azure[Sky] v4.0.1

    Simple Setup:

    • Time Mode: Simple.
    • Simple Moon Texture 2D.
    • No Clouds.
    • Sky Mode: Skydome.
    • Shader Mode: Vertex.
    With this setup, Azure ran between 1700 - 1900 frames per second in standalone build. With the fog scattering effect turned on, the performance was around 1550 fps.

    Advanced Setup:
    • Time Mode: Realistic.
    • Moon RenderTexture (512x512).
    • Dynamic Clouds.
    • Sky Mode: Skybox.
    • Shader Mode: Pixel.
    With this setup, Azure ran around 1230 frames per second in standalone build. With the fog scattering effect turned on, the performance was around 970 fps.



    Azure[Sky] v3
    Azure v3 has fewer features and has no option to improve performance, this old version only runs as skybox and the shader is totally per pixel.

    Azure v3 ran between 700 - 750 frames per second in standalone build. With the fog scattering effect turned on, the performance was around 580 fps.

    As you can see, even using the more advanced features the new version of Azure has a much higher performance compared to the old version. And I believe Azure[Sky] Lite might perform a bit better because it has a considerably smaller number of variables and conditionals.



    PS: Just to remember that I used Unity 5.6.0f3 and the FPSCounter.cs script that comes along with the Unity Standard Assets.



    No! You must purchase both versions separately.
     
  30. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    Still no deadline to add these new features!

    I did not quite understand your question, have you tried changing the values of the properties "Shine Emission" and "Sky Bright" in the NIGHT tab? With these two properties you can decrease or increase the brightness of the moon by making the texture of the moon appear or disappear behind the brightness.

    The Aerial Perspective sample scene has different customizations on each day of the week with different moon shines, you can base it there!

    If the texture of the moon does not appear, it may not have any texture attached in the Texture property in the "Moon Area" on the NIGHT tab. In this property you can attach a simple 2D texture of the moon or a RenderTexture, check in the Textures folder, there has a RenderTexture and a simple 2D texture for you to use.
     
  31. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,588
    OK, so I'm trying out Azure Dynamic Sky 4.0.1 and I see one potential problem that you might want to change in the future. Unlike other sky systems I've used, you have a separate light for moon and sun. I suppose this is because you can sometimes see the moon in the daytime, but it's light isn't really a contributor at that point so it could be ignored. The reason this is an issue is that I have another asset SE Screen-Space Shadows, which needs a reference to the directional light. So I can only assign either the sun or the moon from Azure sky. When it's night and am getting only moonlight then SE Screen-Space Shadows won't work anymore. I'm wondering if there is some easy way to know from Azure Sky which light is the dominant light so I can do a switch from sun to moon and vice versa as needed.
     
  32. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    To get a complete and correct day and night cycle, it is necessary to have two directional lights, one for the sun and one for the moon, otherwise it would not be possible to obtain a precise illumination, especially in the transition from day to night or vice verse.

    As you mentioned there are times when the moon appears at the daytime, but in this case the directional light of the moon will not illuminate the scene and this only has chance to happen in realistic time mode, in simple time mode the moon stays always in the opposite side of the sun.

    Only the directional light of the sun will illuminate the scene at the daytime, the intensity of the directional light of the moon will automatically be set to zero and the "Light" component will be deactivated. This prevents having two directional lights activated in the scene at same time.

    You can test this in the Aerial Perspective sample scene by changing the time mode to Realistic. Changing the slider that controls the time you can see that the intensity of the directional lights changes, note that when the moon appears at the daytime, the intensity of the directional light of the moon becomes zero automatically.

    Coming back to your question, it is not possible to make the scene lighting work properly only with one directional light. To solve your problem you can simply compare the intensity value of each directional light to decide which one is going to be the predominant light.

    Azure disables the "Light" component of the directional light automatically when the intensity is set to zero. Then you can simply check if the "Light" component of the directional light of the sun is active to know if it is day or night. So if you know if it's daytime or if it's nighttime, it's easy to know which is the predominant light.


    I don't know how your screen space shadow system works. So I commented the line of code that defines the predominant directional light to your plugin, as I do not know which variables or code to use.
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class GetCurrentLight : MonoBehaviour
    6. {
    7.     public GameObject AzureSunDirectionalLight;
    8.     public GameObject AzureMoonDirectionalLight;
    9.  
    10.     private Light sunLightComponent;
    11.  
    12.     // Use this for initialization
    13.     void Start ()
    14.     {
    15.         sunLightComponent = AzureSunDirectionalLight.GetComponent<Light> ();
    16.     }
    17.    
    18.     // Update is called once per frame
    19.     void Update ()
    20.     {
    21.         if (sunLightComponent.enabled)
    22.         {
    23.             Debug.Log ("The sun directional light is the predominant light.");
    24.             //SE_Screen_Space_Shadows.DirectionalLight = AzureSunDirectionalLight;
    25.         }
    26.         else
    27.             {
    28.                 Debug.Log ("The moon directional light is the predominant light.");
    29.                 //SE_Screen_Space_Shadows.DirectionalLight = AzureMoonDirectionalLight;
    30.             }
    31.     }
    32. }
     
    warezzko likes this.
  33. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,588
    Thanks for the help. Regarding the following:

    So, in this mode then there really is only one of the 2 lights active at a time? Or will there still be some crossover as the sun rises and moon sets?
     
  34. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    It depends on what you set in the "Automatic Sun Intensity" and "Automatic Moon Intensity" properties of the OPTIONS tab.

    If enabled, these options cause the intensity of the directional lights to become zero automatically when crossing below the horizon line. This way you do not need to worry about changing the intensity to zero in the curve timeline, you can leave a linear value in the curve that when the directional light crosses above the horizon line, will transition to the value defined in curve.

    The speed of the transition will depend on the value defined in Light Speed on the SCATTERING tab. If Light Speed is zero, the transition will be instantaneous and it is likely that when the sun activates, the moon will deactivate at the same instant since it is exactly on the opposite side of the sun.

    If Light Speed is set to 100, the transition will be smooth and the intensity of the directional light will decrease smoothly as it approaches the horizon, then the two directional lights will be activated at the same time for a short period during the day-to-night transition or vice versa.

    If the options are turned off then you are who will set manually in the animation curve the exact moment at which the intensity of each directional light will become zero. You can change the curve mode to Timeline that is easier to understand and observe on the LIGHTING tab how the directional light intensity of the sun and moon are set manually.

    If you set the intensity curves manually, you will have full control over the directional lights and you will decide which is the best time to turn them on or off. Note that to disable a directional light, simply set the intensity value to zero.
     
    Crossway and magique like this.
  35. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    375
    Does it works correctly with SEGI? I mentioned the sun doesn't work with Sunshaft and you placed a sunshaft caster for this but what about asset like SEGI that needs correct sun's position?
    When Sun doesn't work correctly with Sun shaft I thought that may be same with assets that needs the correct position of the sun.
     
  36. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    Sorry for the delay in answering the topics, I've been away for a few days.

    The directional lights only depend on the direction to illuminate the scene, the position is irrelevant, so I do not know how SEGI works and why it needs the directional light position.

    Maybe it's possible to send the directional light direction and the position of the Sun Shafts Caster by code to SEGI!?

    But I suspect this is the least of the problems, reading SEGI's description in the Asset Store is reporting that SEGI is compatible with Unity 5.0. Up to 5.5. To use Azure 4.0.1 you must have Unity 5.6.0f3 or higher, otherwise you will only have access to Azure 3.0.4.
     
    Crossway likes this.
  37. tachyon-particle

    tachyon-particle

    Joined:
    Jan 5, 2016
    Posts:
    59
    Hi,

    On Unity 2017.1.0p1, I just finished migrating from Azure[Sky] v3.0.4 to Azure[Sky] v4.0.1

    Wow! The new Azure[Sky] 4 looks so amazing! The sky, colors, lights, etc. all look so beautiful on Unity 2017

    And yes, it runs really smooth and fast.

    It did take a chunk of time to migrate from v3 to v4, since there are many new features in v4, as to make sure everything looks smooth and consistent for various time of day, environment, etc.

    I am excited to seeing more greatness for Azure[Sky] 4 in the forthcoming future and beyond!

    Thank you
     
    DenisLemos likes this.
  38. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    Thanks for the feedback!

    It is very gratifying for me to know that Azure is being useful and that users are happy with the tool!
     
    tachyon-particle likes this.
  39. gomesde

    gomesde

    Joined:
    Feb 20, 2017
    Posts:
    2
    @_7stars

    Would it be possible to simulate the upcoming 2017 solar eclipse with azure[Sky]?
    What would be needed to achieve that?

    Appreciated,
    Alex.
     
  40. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    Hi Alex!

    Unfortunately eclipse is not supported in Azure.:(
     
  41. gomesde

    gomesde

    Joined:
    Feb 20, 2017
    Posts:
    2
    Hi, _7stars!

    That's really unfortunate. We were planning on a simulation to present at Clemson University (South Carolina) in the coming weeks and we were really excited about the prospect of speeding up the development process.

    By the way, I believe you are a fellow Brazilian, I'm from São Paulo, current living and working on my PhD at Clemson, SC.

    Appreciated,
    Alexandre Siqueira.
     
  42. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    375
    Why the MoonSphere is placed on camera position? that caused a bug for me when I was using VFog, and that was hard to figure out it's caused because of MoonSphere object around camera.

    Also when I move fast I can see moon sometimes!
     
  43. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    The Azure prefab must always be in the position of the active camera to prevent the actual position of the sun and moon from being out of sync with the position they are drawn in the sky, this is even more important if you are using skydome. You can disable the "Follow Active Main Camera" in the "OPTIONS" tab if you want to manually set the prefab position.

    The MoonSphere must be centered with the directional light of the sun so that the phases of the moon work correctly, so the sphere is part of the prefab and will also be in the same position of the camera.

    This is why you need to create "layers" to set the moon and skydome as specified in the documentation. If you created the Layer AzureMoonSphere and set it to MoonSphere, then you need to set in the Culling Mask of all your cameras to not render that layer so that the moon's sphere does not appear in the scene during the gameplay. In this way the sphere of the moon should no longer interfere with the view of your camera and the effects applied to it.

    The only camera that needs to render the MoonSphere is the MoonCamera which is together in the prefab, this camera is used to create the RenderTexture of the moon to be later draws in the sky.
     
    Crossway likes this.
  44. holyfot

    holyfot

    Joined:
    Dec 16, 2016
    Posts:
    5
    The procedural clouds in version 4 seem really stretched out and pixelated, no matter how I set the density. Version 3's procedural clouds were very dense and high resolution.

    Did the skybox get bigger in version 4? How do we get this fixed?
     

    Attached Files:

  45. Trassan

    Trassan

    Joined:
    Aug 10, 2013
    Posts:
    4
    Hello _7stars!

    Me and my coworkers are really enjoying this asset. However we have stumbled upon a problem when using it together with PlaywayWater in combination with your FogScattering scripts. When placing the camera close to the water the fog seems to render through the waves making the camera see the horizon at all times. I downloaded your demo with playway + azuresky and the problem does not seem to be in that version. I'm assuming there is a way to fix this since the demo works fine.

    I've submitted a picture of what it looks like when using the fog script
     

    Attached Files:

  46. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    Sorry for the delay, I did not receive the notifications!

    Have you tried to do what I told you by email? As I had already answered, this should be related to the resolution of the texture of procedural cloud. Here, with the texture set to the maximum size of 4096px and the compression in High Quality, no pixelation can be observed.

    Usually applying the effects of antialiasing and bloom helps remove the pixelated of the image.

    I do not remember doing any modification in the coding of the clouds. If you think the clouds are too stretched you can try to select the sky material and change the Cloud Altitude slider in the Inspector.




    Hi!

    Yes, I already know this problem with PlayWay. This also started to happen to me in the new versions of PlayWay, the demo you tested was using an older version of PlayWay. I fixed this problem by changing the project settings to DirectX9, but now neither does it work anymore.

    The first version of PlayWay worked without any problems in DirecX9 and DirectX11, after some updates started this same problem, but it was possible to fix by changing the project to DirecX9. But in the current version of PlayWay everything is broken, I can not make the fog work, not even the Unity GlobalFog. It seems that PlayWay is no longer drawing for the depth buffer.

    PlayWay uses Command Buffers to make water draw its position in the depth buffer.

    I think this happens on some systems only, not sure if it happens to everyone. I also do not know if it's a problem with PlayWay or the latest versions of Unity, since other assets that use Command Buffers are also broken on my system.

    You can try switching to DirecX9 and see if the problem is solved, or try searching in Google or contacting the PlayWay developer to get access to the first version of PlayWay, as I remember that this version worked without problems for me.
     
  47. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    I downloaded the latest version of PlayWay 1.1.7 and just tested. Now the fog does not work on DirecX9 and in the DirectX11 the same problem occurs again with fog when the camera is near the surface of the water. I've found that if you disable the Blend Edges and Refraction options, PlayWay draws back correctly in the depth buffer and the Azure fog returns to work in DirectX9 and DirecX11 without any problem.

    If either of these two options is enabled, it's like preventing PlayWay from drawing correctly in the depth buffer. The problem is that I think these two options are important for the realistic operation of PlayWay.

    PlayWay.jpg
     
  48. RPowers

    RPowers

    Joined:
    May 14, 2015
    Posts:
    93
    Hi. This AzureSky package includes a few png files for the Texture2D setting for 2D Static Clouds, such as "Fluffy Cumulus.png". Can you point me to where I can get more of these, like another asset I can buy? Do any skybox png files work here? Thanks!

    Btw everything looks fantastic in VR :) Nice job
     
  49. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    502
    Hi!

    To create a texture of 2D static cloud you need to follow a few simple steps.

    1. The texture has to be in panoramic mode.
    2. The Red channel of the texture should contain the gray scale of the cloud luminance.
    3. The Green channel of the texture is a black screen because it is not used.
    4. The Blue channel of the texture should contain the alpha mask of the cloud.

    If you have Terragen or Vue it is very easy to make the texture, I recommend Vue because it is much simpler to use and has a huge diversity of clouds ready to use. It is also possible to use Photoshop, but it will become a very difficult and time-consuming task to do.

    When you render the texture in panoramic mode, you should get something like this texture that I rendered with Vue.
    (Only the Red channel of this texture will be used in the final texture.)
    CloudTutorialOutput.jpg
    In the rendering output you can get the cloud mask, both renderers (Terragen/Vue) come with this option. The mask of the clouds is essential so that Azure only applies in the skybox the region of the texture that has cloud.
    CloudTutorialMaskOutput.jpg
    Finally, just open the rendered texture in Photoshop or Gimp and follow the bellow steps.
    1. Keep the Red channel unchanged.
    2. Paint the entire Green channel in black as it will not be used.
    3. Copy the cloud mask inside the Blue channel.
    4. Save the texture in .png and import it into Unity.
    5. Have fun.
    Here is an image showing how to mount the final texture.
    Result.jpg

    And now an image showing the texture working with Azure.
    Result in Unity.jpg

    I'll attach the texture below for you to download if you want to use it, I rendered the texture with the resolution of 2048x1024 only, and it still took a few hours to render because my PC is experiencing performance issues.
    CloudTutorial.png
     
    Last edited: Jun 16, 2018
    glenneroo, RPowers and rasto61 like this.
  50. RPowers

    RPowers

    Joined:
    May 14, 2015
    Posts:
    93
    Ok thanks a lot for the detailed response! That's neat stuff. Looks fun to mess around with.