Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Graphics Azure[Sky] - Dynamic Skybox

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

  1. unity_2CHEtaLts2v9Uw

    unity_2CHEtaLts2v9Uw

    Joined:
    Mar 30, 2020
    Posts:
    1
    Hi There! Does Azure Sky support stereo rendering? Like for VR?

    Thanks!
     
  2. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    To automatically override a variable just by typing the component name and the target variable name in the settings of each override property from the "Override Properties" list of the "AzureWeatherProfile" component, the AzureWeatherController component uses the FieldInfo.SetValue() and PropertyInfo.SetValue() methods from System.Reflection.

    And it is these 2 methods that are generating GC. I think this has no solution because these methods are from the .NET API.

    An alternative is not to use this feature, so instead of filling each override property with the name of the component and the name of the target variable, leave the configuration of each override property in the list empty and use a simple script that will take the output value of each override property and send it to the target variable using the methods:
    GetOverrideFloatOutput()
    GetOverrideColorOutput()

    So, leave all override properties empty.
    OverridePropertiesList.jpg
    And add this script to the prefab.
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.AzureSky;
    3.  
    4. public class AzureOverridePropertiesManually : MonoBehaviour
    5. {
    6.     [Header("Target Components")]
    7.     public AzureWeatherController weatherController;
    8.     public AzureSkyRenderController skyRenderController;
    9.     public AzureEnvironmentController environmentController;
    10.     public AzureEffectsController effectsController;
    11.     public Light directionalLight;
    12.  
    13.  
    14.     // Take the output value from the override properties list and manually send it to the targets
    15.     private void LateUpdate()
    16.     {
    17.         skyRenderController.molecularDensity = weatherController.GetOverrideFloatOutput(0, 5.09f);
    18.         skyRenderController.rayleigh = weatherController.GetOverrideFloatOutput(1, 10f);
    19.         skyRenderController.mie = weatherController.GetOverrideFloatOutput(2, 10f);
    20.         skyRenderController.rayleighColor = weatherController.GetOverrideColorOutput(3);
    21.         skyRenderController.mieColor = weatherController.GetOverrideColorOutput(4);
    22.         skyRenderController.starsIntensity = weatherController.GetOverrideFloatOutput(5);
    23.         skyRenderController.milkyWayIntensity = weatherController.GetOverrideFloatOutput(6);
    24.         skyRenderController.globalFogDistance = weatherController.GetOverrideFloatOutput(7, 5500f);
    25.         skyRenderController.globalFogSmoothStep = weatherController.GetOverrideFloatOutput(8);
    26.         skyRenderController.globalFogDensity = weatherController.GetOverrideFloatOutput(9);
    27.         skyRenderController.heightFogDistance = weatherController.GetOverrideFloatOutput(10, 200f);
    28.         skyRenderController.heightFogSmoothStep = weatherController.GetOverrideFloatOutput(11);
    29.         skyRenderController.heightFogDensity = weatherController.GetOverrideFloatOutput(12);
    30.         skyRenderController.dynamicCloudsAltitude = weatherController.GetOverrideFloatOutput(13, 15f);
    31.         skyRenderController.dynamicCloudsDirection = weatherController.GetOverrideFloatOutput(14);
    32.         skyRenderController.dynamicCloudsSpeed = weatherController.GetOverrideFloatOutput(15);
    33.         skyRenderController.dynamicCloudsDensity = weatherController.GetOverrideFloatOutput(16);
    34.         skyRenderController.dynamicCloudsColor1 = weatherController.GetOverrideColorOutput(17);
    35.         skyRenderController.dynamicCloudsColor2 = weatherController.GetOverrideColorOutput(18);
    36.         directionalLight.intensity = weatherController.GetOverrideFloatOutput(19, 8f);
    37.         directionalLight.color = weatherController.GetOverrideColorOutput(20);
    38.         environmentController.environmentIntensity = weatherController.GetOverrideFloatOutput(21, 8f);
    39.         environmentController.environmentAmbientColor = weatherController.GetOverrideColorOutput(22);
    40.         environmentController.environmentEquatorColor = weatherController.GetOverrideColorOutput(23);
    41.         environmentController.environmentGroundColor = weatherController.GetOverrideColorOutput(24);
    42.         effectsController.lightRainIntensity = weatherController.GetOverrideFloatOutput(25);
    43.         effectsController.mediumRainIntensity = weatherController.GetOverrideFloatOutput(26);
    44.         effectsController.heavyRainIntensity = weatherController.GetOverrideFloatOutput(27);
    45.         effectsController.snowIntensity = weatherController.GetOverrideFloatOutput(28);
    46.         effectsController.rainColor = weatherController.GetOverrideColorOutput(29);
    47.         effectsController.snowColor = weatherController.GetOverrideColorOutput(30);
    48.         effectsController.lightRainSoundFx = weatherController.GetOverrideFloatOutput(31);
    49.         effectsController.mediumRainSoundFx = weatherController.GetOverrideFloatOutput(32);
    50.         effectsController.heavyRainSoundFx = weatherController.GetOverrideFloatOutput(33);
    51.         effectsController.lightWindSoundFx = weatherController.GetOverrideFloatOutput(34);
    52.         effectsController.mediumWindSoundFx = weatherController.GetOverrideFloatOutput(35);
    53.         effectsController.heavyWindSoundFx = weatherController.GetOverrideFloatOutput(36);
    54.         effectsController.windSpeed = weatherController.GetOverrideFloatOutput(37);
    55.         effectsController.windDirection = weatherController.GetOverrideFloatOutput(38);
    56.         skyRenderController.sunTextureIntensity = weatherController.GetOverrideFloatOutput(39);
    57.         skyRenderController.moonTextureIntensity = weatherController.GetOverrideFloatOutput(40);
    58.         directionalLight.shadowStrength = weatherController.GetOverrideFloatOutput(41);
    59.         skyRenderController.staticCloudScattering = weatherController.GetOverrideFloatOutput(42, 2f);
    60.         skyRenderController.staticCloudColor = weatherController.GetOverrideColorOutput(43);
    61.     }
    62. }
    I just sent a new update to the Asset Store (v7.0.2), and in this new version there is a demo scene with a prefab already set up that way ready to use.
     
    Deleted User likes this.
  3. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi,

    I don't have a VR device for testing, so I think the asset doesn't currently support it.

    When I have more time available, I want to follow the Unity documentation to try to implement support for Single Pass Instanced rendering which is better than Single Pass Stereo rendering, I'll let you know if I can implement this feature.
     
  4. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @DenisLemos Is there any way to get my sky to be darker and more black? No matter what I've tried, I always get a very bright bluish night sky.

    I figured it out. I found the Scattering properties and was able to change some sliders to fix it.
     

    Attached Files:

    Last edited: Mar 3, 2021
  5. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Azure[Sky] Dynamic Skybox v7.0.2 Released!
    • Adjusted the configuration of the directional light intensity and environment intensity curves to 0-1.
    • New Demo Scene (Override Properties By Scripting).
    • Added EvaluateTimeOfDay() method to the AzureWeatherController.cs.
    • Added EvaluateSunElevation() method to the AzureWeatherController.cs.
    • Added EvaluateMoonElevation() method to the AzureWeatherController.cs.
    • Added GetGlobalWeatherIndex() method to the AzureWeatherController.cs.
    • Added the index number before each override property to make it easier in case you need to use the methods:
      GetOverrideFloatOutput() and GetOverrideColorOutput()
      IndexNumber.jpg
    • If the AzureWeatherController component does not find the AzureTimeController attached to the game object, the Inspector will show 3 sliders used by the component to evaluate the curves and gradients of the weather profiles. Now you can use only the weather controller with your own time of day solution and you just need to send to the weather controller the "time of day", "sun elevation" and "moon elevation" by calling the mothods:
      EvaluateTimeOfDay(), EvaluateSunElevation() and EvaluateMoonElevation()
      WEatherController.jpg
      Now, all Azure components should work independently.


    In case you don't know, you can add custom properties to the profiles and control that sliders using the "Override Property" feature.

    Compared to the previous version, you will notice that the profiles are missing a lot of properties, this is because it is now possible to choose which property you want to include to the profiles or not. In this way, you include to the profiles only those properties that you need to integrate with the weather system or if you need to set different values at different times of the day.

    Now the asset is more modular, for example, if you do not need climate change or dynamic time of day. You can use only the component "AzureSkyRenderController" and rotate the directional light manually and everything will work independently of the other components. So if you just need the skybox and fog at a static time of day, you don't need to use the other components and waste performance.
     
    Deleted User and magique like this.
  6. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    This is great news. I am actually working on a game that is just a static time of day and won't change over time or even change weather so this modular version should help.
     
  7. Deleted User

    Deleted User

    Guest

    Stupid question but ... where in v7 do i set the 'player' transform so that the effects spawn around him ?
    I couldn't find the reference to it. Thank you !
     
  8. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    You can use the "Follow Target" of the AzureTimeController" component.
     
  9. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    Hi, I want to use a different Flare for the Sun and the Moon at night.

    Since the Directional Light is the same for both, if I assign the flare the sun looks as I want but when it turns to night, the moon has the same Flare, How can I know when the system changes from one to the other? is there an event for that already?
     
  10. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi,

    Just add one flare to the "Sun Transform" and another flare to the "Moon Transform".
    SkyPrefab.png

    If you want to use the flare with directional light only, there is no event, but you can use GetSunElevation() from the "AzureTimeController" component to know if it is day or night. It will return a float clamped between (-1.0 and 1.0). If the value is higher than 0, it is daytime. If the value is less than 0, it is night.
     
    daville likes this.
  11. Deleted User

    Deleted User

    Guest

    The 7.x series is really nice. One thing I can't figure out is that i can't modify the Environment light intensity/color.
    I tried changing in the Unity Lighting settings from Skybox to Color; i can change the color but not the intensity; my world stays pitch black at night. How would I be able to add some 'ambient' light ?
     
  12. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    As far as I know, you can only change the "intensity multiplier" if the environment source is set to "Skybox". When you change the environment source to "Color", the "Intensity Multiplier" automatically disappears because it is no longer used by Unity in this lighting mode. If you set the environment source to color, you can only change the color.

    In this case, you only need to set a lighter environment color at night, by default, the intensity and color properties of the environment lighting are already included in the profiles as "custom properties", just edit the profiles.
     
    Deleted User likes this.
  13. gewl

    gewl

    Joined:
    May 19, 2016
    Posts:
    95
    Hi,
    I recently updated to Unity 2020.3 LTS with URP 10 (from 2019 LTS with URP 7). AzureSky is working fine in editor, but when I build, the sky is black. I've tried adding the DynamicClouds shader to the Graphics settings' "Always Include", but it doesn't impact anything, and I'm not seeing any errors in the Player log either. Do you have any advice for solving this?
     
    Last edited: Mar 19, 2021
  14. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi,

    I am sorry that you are having troubles, but I just built a fresh project without any problems using the latest version of Azure v7.0.2 with Unity 2020.3 LTS and URP 10.3.2. I also did the test by switching between scenes with different sky settings to test if a shader would be missing in the build, but everything worked without any problem.

    In the current version it is not necessary to include the shaders to the "Always Included Shaders" list because the shaders are referenced by the prefab components. If the problem was due to a missing shader, the result would be a pink color.

    Unfortunately I don't know what may be causing this, try to re-import Azure and also import the replacement package for the URP 10 located at "URP_Replacements" folder.
     
  15. madruytb

    madruytb

    Joined:
    May 10, 2018
    Posts:
    26
    Hey Denis, I'm interested in Azure but I'm not sure how Azure interacts with Light Probes, I need my characters (non-static) to react accordingly to indirect light, unless Azure handles it in a different way that I dont need them, would Light Probes follow the day-night cycle updates as well?
     
  16. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi,

    Light Probes will work the same way they do when you don't use Azure. Light Probes are baked just like lightmaps, so this feature does not work in real time and will not follow the time of day changes.

    As far as I know, this generation doesn't support dynamic real-time GI, Unreal 5 (Lumen) and Godot 4 (SDFGI) should come with something like that, but with Unity I suppose that's not possible today.

    Currently the standard way of working with Unity and that developers usually do is to use lighmap and light probes in indoor scenes, set the directional light mode to mixed and set the directional light to illuminate in real time only dynamic objects and outdoor objects. You will be able to use Azure that way, but Azure will not update the light probes when the time of day changes.
     
  17. madruytb

    madruytb

    Joined:
    May 10, 2018
    Posts:
    26
    That is my current setup on my Directional light, but Light Probes handles indirect lighting on non-static objects, when the directional only contributes direct light into those. Unless I am missing something here and realtime lighting contribute indirect/bounce light into non-static objects, rendering light probes useless, is there any way to get proper bounce lights on non-static objects with Azure?
    Thank you for the quick reply!
     
    Last edited: Mar 22, 2021
  18. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    You're doing it the right way.

    Unfortunately not because this is regardless of Azure, Azure is a "sky system" not a new "lighting system". Azure "controls" the lighting, the lighting features are those provided by Unity, what you want is real time dynamic global illumination, and this I am almost sure is not current supported by Unity.
     
  19. madruytb

    madruytb

    Joined:
    May 10, 2018
    Posts:
    26
    Understood, is there any setting that could allow clouds to cast shadows on the ground? I couldnt find any info on the asset store page, just making sure here
     
  20. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    No, Azure clouds do not currently support shadows.
     
  21. madruytb

    madruytb

    Joined:
    May 10, 2018
    Posts:
    26
    Beleza, comprei, parabéns pelo asset! Sou brasileiro também mas vou continuar em ingles ja que deve ser melhor para a plataforma.

    After getting Azure into my scene, indirect lighting got noticeably weaker compared to what I had with baked (maybe even direct intensity, but it seems that changing it on Azure prefab Directional light had no result), I also noticed that indirect lighting gets a bit brighter as the sun comes up, and darker as the night comes, so it changes along the day, but not enough, could you help me make indirect light brighter? Posting screenshots of baked vs realtime-Azure (both around 11AM).
     

    Attached Files:

  22. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    As previously mentioned, indirect light does not change in real time because it is pre-rendered with the LightingData. Changing the "Indirect Multiplier" in directional light will not make a difference during gameplay because this property is only relevant for making the bake.

    This is because the intensity of directional light is by default being controlled by the "AzureWeatherController" component using the feature called "Override Property".

    In each day profile there is a custom property for you to control the intensity of the directional light, by default this property is set to the "Curve" type, so you can set a different light intensity for each time of the day. Select the default day profile and configure it to your liking. If you need more information about this feature you can call me in private, then we can speak in Portuguese.
     
  23. vlastan

    vlastan

    Joined:
    Nov 15, 2015
    Posts:
    49
    Hi, i just bought AzureSky to replace my custom coded daylight manager, and i have a couple of requests:

    I used to set the direct light during the day at values higher than 1 (mostly at 1.4 to get more contrast), so it seems that i'll have to edit your script to remove this limit. Maybe for future updates the instensity curve higher limit could be set to a a maximum of 2 to make possible of more stylized and contrasted looks? (and i won't be needing to adjust the code for every update).

    I'd like to know how to affect the general color of the sky. I want a warmer sky that becomes more reddish on sunset and dawn. I can't find a color gradient that affect the tint of the sky. Instead i see Mie and Rayleight Color, but i have yet to understand how to use those them to get the look that i want. Maybe could be possible to get a sky tint gradient to further customize the appearence of the sky during the timeline?
     
    Last edited: Mar 24, 2021
  24. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi,

    To increase the intensity of the directional light above 1, simply multiply the final output value. In the "AzureWeatherController" component, click on the "Override Properties" list to expand and show the contents of the list, look for the "Override Property" that controls the directional light intensity value and increase the "Multiplier".

    If you set the multiplier for example to 8, then if on the curve is set a value of 0.5, the directional light will get an intensity of 4.0. And if on the curve is a value of 1, then the directional light will get the intensit of 8.
    LightIntensity.jpg
    Note: Try to always keep that list folded to not lag the Inspector.

    Mie and Rayleigh are the gradients that you must customize to change the color of the sky, but you should change the color only in the region of the gradient that represents sunrise and sunset.
    SkyColor.jpg

    You can also try changing the wavelength in the "Scattering" tab of the "AzureSkyRenderController" component. If you need to set different wavelength values long the time of the day, you can create extra properties to the profiles and use the "Override Property" feature to dynamically control the wavelength.
     
  25. vlastan

    vlastan

    Joined:
    Nov 15, 2015
    Posts:
    49
    Thanks very much. I think i am getting some results.
    Now i'd like to know how to avoid having white fog during noon. I want the athmospheric fog color to be similar to the sky. What parameters should i look to?
     
  26. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    The same Rayleigh gradient, but set a little blue color at noon. There is also the "Fog Scattering Scale" on the "Fog Scattering" tab of "AzureSkyRenderController" component, set it to a value around 0.95. After that, you can still improve the colors with Unity's post-processing effects.
     
  27. fairlightlion

    fairlightlion

    Joined:
    Feb 23, 2021
    Posts:
    3
    I've purchased this asset in order to light my VRChat world, but while in Unity and its player the sky renders fine, as soon as I run it within VRChat, the sky is just entirely black. This is the case even if I have no Azure sky components in my scene at all and use a default skybox. If I remove the Azure[Sky] Dynamic Skybox folder from my assets, then VRChat's skybox rendering works again. Any ideas? (Note: VRChat mandates we use Unity 2018.4.20f1, which is supported by the asset, according to the asset store page.. what troubles me a bit is that in th epatch notes it says it requires unity 2019, which is different from what's said on the app store page.
     
  28. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi,

    I’m sorry you’re having trouble using Azure, unfortunately I don’t know what VRchat is. I did a quick search to find out what it is and it seems to be a third party platform, am I right? Unfortunately I can support Unity side only. I have no idea how this platform handles Unity assets and what may be the reason for the issue, I'm sorry, maybe the best place to get support or a solution is with the community that uses that platform. It is likely that Azure uses some Unity feature that is not compatible or supported by VRchat.

    Regarding the versions, Unity 2019 is required to access the latest versions of the asset, if you download using an earlier version of Unity, you will get an old version of Azure.
     
  29. fairlightlion

    fairlightlion

    Joined:
    Feb 23, 2021
    Posts:
    3
    Thank you! I think I figured out what is happening.. seems VRChat doesn't do call Update() as one would expect. I'll follow up with the VRChat community to see what I need to change :) Thanks again!
     
    DenisLemos likes this.
  30. Deleted User

    Deleted User

    Guest

    I love Azure more and more ! One thing that's quite annoying is the workflow. It's hard to have everything in one place; like when I'm creating a new Weather Profile i always keep going back and forth in the Timeline. It would be very convenient to have a 'time' slider at the top of the profile to move time and set the desired effect. Anyway, just a suggestion.
     
  31. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Thanks for the suggestion. But Unity is better than you think.

    You can just add a new Inspector tab to the Editor, select Azure in the scene and then lock this new Inspector to not change it when you select the profiles, so you have an Inspector tab that works as standard inspector and a second Inspector just to control the time of day quickly.
    MultiplesInspector.jpg
     
  32. Deleted User

    Deleted User

    Guest

    Sure I know this trick. Still you have to go back/forth. I was thinking more of having it in the same window. Writing this, i'm thinking that it would be absolute best to have it integrated as a timeline so we can precisely tweak as we go; because diving in and out of the curve editing drives you out of the flow. I remember "Sky Studio" doing it pretty well. Again, just a suggestion.
     
  33. uzisho

    uzisho

    Joined:
    Jul 3, 2019
    Posts:
    14
    Fantastic asset!

    Trying to achieve martian colors by changing the colors on the profile.

    I have two questions:
    1. It seems that the molecular density is forcing sort of a blueish hue to the sky. Am I right? Is there a way to avoid that?
    2. How can I increase the star count and density and force a view of the milky way?

    Thanks!
     
  34. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Thank you!


    You can check the sample scene and the profile available in the Mars folder. As you can see, the profile has only the properties that need different values according to the time of day, the other customizations are made directly in the AzureSkyRender component.
    Mars.jpg
    The sunset on Mars is usually bluish, but if you want something stylized, you can change the colors of Mie and Rayleigh.
    Mars2.jpg

    The number of stars cannot be increased, this is defined by the number of stars that exist in the texture. You can increase the Milky Way's intensity by setting the "Override Poperty" multiplier in the "AzureWeatherController" component.
    StarsIntensity.jpg

    The texture used to render the starfield, is composed as follows:
    • RGB Channels: Contains the color information of the Milky Way.
    • Alpha Channel: Stores the luminance of regular stars.
    The texture used in the RGB channels to render the Milky Way is the texture provided by the Solar System Scope website, this texture does not have the full colors of the Milky Way. If you want the sky to show the traditional Milky Way as shown by NASA images, just edit the texture and replace the RGB channels with the panoramic image of the Milky Way available through the NASA or ESO website.

    I found some bugs related to this and I will fix it soon, so I will take advantage of this update to add a new texture of the starfield showing the Milky Way with full color.
     
    Deleted User likes this.
  35. uzisho

    uzisho

    Joined:
    Jul 3, 2019
    Posts:
    14
    Thanks. This is extremely helpful. I noticed you "hide" the moon on the mars profile. I'll create a texture for Phobos (the Martian moon) and share it here in case you want to add it to the asset.
     
  36. Deleted User

    Deleted User

    Guest

    Still in the quest of making the editor 'usable'; i've tried to make a simple slider to control the time so i can have the Inspector with the different settings right below it (and not have a massive slowdown of the editor because of all the parameters showing in Azure); i've come up with the simple following script.

    It works but whenever i change time I need to wait 2-3 seconds for it to be 'effective' (as opposed to changing it directly in the TimeController). Is there any way to make it happen instantly (or at least faster) ?

    Also, why is the Controller soooo slow (I mean reaaaaal slow); is it something we can do about other than closing editor all the time ? It's a bit painful to go back and forth and wait for 2 seconds each time i tweak one setting. Adding property is like literally typing character by character (having 1 second delay between hitting character on the keyboard and editor showing it).

    Thanks !

    Code (CSharp):
    1.  
    2. using UnityEditor;
    3. using UnityEngine.AzureSky;
    4.  
    5. namespace ThePhotographer
    6. {
    7.     public class TimeSliderWindow : EditorWindow
    8.     {
    9.         static float time = 0.0f;
    10.         static AzureTimeController azureTimeController;
    11.  
    12.         [MenuItem("The Photographer/Time Slider")]
    13.         static void Init()
    14.         {
    15.             EditorWindow window = GetWindow(typeof(TimeSliderWindow), true, "Azure Time");
    16.             window.Show();
    17.         }
    18.  
    19.         void OnGUI()
    20.         {
    21.             time = EditorGUILayout.Slider(time, 0, 24);
    22.         }
    23.  
    24.         void OnInspectorUpdate()
    25.         {
    26.             if (azureTimeController != null)
    27.             {
    28.                 azureTimeController.SetTimeline(time);
    29.             }
    30.             else
    31.             {
    32.                 azureTimeController = FindObjectOfType<AzureTimeController>();
    33.             }
    34.  
    35.         }
    36.     }
    37. }
    38.  
     
  37. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    I'm not sure if using a moon texture with a different shape than a disk will work completely out of the box because internally in the sky shader is used a raytrace sphere to compute the moon's lighting, so this is later used to illuminate the phases of the moon in the texture. Perhaps with Phobos this will still work, but the best approach for moons with non-circular shapes is to use a 3D model and a RenderTexture.
    • You place the moon 3D model in the position (0,0,0) of the sky prefab, (using a simple lighting shader).
    • Adds a camera as a child of the sun directional light, this camera should only render the 3D model of the moon.
    • The camera must render to a RenderTexture.
    • This RenderTexture you use as the moon texture in the "References" tab of the "AzureSkyRenderController" component.
    • It is necessary to make a change in the shader to use only the RenderTexture as the moon, removing the sphere created internally by raytracing, as this is no longer useful.
    If the texture you are creating doesn't work, I can help you make these modifications to the shader, but I think it will still work using a texture because Phobos is almost circular.

    The Azure Inspector can be slow when the tab of the Override Properties list is unfolded in the "AzureWeatherController" component, Just fold the tab right after adding and configuring a new Override Property.
    OverridePropertiesList.jpg
    This tab is slow because the Inspector has to render a Reorderable List for each new Override Property.

    Regarding your script, I don't know what may be making it slow, maybe the "FindObjectOfType()" or "OnGUI()".
     
    Deleted User likes this.
  38. Deleted User

    Deleted User

    Guest

    Thanks i will look into it. One more thing, is it possible to have the Static Cloud Color 'Alpha' affect the Clouds so that I can completely fade them away ?
     
  39. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Did you try the "Static Cloud Opacity" slider in the "Clouds" tab of the "AzureSkyRenderController" component? It does exactly what you want!
    CloudOpacity.jpg
     
    Deleted User likes this.
  40. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    223
    is this suppose to support 2021.1 (URP 11.0 )? scenes are broken. Weather Zones and Default scene is too bright
     
    Last edited: Apr 9, 2021
  41. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi,

    For some reason the sample scenes in the URP package are with the old configuration, this is not an incompatibility of the asset with URP, just a bad configuration of the scene. This is already in the list of fixes for the next update.

    You just need to select Azure in the scene and in the "Override Properties" list of the "AzureWeatherController" component set the multiplier of "Directional Light Intensity" and "Environment Intensity" to 1 instead of 8.
    PropertyMultiplier.jpg
    When you refresh the Editor the changes will be applied. This happens only in the example scenes, if you drag the prefab into your scene it will not happen because the prefab is already properly configured.
     
  42. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Azure[Sky] Dynamic Skybox Double Release! Asset Store Link


    7x Version Cycle: v7.0.3 (Requires Unity 2019.4.8f1 or higher)
    • Note: It is not backward compatible with the previous 6x version cycle.
    • Fixed Kr/Km sliders that did not work when using Dynamic Texture shader.
    • Fixed the moon mask that blocked the stars when the moon is disabled.
    • Fixed moon texture mip maps. - Fixed URP Sample Scenes.
    • Fixed the out of sync issue with the Transparent Fog Scattering support caused when the sky prefab is rotated.
    • Added another starfield texture.
    • Added a .unitypackage replacement file to support Single Pass Instanced Rendering.


    6x Version Cycle: v6.0.4 (Requires Unity 2019.3.6f1 or higher)
    • Note: It is not backward compatible with the previous 5x version cycle.
    • Fixed the moon mask that blocked the stars when the moon is disabled.
    • Fixed the out of sync issue with the Transparent Fog Scattering support caused when the sky prefab is rotated.
    • Added another starfield texture.
    • Added a .unitypackage replacement file to support Single Pass Instanced Rendering.
     
    Acissathar and Deleted User like this.
  43. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Do we need to delete anything from v7.0.2 to upgrade, or can we just import over it?
     
  44. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    You can import over the existing package. You will need to delete some files that have been renamed and will be duplicated such as some textures.

    The "URP_Replacements" folder has been renamed to "Replacements", so you can delete the old one.

    Keep in mind that if you made any changes to the default profiles, the changes you made will be overwritten to the default values, the same goes for the "OverrideObject" profiles. So ideally, you should not reimport the profiles.
     
  45. ellisthemiracle

    ellisthemiracle

    Joined:
    Jul 4, 2018
    Posts:
    27
    Hi there,
    I bought this asset awhile ago and finally got to use it, loving the aesthetic so far.
    I have some questions, though. Can I sync the time of day with device time or over network? Is there any weather preset for thunderstorm?
     
  46. ellisthemiracle

    ellisthemiracle

    Joined:
    Jul 4, 2018
    Posts:
    27
    Okay, so as I do some research on sync time with device using C#, I found this piece of code. For anyone who's trying to sync AzureSky with device, replace line 413 (in EvaluateTimeOfDay() function) as:

    Code (CSharp):
    1. m_timeOfDay = (float)System.DateTime.Now.Hour / 24 + (float)System.DateTime.Now.Minute / 1440;
    I am still trying to make the thunderstorm and thunder with rain weather preset, if anyone already made this preset, please help.

    Cheers.
     
  47. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi,

    Another solution is:
    • Set the "Day Length" in the Inspector to 1440 minutes.
    • Add this method to AzureTimeController script:
      Code (CSharp):
      1. /// <summary>
      2. /// Sets the timeline using hour and minutes format.
      3. /// </summary>
      4. public void SetTimeline(int hour, int minute)
      5. {
      6.     m_timeline = hour + 1.0f / 60.0f * minute + 0.01f;
      7. }
      This custom method converts a time(hour, minute) to a float and set that float as timeline.

    • And call this method at some Start():
      Code (CSharp):
      1. SetTimeline(System.DateTime.Now.Hour, System.DateTime.Now.Minute);

    Azure already comes with a weather profile called "Storm", let me know what is wrong with this profile. The thunder sound effects you shoud code the logic to fit your need and game design. You can instantiate a thunder effect by calling the public void InstantiateThunderEffect(int index) from the "AzureEffectsController" component.
     
  48. eframson

    eframson

    Joined:
    Mar 31, 2018
    Posts:
    2
    So here's something slightly weird I'm noticing. I'm using URP, and in my scene it's currently sunrise:
    sunrise.jpg
    In the corner you can see the start of a diagonal line below which is just gray. If you swivel the camera to the left, you can see the diagonal line continued, as well as an extra set of reflections on the water that make it seem like there's an extra sunrise somewhere?
    extra_reflections.jpg
    It looks a little weird, anyone have any idea what's going on?

    EDIT: Nevermind, figured it out. Somehow the transform for the Azure [Sky] prefab got changed and the rotation values were all funky.
     
    Last edited: Apr 21, 2021
  49. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi,

    From what I can see in your screenshots, the sky is tilted. Probably the sky prefab is rotated, Azure allows you to rotate the sky prefab to change the sky-up-direction, this is useful in cases of simple games where you use a spherical terrain and need to change the sky-up-direction to be relative to the player as the player moves around the spherical world.
    Screenshot.jpg
    If you did not intentionally rotate the sky prefab to tilt the sky, then just set the prefab rotation again to (0,0,0).

    [Edited] After writing the answer I saw that you managed to solve the issue, but I will keep the answer to help other users.
     
    Last edited: Apr 22, 2021
  50. eframson

    eframson

    Joined:
    Mar 31, 2018
    Posts:
    2
    Yep, thanks for taking the time to respond though! Have you given any thought to creating a Discord channel, btw? I feel like that's a little more easily searchable than the Unity forums (e.g. - I tried to search for anyone talking about creating fog and it informed me that "fog" was too short a term to search on, haha)