Search Unity

Graphics Azure[Sky] - Dynamic Skybox

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

  1. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Awesome! I hope that means we'll also see Azure for HDRP :)
     
  2. Deleted User

    Deleted User

    Guest

    Hello it's me again,

    I already wrote an Mail to "sevenstarsgames@gmail.com" but unfortunately I didn't get an answer : /

    I would like to clarify this by mail please.
     
  3. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi!
    I'm sorry I had not noticed your email yet, for some reason it had been marked as spam.

    To change the intensity and color of the directional light, you need to set the properties on the "Lighting" tab of the day profiles. Note that you will only notice the changes at the same time as you edit if the profile being edited is currently in use by the sky manager, the sky manager by default always uses the first profile from the "Default Day Profiles" list. So if you are customizing a new profile, add that profile to the first element of the "Default Day Profiles" list on the "Profile Controller" tab of sky manager to see the changes in real time.
    Capture1.jpg


    There is no precise way to make the day last 12 minutes and the night last 8 minutes.
    • The first thing you need to do is set the "Day Length" on the "Time Controller" tab of the sky manager to 18, so the full day cycle will be 18 minutes. Also check the "Set Time of Day by Curve" option.
      Capture2.jpg
    • A day cycle is made up of 24 hours and in this case the entire 24 hour day-cycle has been set to last 18 minutes. The question here is not how many minutes of the day length will be daytime and how many will be night, but actually the question is how many hours of the 24 hour day-cycle will be within the daytime and how many will be within the night.

      Example:
      In the image below the day length curve is set to linear, in which case the time of day goes normally.
      Capture3.jpg

      In the following image I added to the curve two keys to delimit the boundaries of daytime and night.
      The first key at time=6 and value=6.
      The second key at time=18 and value=18.
      Capture4.jpg
      But nothing has changed yet and the time of day is still goes normally.

      Now if you move the two keys that were created in the previous step either to the right or to the left but keeping the value, you are actually already changing the length of the day and night. In the image below, I moved the first key 2-hours to the left and moved the second key 2-hours to the right. In this situation, the 24-hour cycle will be 16 hours at daytime and 8 hours at night. You just need to adjust the length of daytime and night to fit your needs.
      Capture5.jpg
    I answered here because it can help someone with the same questions.
     
  4. Deleted User

    Deleted User

    Guest

    Hello, thanks for writing that helped me a lot :) !

    - how do i get these Warning messages away ? how can I turn this off ?
    https://ibb.co/6ZLvY5P



    - how can I correctly adjust the light so that it goes with the Sun ?

    - In the Documentation it says that you have to put the Shaders in "always included shaders" I haven't done that & it still works in the finished Build / why that ?

    - whenever the sun goes down, the frames go down significantly / i dont know why !
     
    Last edited by a moderator: Dec 17, 2019
  5. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi!
    I do not know what this is but it does not seem to be related to Azure.


    As already answered in the previous post, you can adjust the directional light intensity by the "Intensity" property of the "Lighting" tab of your day profile. By default, the property is set to curve type, so you can edit the curve and set different values for each time of day. Just set a value close to zero for the night time.


    Unity only includes in the build shaders that are referenced in some script or material. Each material can use only one shader at a time. So when you build the project Unity will only include in the build the shader currently used by the sky material, but if in another scene you are using a different sky setting that forces the sky material to use a different shader variation, then will run a error (pink color) because the shader that the sky material needs in this other scene was not included in the build.

    The error did not occur to you because either you only use one scene with only one sky setting, or you are using the same sky setting for all the scenes.

    But this will no longer be necessary starting from the next update because all the shader variations will be referenced by the sky controller script.


    Are you using realtime shadows?
    I think this is Unity side, Unity considerably increases the number of draw calls and polygons when a directional light with real-time shadows is near the horizon. Unfortunately I have not yet found a workaround for this.
     
  6. Deleted User

    Deleted User

    Guest

    - Must i use Realtime Shadows ? °°

    - I didn't mean the " intensity " but that the shadows of Objects move if sun goes down & up.

    - So it would be better if I included the shaders in Unity ?
     
  7. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    That depends a lot on your project and the quality you want to achieve, many simple games that use a day and night system don't use shadows, but that would not be a good choice for a game with some level of realism.
    To maintain performance balance, you sometimes need to save performance from one place to use in another. Using hard shadows and decreasing shadow quality in quality settings can help. Note that I don't even know if this is really the problem.


    I'm a little confused, if I'm right, the shadows disappear when the directional light intensity is zero.


    Yes, even if you don't need it now, it's always good to be safe than sorry.
     
  8. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Azure[Sky] Dynamic Skybox v6.0.0 is now available!

    Asset Store link

    v6.0.0 (Requires Unity 2019.3.0f3 or higher)
    • Universal Render Pipeline support.
    • New plug and play Output System.
    • Time Direction can now move backwards.
    • Dynamic clouds now change the movement direction correctly without rotating the entire sky.
    • New Inspector.
    • Bug fixes.
    Important notes:
    • Always save a backup of your project before updating the package.
    • A lot of things have changed and the new version has no backward compatibility.
    • The new version is only available for Unity 2019.3.0f3 or higher, the old version will still be available to users of previous Unity versions.
    • Unity 2019.3.0 is already available for download from Unity Hub.
     
  9. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    340
    Hi, is there any way to disable Azure windzone control? I'd like to control my windzone externally, but Azure keeps zeroing it out (it's at 0 in my profile).

    Thanks
     
  10. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi!
    Azure controls only its own Wind Zone that comes with the prefab, just select the WindZone game object from the sky prefab and disable it, then create your own Wind Zone and use it as you want.
     
  11. gomurae_unity

    gomurae_unity

    Joined:
    Dec 27, 2019
    Posts:
    2
    How can I stop the 'Timeline'?
    I want time to be always noon.
     
  12. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi!
    Set the "Day Length" to zero. When the day length is zero, the time of day remains static and does not change automatically.
    Timeline.jpg
     
  13. gomurae_unity

    gomurae_unity

    Joined:
    Dec 27, 2019
    Posts:
    2
  14. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Azure[Sky] Dynamic Skybox v6.0.1

    Asset Store link

    This is just a minor patch update. Since the new version was made completely from scratch, I just forgot to implement the "quickly date selector" functionality using the middle button of the calendar header. Now when the middle button on the calendar header is pressed, an extra selector will appear to travel long distances between month and year dates as was usual in previous versions.
    CustomDateSelector.png
     
    ftejada likes this.
  15. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    @DenisLemos The sun and moon seem to shine through my terrain. I'm using URP. Any idea how I could fix this?
     
  16. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    And the mountains in my background have gone white, which appears to be linked to _TemporaryColorTexture in Azure Fog, according to the frame debugger. I don't know if it makes a difference but the terrain texture files I use are originally white (I add color to them with Microsplat).
     
  17. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    All good. Had to tweak the scattering distance.
     
    DenisLemos likes this.
  18. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    I was going to tell you to adjust the "Mie Depth" on the Options tab of the Sky Controller. Glad you already solved the issue.

    This happens when the fog is set too close to the camera, so the Mie scattering coming from the sun and moon seems to pass through the walls and mountains. In dense fog scenes, it is recommended to adjust the mie distance in the options tab.
     
    Last edited: Jan 30, 2020
  19. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    DenisLemos likes this.
  20. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    @DenisLemos Is there a problem with the Crest integration? Tried following the instructions on page 1 but now the Crest surface has gone pink (underwater is fine). I'm using the last version of everything.

    Screen Shot 2020-01-24 at 10.22.48 pm.png
     
  21. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi!
    Are you using Crest from the Asset Store? I tested Azure with the free Crest from the GitHub a few days ago and everything worked fine. Unfortunately I do not have the version of the plugin sold in the Asset Store to do the necessary tests.

    The Crest developer probably changed something in the shader code for this version. By the error message the problem seems to be related to the variable "worldPos".

    The line of code that should be causing the problem seems to be this:
    col = ApplyAzureFog(half4(col, 1.0), input.worldPos);
    • Check if the "worldPos" variable has not changed its name. Generally, each developer uses a different name.
    • Check if the keyword "input" used to access the vertex shader inputs has not changed. Generally, each developer also uses a different name.
     
    transat likes this.
  22. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    Code (CSharp):
    1. col = ApplyAzureFog(half4(col, 1.), input.positionWS_fogFactor.xyz);
    does the trick.
     
    ftejada and DenisLemos like this.
  23. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Nice!
    Thanks for sharing the fix, I already updated the instructions on the first page with this information.
     
    ftejada likes this.
  24. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    Still struggling getting the sun and moon not to shine through my distant mountains without losing the scattering effect. Any tips for me? Or is this something you could fix with some kind of depth mask?
     
  25. spso

    spso

    Joined:
    Oct 11, 2017
    Posts:
    17
    Hi,

    first of all: Great work on your plugin!

    I just imported the most recent version (6.0.1) of Azure into Unity 2018.4.15 and wanted to notify you of many errors like this:

    Assets\Azure[Sky] Dynamic Skybox\Editor\AzureEventControllerInspector.cs(61,49): error CS0117: 'EditorGUI' does not contain a definition for 'BeginFoldoutHeaderGroup'


    Which occur because BeginFoldoutHeaderGroup has been introduced with Unity 2019 and is not part of 2018. Replacing all of these with "Foldout" fixes the issue for me and makes it usable. A permanent fix would of course be desirable. :)

    Cheers,
    Simon
     
  26. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    I just replied to your private message.


    Hi!
    Thanks for the info, but note that Azure v6.0.1 was developed to be used with Unity 2019.3.0 or higher.

    I don't know how you managed to make it work on a previous version of Unity because you shouldn't even have been able to download Azure v6.0.1 using a Unity version prior to Unity 2019.3.0.

    Azure v6.0.1 came with support for features that were only added from Unity 2019.3.0 such as the new UI and Universal Render Pipeline.

    When using an old version of Unity, you should have been able to download only Azure v5.0.1 that is the appropriate varsion for using with previous versions of Unity, perhaps it was an Asset Store bug.
     
    spso likes this.
  27. spso

    spso

    Joined:
    Oct 11, 2017
    Posts:
    17
    Hi,

    thanks for your quick reply.
    That makes a lot of sense then why I get this error. :) And to be honest, for the rest it seems to work as expected I think..

    But indeed I got your version 6.0.1 in Unity 2018.4.15
    unity2018_Azure.JPG

    Maybe I downloaded it using unity 2019 and it also appears in 2018? Don't remember to be honest.

    However, thanks for the hint. I'll redownload.

    Edit: Re-downloading indeed worked. Got the correct version now.

    Cheers,
    Simon
     
    Last edited: Jan 30, 2020
    DenisLemos likes this.
  28. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    172
    Hi, I scanned the thread for an answer but I couldn’t find anything. Is it possible to have dual suns or dual moons in Azure.
     
  29. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi!
    Unfortunately this is not possible, only one sun and one moon is supported.
     
  30. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    172
    Thanks, that's a shame.
    Still very nice asset and I look forward to using it. Cheers
     
  31. Balgam

    Balgam

    Joined:
    Nov 6, 2016
    Posts:
    8
    Hi @DenisLemos,
    do you have any idea how to add fog scattering support for R.A.M?

    Thanks in advance
     
  32. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi!
    I don't have this asset for testing, so the only tips are in the documentation with instructions on how to add fog support to custom transparent shaders.

    Usually the process is the same or very similar for all water assets, so you can take a look at the instructions on the first page and use it as a base.

    If you can't do it yourself, you can ask the author of the asset in question for permission if he authorizes you to send me the files by private message. So I can try to do the implementation and if it works, then add the instructions on the first page for everyone.

    Note that there are no guarantees that it will work, but until today all attempts to implement the fog with water assets have worked.
     
  33. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    316
    Hi,

    I've been using Azure Sky Material for some time, and it's a great asset.

    I do have some issues regarding render order though.

    I have added a second camera, which I am using to render object in the background (such an an alien planet, an aurora borealis effect, etc).

    This works fine with Azure sky during clear weather. The problem is when the Azure sky manager creates clouds, then render behind the "background" camera, so you can see the aurora and planet through the clouds.

    I have tried changing the "Render Queue" in the Azure Sky Manager shader, but this hasn't worked. Is there some way that I can change the render order?

    The background objects are on their own layer, could I use this to render the clouds over that layer?

    Thanks!
     
  34. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi!
    I'm sorry, but what you're trying to do won't work for a simple reason. All Azure features like clouds, stars, sun, moon, etc... are rendered in the same shader pass. When you change the Render Queue, you do it for all sky features at same time because it share the same material and the same pass.

    Think about the render queue or camera stacking as the Photoshop layer system. All the final sky color is output to one layer and when you add a second layer over the sky layer, the second layer will render in front of all the sky color output. In this case, there is no way for the Unity rendering system to know that the second layer should be rendered after the background sky, but before the clouds because the clouds, stars and everything else are not on separate layers.

    What you intend to achieve seems to be quite simple, but it actually requires creating a complex rendering system. Azure was made to be simple, fast and easy to use and for that reason everything is rendered in the same skybox material to take full advantage of Unity's lighting features.

    So what are the options for you?
    1. The first option is the most fast and simple, but you will need to spend some money.
      • Render the sky in the background with the clouds off.
      • Render you secondary camera with the aurora and planets.
      • Try to find a third-party cloud system in the Asset Store to render over the skybox, auroras and planets. I never tested this one, but I already received a report from an Azure user using this cloud system together with Azure.
    2. You can also try to dig into the sky shader code and delete everything you don't want to be rendered, leaving just the code snippet from the clouds and adding this copy of the shader to a giant sphere in your scene. The screenshots below are using this technique.
      • Clouds have been deactivated in the Azure options so that they do not render in the skybox background.
      • I added a giant sphere surrounding the whole scene and used the material with the variation of the shader I created containing only the parts of the code that create the clouds.
      • For testing I added another distant sphere using standard material and positioned it outside the sphere with the cloud material, as you can see, now the clouds are rendered over the object.
        Screenshot1.jpg Screenshot2.jpg
        If you want to try this solution, send me a private message with the following informations because each option will require an appropriate shader:
        • Which Azure package are you using? It is the full version or the Lite version.
        • Are you using dynamic or static clouds?
        • Are you using Standard RP or URP?
    3. Make your own rendering system especially for that particular purpose using the Azure source code as a base.
     
  35. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    316
    Hi, thanks a lot for that, I sent you an email.
     
  36. SNicolas

    SNicolas

    Joined:
    Apr 6, 2013
    Posts:
    32
    Wow! Nice asset. Waiting to HDRP support and I will definitely buy it. Good job!
     
  37. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    172
    Hi All, does anyone have Azure working with Aura 2 or any volumetric lighting solution?
     
  38. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    172
    Got Azure to work with Aura 2 was pretty easy in the end.
    Is it possible to change out the moon texture for say a Phobos on Mars? I see the texture but wasn't sure if just swapping it out was enough or there is a method to change it in the inspector?
     
  39. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    172
    Ok, found it in the Sky material :)
     
    DenisLemos likes this.
  40. kunstlabdev

    kunstlabdev

    Joined:
    Feb 25, 2020
    Posts:
    6
    We too. Our current project is in HDRP and looking for a dynamic sky/weather system that looks realistic and Azure Sky ticks all the boxes apart from HDRP.

    Kim
     
    EddieChristian and one_one like this.
  41. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi!
    I appreciate your interest in Azure!

    Regarding HDRP support, I don't like to promise something that I might not be able to deliver because I'm currently very busy and it's hard to keep the package up to date on 3 completely different render pipelines, not to mention the Lite version. Of course, I would like to keep Azure as complete as possible, but that requires a lot more research time to learn how each render works.

    Roadmap: This while I work on developing of my game.
    • 3D Tilemap System: I am currently working on a completely revamped version of my tilemap system for 3D pixel art games. This will be a very useful tool in the development of my game and it will be available for free to everyone.

    • New Azure[Sky] Dynamic Skybox Update: This update will come with some improvements in the control options of reflection probes and real time GI.

    • New Azure[Sky] Lite Update: Support for Universal Render Pipeline.
     
  42. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    I understand completely, especially considering that the new rendering pipelines don't exactly make it easy for asset developers to maintain support. I guess that quite a few people (including myself) are interested because there still aren't any sky assets for HDRP yet. The physically based sky shader that comes with HDRP is great, but it does not include clouds or stars (and I don't think a moon either?). Simply using static skyboxes works, but it seems a little weird having static clouds in 2020 in the _high definition_ pipeline. On the bright side, though, fog and the base for the skybox shader already exist in HDRP, and the profile and weather system probably don't need any changes, except for different materials for the particle effects.
    Anyway, I hope things go smoothly with your game and the planned updates - I'll just keep my eyes open for any news about HDRP in the meantime. Thanks for addressing this topic though!
     
    Last edited: Mar 1, 2020
    ftejada and DenisLemos like this.
  43. heronww

    heronww

    Joined:
    Sep 8, 2019
    Posts:
    30
    Fantastic asset! Just purchased but running into two problems (in order of importance)

    1) Using the standard "drag n drop" Azure[Sky] Controller, the rain particles don't appear on any of the light, medium, or heavy rains under the Global Weather Profiles? How can I fix this? The particles, as default, seem to be present within the effects controller, but they don't render in play mode. They do render in the demo scene.

    2) My terrain is composed of 16 separate parts (4x4), however when I use Azure[Sky] Controller it seems to have a massive and obvious, ugly line dividing these terrains? Please see attached screenshot. This appears even worse up-close in play mode, where this line somehow seems to directly separate the colors. This line doesn't exist when I delete the Sky Controller.
     

    Attached Files:

    • sky.png
      sky.png
      File size:
      334.2 KB
      Views:
      412
  44. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    @heronww 1) Make sure you have your character (otherwise camera?) game object set as the follow target in the particles menu of the Azure Sky Controller component.
     
    DenisLemos likes this.
  45. heronww

    heronww

    Joined:
    Sep 8, 2019
    Posts:
    30
    That did the trick for 1) thanks!
     
  46. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi!
    I've never seen anything like this before, so I don't know what may be causing the issue. The fact that you disable the sky controller and the problem goes away does not mean that it is the sky controller that is not working, there may be something else in the scene causing incompatibility.

    I did a quick test using the terrain in a 4x4 grid and everything worked without problems here.
    Screen1.png

    If the problem goes away when you disable the sky controller, then the problem should not be related to the rendering of the skybox or the fog scattering effect because the sky controller in this case is only used to update the material properties when there is some change in the sky settings.

    When you disable the sky controller, the child objects are also deactivated with the prefab and there are the directional light and the reflection probe.

    So try this:
    • Check if in your scene there is no other directional light enabled, keep only the directional light that comes in the sky controller prefab enabled in your scene.

    • Try to increase the "Box Size" of the reflection probe to cover the entire terrain if you are using it.

    • Select only the terrains in your scene and press "Control + C" to copy them, then open the Default example scene that comes with Azure, delete the pre-existing terrain and press "Control + V" to paste the terrains that you copied of your scene. If everything works correctly, then it means that there is something in your scene causing that issue and it is easier to find the source of the problem.
     
  47. heronww

    heronww

    Joined:
    Sep 8, 2019
    Posts:
    30
    I disabled the reflection probe and that seemed to do the trick. Before I was deleting the component without first turning it "off".
     
  48. bobAZ2019

    bobAZ2019

    Joined:
    Mar 28, 2019
    Posts:
    28
    hi,

    i bought this awhile back but just got a chance to use it. very nice asset indeed and easy to use. kudo to the dev.

    what i'd like to know is.... is it possible to add the amount of clouds, change the size and color of the moon? i read the doc but it doesn't explain about this. so, not sure how i would go about doing it. or, is it beyond Azure capability right now?
     
  49. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi!
    Thank you for using Azure.

    If you use the complete Azure version with dynamic clouds, you can change the cloud amount by setting the "Dynamic Cloud Density" property in the "Clouds" tab of each day profile. But the best way to do that is to create a profile with a clear day setup and another with a covarage setup and use the climate system to perform a transition from one profile to another. Play with the "Profiles" tab of the "AzureSkyController" component from the "Default" demo scene.

    Also in the "Outer Space" tab of each day profile, there are the properties to change the size, color and intensity of the moon. If you want, you can change the property type to "Curves or Gradients" and set a different value at any time of the day.
     
  50. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    508
    I'm useing Azure Sky for years and it's really good. But I need to download Unity 2020. Does it work with Unity 2020 too?
     
    Last edited: Mar 21, 2020