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. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    251
    Hey Denis,

    Thanks, i'm using the old version for this scene now, because my scene is very heavy and my computer slow.
    When i press play i have to wait literally 2 minutes until it starts. The same when i stop it, so testing is very exhausting and the old version looks pretty decend for what i want.

    So, the day-night cycle is running very well, but i need to interact and pause it or continue it when paused at the same mark. So like a pause button on the videorecorder, freeze the cycle with a click and with another click keep it going further. Is that possible and can you help me with that code for 4.1.2?
    Thank you again!
     
  2. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    This script stops and starts the time progression of the old(v4.1.2) sky controller every time you press the "space" key. You can call the "StarStop" method from anywhere, for example using the OnClick event of a UI button.
    Code (CSharp):
    1.  
    2. using UnityEngine;
    3.  
    4. public class TimeControl : MonoBehaviour
    5. {
    6.     public AzureSkyController skyController;
    7.     private bool isMoving = true;
    8.     private float startDayDuration = 0.0f;
    9.  
    10.    void Start ()
    11.    {
    12.         startDayDuration = skyController.Azure_DayCycle;
    13.    }
    14.    
    15.    void Update ()
    16.    {
    17.         if (Input.GetKeyDown("space"))
    18.         {
    19.             StartStop();
    20.         }
    21.    }
    22.  
    23.     public void StartStop()
    24.     {
    25.         if (isMoving)
    26.             skyController.AzureSetTime(skyController.Azure_Timeline, 0.0f);
    27.         else
    28.             skyController.AzureSetTime(skyController.Azure_Timeline, startDayDuration);
    29.  
    30.         isMoving = !isMoving;
    31.     }
    32. }
    33.  
     
    Hormic likes this.
  3. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    251
    Thank you man, you are amazing!!! :-D
    Works brilliant and it really looks very beautiful now. :-D
    I can send you the downloadlink for the scene build in the next days, if you like.
    It requires an OpenVR Headset.
     
  4. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    I'm glad everything is working.

    Thanks, but this will not be necessary because I do not have a VR device.
     
    Hormic likes this.
  5. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Azure[Sky] Dynamic Skybox v4.3.9 is available! - Asset Store Link

    What's new!
    • Added a new approach to implement the transparent shaders to work with the fog scattering effect. This new approach is faster and fixes bugs and artifacts generated by the earlier approach that used a projection technique. See more details here in the post #945.

    • The alternative versions of the built-in transparent shader were rewritten to work with the new approach, now with the new approach the fog handles the ForwardAdd passes and works correctly with spot and point lights.

    • All the features are now supported again for all Unity versions starting from Unity 5.6.0.
     
  6. Zeevex

    Zeevex

    Joined:
    Jan 15, 2018
    Posts:
    28
    Hey! i've been a user of this skybox for a little while now, i love it!
    i'm wondering at the moment though, i'm using the Lightweight Render pipeline, and can't seem to get the fog working, there isn't support for it?
     
  7. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    The fog scattering makes the game to stutter.

    For testing this I've created a minimal scene and everything works, but when I add the fog scattering I get this stuttering:
    - it doesn't drop fps that much and also the graphs in the profiler show almost no difference, but when moving, form time to time everything seems to stop for around 0.3secs and then runs smoothly again for several seconds until it stops again for around 0.3secs.
    When the fog scattering gets removed the stuttering is away too.

    The profiler shows a rather small gc.alloc but I would guess this could be the reason.

    This happens in editor and in build (windows 10, unity 2018.3.0f2, azure 4.3.9 (Jan 25, 2019)

    How can we get rid of this stutter?
     
  8. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    I think I've found the solution to the gc.alloc that cause the stuttering.
    If someone is also suffering from this, it is the GetComponent<Camera>(); call.
    For licensing issues I do not paste the full code and if you need it, I've sent Denis the source with some additional changes.
     
  9. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi everyone, sorry for the absence. Again a storm left me without internet access.

    Currently, Azure does not support LWRP and HDRP. Maybe after the Scriptable Rendering Pipeline is officially released, this is implemented.


    Hi!
    I never noticed any stuttering in the tests I did, for me the fog always worked smoothly, but I confess I did not do many tests using Unity 2018.3 because that version presented many problems with me and I intend to skip straight into Unity 2019 when it is released.



    I'm glad you found a solution.
    Thanks for sending the source with the fix, I'll include it in the next update.
     
  10. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    131
    Hi

    I just got this to experiment with and I wondered if you could give me any tips on integrating it with Hydroform.

    Thanks
    Jason
     
  11. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi!
    I updated the first-page with instructions on how to make Azure work with Hydroform Ocean System.

    This is the result I got:
    HydroformAzure.jpg
     
    Jason210 and ftejada like this.
  12. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    Does Azure have a built in event system, ideally tied to time? Something like at 6am I want an event sent out so that outside lanterns turn off for example.

    A quick scan over the API seems like I can get the time of day and then set up my own event system, but curious if it already exists before I dig into that.

    Thanks!
     
  13. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    There is no event system linked to the timeline, but there is one feature that I consider even more useful that is the Output System. The Output System allows you to create extra curves and gradients to dynamically control all sorts of things in your game according to the timeline.

    Here an old video with a small demonstration of how to use the Output System.

    There have been some API changes since the video was recorded, but the process is the same as shown in the video. The nomenclature of the methods to access the outputs has changed to:
    GetCurveOutput (int element) => returns a float that you can convert to integer if necessary.
    GetGradientOutput (int element) => returns a Color.
     
  14. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    Awesome, I'll check it out. Thanks!
     
  15. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    755
    Hi,
    Looking to azure since the beginning, i'm now looking at the Lite version for some performance needs
    Could you post some pics of skies made with the lite version??
    The output system sounds great!
     
  16. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi!
    All screenshots shown on the Azure[Sky] Lite page on the Asset Store were made using the Lite version. In the description, you also find the download links for the demos.
     
    eaque likes this.
  17. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    755
    i forgot about the demo!!
    many thanks!
     
  18. Ttravi

    Ttravi

    Joined:
    Jan 22, 2018
    Posts:
    32
    Good morning,

    I'm trying to use Azure Sky with SpriteLights:
    https://assetstore.unity.com/packages/vfx/shaders/spritelights-46409

    But when I use the lights with the shader set on Geometry render Queue, it becomes occluded by Azure Sky Dome. It only works as intented when the lights shader is set to Transparent Queue:



    The real issue here is: I'm forced to use Geometry render Queue on these lights so I can see them at distance. Using Transparent render Queue make the "resize at distance" logic from SpriteLights scrips useless.

    What part of the code or the shader of Azure Sky can I change to fix this?
     
  19. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi!
    I'm not familiar with SpriteLights, but this issue seems to be related to SpriteLights and not to Azure[Sky] because it is possible to reproduce the same problem if you use the Unity's Default-Skybox.

    The sky material is set in the background queue, so the sky will always be rendered behind the geometries, you can confirm this by selecting the sky material and see that the Render Queue value of the sky material is less than the SpriteLights material.

    This is strange and I do not know why the SpriteLights material is occluded by the sky, but this seems to occur only with skybox materials no matter which one you use.

    What you can do is change the Shader Mode to "Vertex Shader - Skydome" instead of "Pixel Shader - Skybox" in the sky controller's Options tab. That way the sky will be rendered as a skydome and not as a skybox material.

    Be sure to select the skydome inside the prefab to change the scale so that the dome covers the whole scene, but do not set a scale larger than the camera far clipping plane, otherwise the skydome mesh will not be rendered.

    This fixed the issue for me.
     
  20. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    131
    Thank you!
     
  21. tmeador

    tmeador

    Joined:
    Jan 10, 2019
    Posts:
    1
    Hello,
    I'm trying to use Azure Sky in a 2d side scrolling game. Is there any way to adjust the horizon point of the background skybox? Currently the horizon lands at the mid point of the scene.
    thanks!
     
  22. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi!
    Azure[Sky] was developed to work on 3D games so it will not work properly with hortographic cameras.

    You can try to change in the Options tab of the sky controller the Shader Mode to "Vertex Shader - Skydome" and also on the same tab disable the "Follow Active Main Camera". That way a dome is used around the scene instead of the skybox material, and you can then change the position of the skydome inside the sky controller prefab to change the horizon line position.

    Another option is to use two cameras, the first camera with projection mode set to Perspective to render only the sky and the second camera with the projection mode set as Orthographic to render the rest of the scene. Then you can simply rotate the first camera so that it renders the area of the sky you want or simply change the position of the dome as explained above.

    First camera settings:
    FirstCam.jpg

    Second camera settings:
    SecondCam.jpg SecondCam2.jpg

    Skydome layer setting:
    SkydomeLayer.jpg
     
  23. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    Does Azure support cloud shadows or adjusting the light if a cloud goes in front of the sun or moon?

    I searched through the thread and it looks like someone asked back in 2016, but I don't think it was ever directly replied to or brought up again.
     
    transat likes this.
  24. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Azure does not support cloud shadows, but you can try using a light cookie.
     
  25. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Hi - is there a way to use Azure with an existing Skybox?

    Thanks
     
  26. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi!
    I think not, at least not without making many changes. It is not a good idea to buy a sky system and not use its main feature.
     
    Willbkool_FPCS likes this.
  27. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Ok thanks, so I guess then one would have to convert the skybox to an Azure cloud texture to use it.
     
  28. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    I think it's worth a try.
    I can not guarantee that this will work in all cases, you can see the post #499 that explains the process of how the 2d static clouds were created.
     
    iddqd likes this.
  29. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    I'd like to use Azure Sky with Aura 2. Is it possible to make Azure control the Aura lights and scattering instead of its own?
     
  30. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    I've just updated Azure to 4.4.0 in one of my projects. I've only done some super quick checks with transparent stuff - huge thumbs up there, thank you very much! I do have a couple of other questions.

    First, around sunset and sunrise I find that there are bright bands in the fog at around horizon level which are visible through other geometry. Increasing the "Hr" value spreads this out so that it's less noticeable, but I'm wondering if that's the appropriate way to deal with it? I already have "Mie distance" set to the maximum level.

    Edit: Ahh, I think I found the answer to this one. Turning sunset from stylised to realistic seems to have fixed it.

    Second, my ambient light level seems to be black, even though in the lighting panel I've got Environment Lighting set to "Skybox". The skybox material definitely shows colour, Azure is definitely controlling the intensity, and values in the "Lighting" area of the active Azure profile are non-zero. In fact, changing those values seems to have no effect, even when set to really high values.

    Any pointers would be great, thanks!
     
    Last edited: Mar 3, 2019
  31. EstudioVR

    EstudioVR

    Joined:
    Jul 26, 2013
    Posts:
    127
    I will buy today. I need to know if it is compatible with Aura 2, to buy it too. Thanks
     
  32. loliconest

    loliconest

    Joined:
    Sep 21, 2015
    Posts:
    31
    Hi I've encountered a strange bug, every time I open a scene with this asset in the scene, or load a scene with this asset, the shadows in the scene will always be blue at the beginning, but it turned normal whenever I select the [Azure]Sky prefab in the Hierarchy.

    Is this a known issue for anyone?
     
  33. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi everyone, sorry for taking so long to respond. I was traveling with no access to the internet.

    I have never tested Azure[Sky] with this asset, but if the Aura variables are public, then it is possible to control them with Azure's Output System.



    When the sunset mode is set to Stylized, the fog changes to the projection mode, so the white line of the horizon is visible over the objects. The fog in stylized mode is not so good at ground level, but it is beautiful in aerial views. I recommend using the realistic mode.

    Regarding the ambient lighting...
    For me everything is working fine, the intensity and ambient colors are working well, but there seems to be some bug in my Unity Editor that does not update the displayed values of the Lighting window in real time, just when you click on some Game Object in the Hierarchy window that the UI of the Lighting window is updated, but in the scene the changes happen normally.

    Test the GI sample scene to see if it works, maybe it's a problem with the scene settings or enable the "Auto Generate" option in the Lighting window if it is disabled.


    I think this happens because some sky controller variables were not initialized, they are initialized when the Editor is updated the first time and the Editor only refreshes when some Game Object is selected or when the "Auto Generate" option is enabled in the Lighting window, in which case the Editor automatically refreshes when you open a scene.
     
  34. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    @DenisLemos I'm still a little confused by the output system. Is there a simpler way to get Azure to talk to other weather assets? Does Azure use the World Manager API, for example? What I'd like is to switch out the Azure fog and Aura fog and for Aura's density and scattering to change depending on Azure weather.
     
  35. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    The Output System is useful for controlling elements of your game based on the "timeline". So if you have some element in the scene that requires different values at different times of the day, you can create an output to control it.
    You can access the outputs from any other script using the following methods:
    • GetCurveOutput (int element); // Returns a Float.
    • GetGradientOutput (int element); // Returns a Color.
    You can use each output to control any sort of thing, in the video of the previous post the outputs were used to:
    • Turn city lights on and off.
    • Change the lights color.
    • Turn on the light from the windows of buildings at night.

    The output system is not integrated with the climate system because it would cause many problems if the same output had to be created in all profiles every time you needed an new output. So to control third-party assets with the climate system, you can use some properties especially added in the Weather tab of each day profile.
    Capture.JPG
    These properties by default do not control anything in the sky system, but you can configure them in the same way as any other property by setting a different value in each day profile. After that, you can access the sky controller to pick up the current value of each of these properties and use for whatever you want.
    Exemple:
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.AzureSky;
    3.  
    4. public class MyController : MonoBehaviour
    5. {
    6.     public AzureSkyController skyController;
    7.     private float myCustomFloat1 = 0.0f;
    8.     private float myCustomFloat2 = 0.0f;
    9.     private float myCustomFloat3 = 0.0f;
    10.     private Color myCustomColor1 = Color.black;
    11.     private Color myCustomColor2 = Color.black;
    12.     private Color myCustomColor3 = Color.black;
    13.  
    14.     // Update is called once per frame
    15.     void Update()
    16.     {
    17.         myCustomFloat1 = skyController.wetness;
    18.         myCustomFloat2 = skyController.snowAmount;
    19.         myCustomFloat3 = skyController.covarage;
    20.  
    21.         myCustomColor1 = skyController.outputColor1;
    22.         myCustomColor2 = skyController.outputColor2;
    23.         myCustomColor3 = skyController.outputColor3;
    24.  
    25.         /*
    26.         // Output exemple:
    27.         myCustomFloat1 = skyController.GetCurveOutput(0); // Get element 0 from curve output list.
    28.         myCustomColor1 = skyController.GetGradientOutput(0); // Get element 0 from gradient output list.
    29.         */
    30.     }
    31. }
     
    Willbkool_FPCS likes this.
  36. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    I find the current UI for graphs in Azure to be a bit of a pain. I haven't even figured out an easy way to do a straight line that definitely goes from 0 to 24. Is there any chance you could change/improve the interface? Otherwise it would be cool if you could use Unity timeline tracks instead. :)
     
  37. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    If you right click on the points you can set the key/value directly instead of trying to drag. This way you directly set all points to have a value of 0 and it'll be a straight line.
     
    DenisLemos, transat and angrypenguin like this.
  38. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    Yeah, isn't it the standard Unity curve editor? I do agree it's fiddly, but it's the standard interface for this.

    I like the way that the particle system editor does things, offering a few different modes to input values. That way if you want a constant you don't need to define a flat curve, you just set it to constant mode and set the number you want.
     
    DenisLemos and transat like this.
  39. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Hi!
    I suppose you're talking about the curves editor, as the @angrypenguin said, that's the standard Unity curves interface and I have no way to change or improve it.

    I do not know if timeline tracks can be useful in this case, I consider using curves the best choice for this type of task. The curves interface may seem complicated, but it's very complete and in my opinion, it's also easy to use. As @Acissathar mentioned, you can right-click on a curve node and choose the "edit key" option to set precise values.

    The Unity manual has more detailed information about curve manipulation.

    [Next Big Update]
    I'm about to start developing the new version of Azure[Sky] Dynamic Skybox completely from scratch, I'm trying to design an event system integrated with the weather system, which would exclude the need to use curves making the asset more efficient and easy to use.

    So, instead of curves, all the customization of each profile could be done only with sliders similar to the volume settings of the sound effects in the "Weather" tab. But the curves would still be available, because next to each property will have the option to select the property type.
     
  40. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    Sounds great Denis. An event system integrated with the weather system would be super useful.
    As for the current curves, have you had a look at the curve editor that Vegetation Studio Pro uses instead of the default Unity one? It's one small MIT licensed file.
     
  41. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    I do not have Vegetation Studio so I do not know how it works, but by the screenshots I saw that the editor is able to edit multiple curves at the same time.
     
  42. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hello @DenisLemos !!! I do not know if you are going to take it into account for this great update by remaking everything from scratch ... But I guess the design you give will be ready for all the new features that Unity 2019 has and its HDRP etc ..., right?
     
  43. roborb

    roborb

    Joined:
    Aug 26, 2013
    Posts:
    15
    As you head into the redevelopment of Azure[Sky] - I'd like to put a vote in for being able to go from the surface to orbit smoothly. 0.0 km to 35,750 km would do nicely! ;)
     
    Last edited: Mar 28, 2019
  44. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    I'm going to make an attempt to implement compatibility of the new version with LWRP and HDRP, but first I want to make everything work with the legacy rendering pipeline. I do not know all the new features that can influence Azure design, let me know if you have any suggestions.


    The next version should come with two sky models, one stylized(current sky model) and the other realistic. The realistic sky model will work with altitude variations, so you will just need to move your camera upward until it comes out of orbit. Initially, this effect will work in the skybox, so you will not be able to move away from the planet and travel through the outer space.
     
    Wetw0rx and Baldinoboy like this.
  45. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hei @DenisLemos !! I have not studied with the new rendering pipes but seeing some videos that show the new features of the lights, or what seems like fog of volume in the new versions of Unity, I think it may be a good idea to make a design of the new Azure with all these aspects in mind, so that the workflow in the future improvement of Azure, is much better and faster.

    It may even be that Azure can "use" certain characteristics of the new versions of Unity as volumetric fog instead of having to have their own ... that in the long run is more work and more headaches ...

    I do not know ... I'm just rambling a bit haha. Even so I hope that this vision will help you to hide the best possible option.

    Regards Denis!!!
     
    transat and DenisLemos like this.
  46. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Got it!
    Yes, this will be taken into account.
     
    ftejada likes this.
  47. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    @DenisLemos In the same vein as what @ftejada was saying... What I would like is a 100% PostProcessingStack-based AzureSky! The stack settings would mainly contain all the non weather related settings (quality, location, time, resources, etc) as well as a link to a weather profile. So you could then select a default weather profile in the Global PP volume and yet have different different weather presets in smaller PP volumes in the scene (walk into a zone and it starts snowing... or have your character walk too close to the terrain boundary and it starts fogging up). That way, the volumes can also be used by other PP effects to add sounds, other types of volumetric lights (Aura 2), etc. which you wouldn't need to worry about in your own asset. And it would automatically play nice with the default Unity stuff (cinemachine, timeline). :)
     
    ftejada and DenisLemos like this.
  48. roborb

    roborb

    Joined:
    Aug 26, 2013
    Posts:
    15
    Hooray!!
     
  49. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi @DenisLemos !!!
    A question Denis. I do not know if this is true in real life and if so, if Azure takes it into account.

    According to the Inclination of the Sun (or what I think is the same, how perpendicular the sun is with respect to some coordinates of the Earth), the intensity of the light that the Sun emits must change ???

    That is, if I have in Tab "LIGHTING-> Intensity-> Sun ... no Timeline" in the option "time" a value of 1.5, and Azure is supposed to handle it as if it were when the sun is higher with respect to the horizon. What intensity does Azure apply if by the coordinates of Longitude and Latitude the sun really does not reach 90 degrees of angle with respect to the horizon?
    Is this so in real life? Does Azure take it into account?

    regards
     
  50. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    781
    Azure does not take into account the location to determine the intensity of directional light due to several reasons, but you can achieve this by getting the sun elevation in the sky. And yes, in real life this occurs as described in this article. But it is not only the angle of the surface that would determine the intensity of the directional light, there are also other factors that we must consider.

    If you need something simple as described in the article, you can take the private variable "m_sunElevation" from the sky controller and use it to set a minimum and maximum value for the directional light intensity. The variable "m_sunElevation" returns a value between (-1.0 and 1.0).
    • 1.0: When the sun is at the top of the sky (at 90º).
    • 0.0: When the sun is at the horizon line (at 0º).
    • -1.0: When the sun is at the bottom of the sky, bellow the horizon line (at -90º).
    But there is no need to do this because you just have to change the curve mode that controls the directional light intensity in the Lighting tab to "Sun Elevation". In this case, the curve will be based on the "m_sunElevation" and you can set the light intensity to any value you want for any elevation that the sun will be in the sky, which would be almost the same as calculating the intensity of the directional light according to the angle of the surface as described in the article and shown in the image below.



    For more realistic lighting it would be necessary to use some sky model as the New Implementation of the Precomputed Atmospheric Scattering and rewrite Unity's lighting system to compute the radiance. The images below shows a sphere lighting taking into account the sun and sky irradiance.
    screen1.jpg
    screen2.jpg
    This is something I'm not going to do at the moment because it's too complex, but this is a feature that Unity developers could at least try to implement for the High Definition Render Pipeline, in my opinion, this would rise Unity's lighting system to another level.
     
    Quique-Martinez and ftejada like this.