Search Unity

Graphics Azure[Sky] - Dynamic Skybox

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

  1. yy2045

    yy2045

    Joined:
    Jul 22, 2021
    Posts:
    4
    Thanks to you, I solved the problem.

    I moved the image right away without packaging it, so the image setting seems to have changed. I'll be careful from now on.
    One more question. The default image setting for the static cloud is that sRGB (Color Texture) is not used.
    I feel the color is better when I use that setting, so can this be a problem?
     
  2. lightpi

    lightpi

    Joined:
    Aug 6, 2018
    Posts:
    2
    Hi, we solved this problem through research, which may be helpful for artists who are not familiar with the code and rely on graphical programming. Now we can quickly add AzureFog fog on any Shader (ASE) made by ourselves.

    Share it here, it may be helpful to people who have the same problem:)

    AzureFog1.jpg AzureFog2.jpg AzureFog3.jpg
     
  3. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    I think this won't be a problem, if the color looks better for you then use it like that. This only applies gamma correction depending on the color space you are using in your project.

    You can also try tweaking the texture quality and compression settings, the setting below reduces texture memory usage from 4MB to 0.8MB without losing much visual quality.
    TextureSettings.png


    Thank you so much for posting the solution here, I couldn't have done it better.
     
  4. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    341


    @DenisLemos I found a small bug. Unity 2020.3.16f1, Azure Sky ver 7.04 - July 19, 2021, when I click Go button, I got 'Index out of range' bug.
     
  5. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi,

    I suspect it is not a bug, you are trying to use profiles with a different "Override Object" attached to it. Select the "Mars Profile" and you will see that this profile has different properties than the others, so the weather controller can't blend it because it has a different set of custom properties.
     
    ikemen_blueD likes this.
  6. yy2045

    yy2045

    Joined:
    Jul 22, 2021
    Posts:
    4
    Hi,
    I found out while touching the static cloud texture. when I set the texture as a 'static cloud single layer' (I don't know if this name is for sure), I won't see sun, moon, or star textures. In the pictures, it's the same setting, but can't see the light source depending on the cloud texture. What difference in texture images makes this case?
    화면 캡처 2021-09-02 114859.jpg 화면 캡처 2021-09-02 114924.jpg 화면 캡처 2021-09-02 115045.jpg 화면 캡처 2021-09-02 115026.jpg

    One more thing, I want to adjust the intensity of the directional light with Ui.
    I want to set like 'slider.value = (multiplier value of override property)'.
    I read your scripts hard and tried, but I couldn't solve them. Is there a way?
    Do I need to create a new override object profile?
     
  7. bomee_unity

    bomee_unity

    Joined:
    Jul 5, 2021
    Posts:
    1
    Hi,
    first absolutely love the asset, thank you so much you made my life much easier.
    I found out that after applying Azure as a skybox material I cannot change the ambient color under environment lighting setting even though I set my source to color.
    Is there a way to correct this or is it a default setting that I cannot control?
     
  8. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi,

    1) For some reason the alpha channel of this texture is white, but it must be all black. Try to opening this texture on Photoshop or Gimp and setting the alpha channel to black.

    2) You can just remove the "directional light intensity" reference from the override properties list in the AzureWeatherController component, so you can control the directional light intesity just using your ui slider.


    Hi,

    Thank you for using Azure, I'm glad you liked it.

    You can't change the color directly on the "Lighting Window" because it is being overrited by the "AzureEnvironmentController" component, and by default, the color fields of the AzureEnvironmentController component are also overrited by the "Override Property System" of the AzureWeatherController component, so you should configure it on each weather profile. See the custom properties number 22, 23 and 24 of the weather profiles.
     
  9. DenisLemos

    DenisLemos

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

    v7.0.5 (Requires Unity 2019.4.8f1 or higher)
    • Fixed issue caused when the parent of a local weather zone are disabled, but the local weather zone child is still enabled in the Hierarchy. Now it is possible to use the local weather zones as groups and disable only the parent game object.
    • Fixed StaticCloudSingleLayer.png alpha issue.
    • Added the option to the AzureEffectController component to anable/disable the particles sub emmiters module used to create the rain splash effect on collisions. You can use SetParticlesSubEmittersModuleState(bool value) to enable/disable the rain splash at runtime.
    • Added the option to the AzureEffectController component to anable/disable the particles trigger module used to kill the particles when it is inside some collider. You can use SetParticlesTriggerModuleState(bool value) to switch this module state at runtime.
    • Added a collider field to the AzureEffectController component called "Particles Trigger Collider", just enable the trigger module and use it as trigger to avoid the particles to get inside buildings, caves, etc. You can use SetParticlesTriggerCollider(Collider collider) to change the trigger when the player/camera enter/exit a building.
     
  10. yy2045

    yy2045

    Joined:
    Jul 22, 2021
    Posts:
    4
    Hello,

    There was a problem deleting functions that I didn't need from your asset.

    Since I don't need sound and wind effects, I deleted the variables and functions from the scripts.

    And I wanted to delete the items from the override.

    I selected 'Light Rain Sound FX' from '_OverrideObject' and pressed the '-(minus)' button. However, many errors suddenly appeared and I canceled, but the following errors occurred.

    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
    System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
    System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
    UnityEngine.AzureSky.AzureWeatherController.EvaluateCurrentWeatherProfile () (at Assets/Azure[Sky] Dynamic Skybox/Scripts/AzureWeatherController.cs:397)
    UnityEngine.AzureSky.AzureWeatherController.EvaluateWeatherProfiles () (at Assets/Azure[Sky] Dynamic Skybox/Scripts/AzureWeatherController.cs:276)
    UnityEngine.AzureSky.AzureWeatherController.Awake () (at Assets/Azure[Sky] Dynamic Skybox/Scripts/AzureWeatherController.cs:81)

    What is the way to safely remove the items on the override?
     
  11. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi,

    Deleting the custom properties directly from the the "_OverrideObject" is not a good idea because there is no way to comunicate with the sky prefabs from all the scenes using this same override object. So when you delete an item from the "Custom Properties" list, it get out of sync with the override list from the weather controller component.

    There is some things you can do in this situation:
    • Create a new override object from scratch and add to it only the custom properties you want to use, and also create a new profiles preset using this new override object. This cost time to setup, but this way you can configure only the properties you want.
    • Instead of deleting the sound custom properties from the override object, you can just change their names and use it to control other things in your game.
    • You can leave the override properties empty on the weather controller component, so they will not impact the performance.
      EmptyOverrideProperty.jpg
    • You can use the alternative sky prefab from the "Override Properties By Scripting" folder located at the "Scene" folder. This prefab, instead of configure the override properties by the weather controller Inspector, you do it by scripting(It is very simple!). So when you delete some custom property from the "_OverrideObject", you just need to open and edit the "AzureOverridePropertiesManually.cs" script by removing all that custom property references from the script or adding your new references to it. In case you are removing some property, you need to adjust the index order of the "GetOverrideFloatOutput()" and "GetOverrideColorOutput()" from the "FixedUpdate()" to math the new custom properties order from the override object profile, otherwise it will also get out of sync.
     
  12. osriver

    osriver

    Joined:
    Jan 6, 2014
    Posts:
    1
    Do you know if something like this would be possible with Shader Graph?
     
  13. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    Hey @DenisLemos,
    Can you give me a tips to make moon a bit bigger? :)
     
  14. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi,

    I'm not sure, but I think you can do something similar by calling the function "ApplyAzureFog()" from the "AzureFogCore.cginc" using the Custom Function Node. Another usefull link.


    Hi,

    You can set the moon size by changing the "Moon Texture Size" in the "Outer Space" tab of the "AzureSkyRenderController" component. By default this property is not exposed as a Custom Profile Property and is not overwritten by the weather system, so you can just edit it directly from its component.
     
    MaximilianPs likes this.
  15. sohrab729

    sohrab729

    Joined:
    Dec 22, 2020
    Posts:
    1
    Hello,
    I'm a beginner to this asset, and I'm making a flight game, so the default fog distance is really low for my game, and the problem is I can't change the volume of it. What should I do?
     
  16. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi,

    Thank you for using Azure.

    I suppose you are using the complete version, so in this version by default the fog settings are exposed as Custom Profile Properties that you can set values between 0 and 1. Then the value from profiles are blended and calculated by the weather system and sent to the "AzureSkyRenderController" component by the override system that also applys a multiplier to it.

    So, the best way to increase the fog distance is setting a higher value to the multiplier field of the override property that controls the global fog distance on the "Override Properties" list of "AzureWeatherController" component. The multiplier of this override is 5500 by default.
    FogOverride.png
    Let's suppose you want the global fog distance to start 5000 meters away from the camera, you can set the multiplier value to 10000 (set it to a round value to make it easy to configure the profiles). So in the profiles, if you set the fog distance to 0.5, the fog will render 5000 meter away, if you set the fog distance to 0.25, the fog will render 2500 meters away and if you set the fog distance to 1.0, the fog will render at full distance (10000 meters away).

    There is another setting on the profiles that can affect the global fog distance, it is the "Global Fog Smooth Step". This property controls the blend between where there is no fog and where the fog starts, so you can set it to zero if you want only the true fog distance, and just increase this property value if you want some fog smooth.

    The same behaviour above goes for the "Height Fog" and any other override property.
     
  17. Deleted User

    Deleted User

    Guest

    I'm trying to make Azure work with MagicLightmapSwitcher. I have the following script:
    Code (CSharp):
    1.  [ExecuteInEditMode]
    2.     [RequireComponent(typeof(AzureTimeController))]
    3.     public class MagicLightSwitcher : MLSCustomBlendable
    4.     {
    5.         public AzureTimeController Timeline;
    6.         public float mls_b_azureTime;
    7.  
    8.         void Update()
    9.         {
    10.             Timeline.SetTimeline(mls_b_azureTime);
    11.         }
    12.     }
    13.  
    I can't make it work in the editor; somehow Azure Time Controller overlaps any change I make. Is there a way to make it work in the editor from another script ?

    Thanks !
     
  18. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    Got it, but the MoonTextureColor didn't affect the color too much, and also the TextureIntensity won't change, so I guess how I could get the moon a bit more yellowish :)

    upload_2021-10-5_11-56-30.png
     
  19. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Are you talking about the editor or "edit mode"? I assume you are talking about the edit mode because you are using the [ExecuteInEditMode] attribute in your script.

    I don't think the time controller is overlaping the changes you made, instead, I think Azure components are not being updated for some reason. When I tested your code, the changes only apply to Azure when I select Azure in the Hierarchy window, which forces Azure to update taking into account the new time of day.

    Don't use "SetTimeline()" on Update() because it will overlaps some eventual setting you may try to do directly by the time controller component. I was able to make it work only by changing the "mls_b_azureTime" to "Property" and using the get and set feature, for some reason, it makes Azure components update instantly.

    Try a code like this one:
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.AzureSky;
    3.  
    4. [ExecuteInEditMode]
    5. public class MagicLightSwitcher : MonoBehaviour
    6. {
    7.     public AzureTimeController Timeline;
    8.     private float mls_b_azureTime;
    9.  
    10.     public float Mls_b_azureTime
    11.     {
    12.         get => mls_b_azureTime;
    13.         set
    14.         {
    15.             mls_b_azureTime = value;
    16.             Timeline.SetTimeline(value);
    17.         }
    18.     }
    19.  
    20.     // Desconsider this in your code, it is here only for testing
    21.     private void OnEnable()
    22.     {
    23.         Mls_b_azureTime = 7;
    24.     }
    25. }
    To test:
    • Set in Azure a time of day other than 7.
    • Select the game object with the script above and "enable" and "disable" the script component to force the "Mls_b_azureTime" to change to 7 when called the OnEnable().
    So, when there is some change to the "Mls_b_azureTime" property caused by the MagicLightSwitcher class or any other script, it will also update Azure. I just can't say why setting the timeline using the Get and Set feature works, but using Update() to set the timeline in the edit mode doesn't work.

    The MoonTextureColor don't effect the moon color too much because it is also affected by the Mie and Rayleigh colors, if you also set the Mie color to a similar moon texture color, it will look better.
    MoonColor.jpg

    The "TextureIntensity" don't change directly by the "AzureSkyRenderController" Inspector because it is being overrited by the weather controller, so you need to set it in the profiles. Some properties you will not find by default in the profiles for setting, then you need to edit it directly by the component or add it to the profiles as a custom property and also configure the weather controller to override it with the override system feature. If you cannot edit some property directly by the component, it means the property is being overrited by the weather system, then you should look at the profiles to configure it.
     
    MuntyMcFly and MaximilianPs like this.
  20. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    All clear, thank you :)
     
  21. Jayme65

    Jayme65

    Joined:
    Dec 11, 2016
    Posts:
    94
    Hello, my question concerns the "Time System".
    In my scene, the sun and the moon are seen through a window opening.

    I like to use the "Time System > Simple"...because it allows me to orient the sun and the moon so that they always face this window (I just had to find the 'y' orientation of the whole prefab)
    But now I would like to refine and have the sunrise and sunset times be realistic (because I see, in 'simple' mode that the times are always the same).

    So I understand that I need to switch to 'Realistic' mode so that the latitude/longitude/date and time have an impact on the sunrise/sunset of the sun and moon.
    ...but how can I make sure that the sun and the moon are always visible in front of the window?
    In other words, how can I rotate the prefab in real time so that the sun and the moon are always in line with the sun and the moon?

    Thank you for your help!
     
  22. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi,

    There is no way to guarantee this because in Realistic mode the moon and sun will appear in different positions depending on the date and there are also nights when the moon does not appear. Rotating the prefab is not a solution because it causes the entire sky to be rotated including clouds and stars.

    The best option is to find a date when the sun and moon rise and set in line with the window, for example, March 1, 2021 with latitude and longitude set to zero, the sun and moon rise and set almost at same position, so just adjust the window in the same direction and starts from there, you can also set the latitude if you want a sun/moon inclination.
     
    MuntyMcFly likes this.
  23. Jayme65

    Jayme65

    Joined:
    Dec 11, 2016
    Posts:
    94
    Really not achievable!? That would be a pity! I was able to achieve this with Enviro (and the same with TimeOfDay): putting the sky system in a gameobject and attaching it the script below...but I prefer your asset and would like to be able to continue working with:
    Code (CSharp):
    1. public class FaceSun : MonoBehaviour
    2. {
    3.     public GameObject sun;
    4.     public GameObject moon;
    5.  
    6.     private bool isDay = true;
    7.  
    8.     void Start()
    9.     {
    10.         EnviroSkyMgr.instance.OnDayTime += () =>
    11.         {
    12.             isDay = true;
    13.         };
    14.  
    15.         EnviroSkyMgr.instance.OnNightTime += () =>
    16.         {
    17.             isDay = false;
    18.         };
    19.     }
    20.  
    21.     void Update()
    22.     {
    23.         KeepSkyLightFixed();
    24.     }
    25.  
    26.     void KeepSkyLightFixed()
    27.     {
    28.         Quaternion originalRot = transform.rotation;
    29.         if (isDay)
    30.         {
    31.             transform.rotation = originalRot * Quaternion.AngleAxis(sun.transform.eulerAngles.y * -1, Vector3.up);
    32.         }
    33.         else
    34.         {
    35.             transform.rotation = originalRot * Quaternion.AngleAxis(moon.transform.eulerAngles.y * -1, Vector3.up);
    36.         }
    37.     }
    38. }
     
  24. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    Hi again :)

    I'm trying to use DoF with Unity's PostProcess but it blur also moon and stars.
    So I've made a new layer assign it to the Azure and all his children, and excluded from post process layer, but won't work
    upload_2021-10-26_21-29-58.png

    Any advice? o_O
     
  25. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi,

    This doesn't make sense, Azure's prefab and all his children aren't rendered, they are "empty game objects" and are used more for the scripting side. You should find a way to exclude the "skybox" from the PostProcess effects, an option is try something like this on the DoF shader "if (depth == 1) return originalScreenColor.rgba;" if there is not a default option for doing it.


    It seems to me that the effect is working as it should, when the camera focuses on a close object, the background is expected to be blurred.
     
    MaximilianPs likes this.
  26. Linaleee

    Linaleee

    Joined:
    Sep 7, 2021
    Posts:
    1
    Hi, thanks for making such a robust asset – it's been really useful and great for my projects.

    I'm currently running AzureSky in a URP project and I have some materials that use the Universal Render Pipeline/Lit shader with the surface type as transparent. I'm not well versed in shaders or altering shaders, so could you suggest how to add fog scattering support to the built in URP shader?

    The document regarding how to add fog scattering to custom transparent shaders mentioned adding the edits after CGPROGRAM starts, but all my URP shaders start HLSLPROGRAM instead. I'm not sure if or how that affects adding fog scattering to the shader.
     
  27. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi,

    First of all, thank you for using Azure and for the kind words.

    This should not be a problem because the shader structure is the same, only the naming convention used by Unity is different now.

    I haven't tried adding the fog to the URP Lit shader yet, I did it to the Standard shader in LegacyRP and it was a headache to find the right place to use the ApplyAzureFog command because the Standard shader is packed with a lot of includes and derivations.

    I believe the Lit shader structure is much better and easier to edit, but at the moment I can't give you the instructions for adding fog support to it because my computer screwed up burning the video card and also the HDMI output of the motherboard and some other components are running at very low performance. Basically I can now just browse the internet using the vga output and an old low-resolution screen (luckily my CPU has onboard video card). I'm building a new setup and buying new pc parts, but unfortunately we're living in the worst time in history to buy hardware.

    When I get my new computer I'll give it a try and if possible send an update including a copy of the Lit shader edited to support Azure fog.
     
  28. fink1

    fink1

    Joined:
    Dec 17, 2016
    Posts:
    9
    Hi. I would like use this asset for the Oculus Quest 2 app. Is your asset suitable for this purpose? Is there single-pass stereo rendering support?
     
  29. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi,

    I don't have an VR device for testing, so I can't support it right now. Azure should work in VR, but not at the best performance because the support for single pass stereo rendering is missing. There is in the package a replacement pack of shaders edited according to the Unity documentation to support single pass instanced rendering, but I don't know if it works, some users said that it works, other users said it doesn't.

    So if you only want Azure for use with VR, I don't recommend that you get it, consider looking for another option in the Asset Store or get it at your own risk.

    Thank you!
     
  30. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    How does the diurnal variation match the reflection probe? It is usually baked or initialized only
     
  31. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi,

    Have you tried to set the Refresh Mode to Every Frame or to Via Scripting? It will force the probe to be constantly updated, but it will require more performance. With Via Scripting, you can set a refresh Interval to get a better performance.
    RefreshMode.jpg
     
  32. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    Good! How large should the reflection probe area be set?
    Do you still need the original reflection probe?
     
  33. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    How is the weather particle effect range set?
     
  34. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    It all depends on your game design, developers generally place a lot of pre-backed probs everywhere, and it starts to work when the camera gets inside it. Set the area according to the distance you want to see the reflections, I think it does not need to be far away as it is set by default. The advantage of using the Azure reflection probe is that if you attach your main camera to the "Follow Target" field of the time controller component, it will make the particles and the default reflection probe always follow the camera/player wherever it goes in scene, so you wouldn't need to configure other reflection probes in the scene if the Azure one was set to work in real time.


    All the weather/particles parameters are set on the AzureEffectsController component, if you can't set some parameter on the component, it means that this parameter is being controlled and overrated by the weather controller component, so you need to set the parameter in the weather profiles. If you can't find the parameter you want to configure, you need to set it directly in the particle system game object.
     
  35. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
  36. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    Is the lighting setting completely default? I see the example scenario is like this
     
  37. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Virtually all scenes are using the default settings from prefab, only minor differences depending on the scene, for example the GI scene that has the reflection probe enabled. There's a chance you'll also need to do some minor configurations to suit your game.
     
    Last edited: Dec 29, 2021
  38. TaylorCaudle

    TaylorCaudle

    Joined:
    Feb 8, 2018
    Posts:
    158

    I'm running into this issue whenever I the sun rises/goes down, do you know how i might be able to smooth out this "flip" in the directional light? its just a little jarring whenever the time changes, and I was hoping to make it just change a little more smoothly.

     
  39. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    How to modify the skybox style generated by the plug-in?
     
  40. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi,

    I can't see your video here!
    "This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers."

    You need to adjust in the profiles, the curve used to control the directional light intensity. To smooth the flip effect, you need to set the intensity more close possible to zero when the sun is near the horizon line. The directional light changes to the moon direction exactly when the sun cross below the horizon line.


    Hi,

    I'm sorry, but I don't understand what you mean. You can try to modify all the options in the profiles/components and play with the parameters.
     
  41. TaylorCaudle

    TaylorCaudle

    Joined:
    Feb 8, 2018
    Posts:
    158

    Do you know offhand which one of these curves I should be modifiying?
     

    Attached Files:

  42. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    The number "19" (Directional Light Intensity) and I think the number "20" (Directional Light Color) can also do the work.
    DirectionalLightIntensity.jpg
    You should set the curve near to zero in the transitions from day to night and vice versa, as in the image below. You maybe changed the customization of this curve because it's different in your screenshot, it comes by default configured as in the image below.
    CurveSetup.jpg
     
  43. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    I need to set the sky to red in some scenes
     
  44. TaylorCaudle

    TaylorCaudle

    Joined:
    Feb 8, 2018
    Posts:
    158

    thanks that works!
     
  45. TaylorCaudle

    TaylorCaudle

    Joined:
    Feb 8, 2018
    Posts:
    158

    So im just now noticing this new issue, whenever I reload a scene the lighting seems to be breaking, my player' shadows and general lighting/environment lighting seems to break. I cant tell whats causing it, none of the Camera Target values seem to be missing, but if i die or save and have to reload the current scene, when it comes back the lighting is off.

    Could it be related to the reflection probe at all?

    EDIT: NVM this only happens in the editor, not the build. Its related to the Generate Lighting Option.
     
    Last edited: Jan 23, 2022
    robert_val1 likes this.
  46. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    Can the moon show a half moon
     
  47. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Yes, the moon phases are set automatic according to the relative positions of the sun and moon!

    In the Realistic Time System mode, the sun and moon positions are set realistically according to the time, date and location, so the moon phase will be the same as in the real world.

    In the Simple Time System mode, the moon position is set always at the opposite side in the sky relative to the sun, so it will always be rendered as full moon. To change it, you can edit the following line located inside the "Simple Time System" switch case from the "ComputeCelestialCoordinates()" method of the "AzureTimeController.cs" script:
    Code (CSharp):
    1. m_moonTransform.localRotation = m_sunTransform.localRotation * Quaternion.Euler(0, -180, 0);
    More precisely, this part:
    Code (CSharp):
    1. Quaternion.Euler(0, -180, 0);
    By changing the rotation attributes like this:
    Code (CSharp):
    1. m_moonTransform.localRotation = m_sunTransform.localRotation * Quaternion.Euler(0, -120, 0);
    So instead of setting the moon to the opposite side of the sun, it will offset the moon position and consequently change the moon phase.
    MoonPhase.jpg

    I think it should be good to expose it in the Inspector as a slider/vector for a next update, so the user can set it faster or even control it from another script.
     
    Last edited: Feb 6, 2022
  48. Ward101

    Ward101

    Joined:
    Mar 22, 2016
    Posts:
    52
    Just for your info (not a complain).
    Fog Scattering render feature does not work for Unity 2020.3.25, using VR (HTC Vive and SteamVR), URP 10.7 and single pass. Whole packages has been applied (URP and Single pass additional components)
    (I think it worked on 2019, but not completely sure).
     
  49. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Thanks for the information!

    Single Pass Rendering is not a supported feature in Azure.

    As I don't have any VR device for testing, I can't guarantee support for single pass rendering. All I can do is follow the instructions available in the Unity documentation (which doesn't seem to work on all versions of the editor). This is why I don't even promote this information in the asset description, Azure comes with a replacement package (just in case) for the user test if the changes from the Unity documentation will work, but without any guarantee.
     
  50. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    Very useful. I hope to update it soon.