Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Azure[Sky] - Dynamic Skybox

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

  1. zisiang

    zisiang

    Joined:
    May 16, 2017
    Posts:
    4
    Hi, I have just purchased Azure[Sky] Dynamic Skybox - it looks really good. Love it!

    However, as I am using it on a testing scene in Unity 2017.4, the brightness seem to be too high (Sun too bright as shown in the attachments, which is "1.95" for directional light). I am currently just using Simple Mode. Is there any setting I can manually adjust or reduce the brightness of the directional light's intensity?

    Thank you.
    Zi
     

    Attached Files:

  2. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,122
    You can adjust the sun intensity, but what you really need is to make your camera HDR and add tone mapping. That will give you the best looking results.
     
    DenisLemos likes this.
  3. zisiang

    zisiang

    Joined:
    May 16, 2017
    Posts:
    4
    Thank you so much for the quick help :) Yes HDR and tonemapping works.

    However, there are situations I might want to have the Sun (Directional Light)'s intensity to be lower than 1, but it seems the "sun" in Azure[Sky] Controller prefab does not allow me to manually change the value in it.
     

    Attached Files:

  4. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    Hi!

    You can customize the intensity of directional light from the sun and the moon, but this is not done by the directional lights inspector. You should do this on the Lighting tab of each day profile, you can set a different value for each hour of the day or keep a linear value for the entire cycle of the day. The Azure[Sky] customization properties are almost all curves or color gradients, including the intensity of the directional lights of the sun and moon.
    SunIntensity.jpg

    You can do a different customization on each day profile, this is very useful to create climatic variations. For your development to be more productive, I recommend always keeping the day profile that is being customized defined in the Day Profile field below the calendar, so you see in real time the changes you do in that profile.
    CalendarProfile.jpg
     
  5. zisiang

    zisiang

    Joined:
    May 16, 2017
    Posts:
    4
    Thank you for the beautiful skybox :) I have made some adjustment based on stylized Sunset (duplicated copy). Now waiting for the baking process of baking process of the testing scene!

    Cheers,
    Zi
     

    Attached Files:

    DenisLemos likes this.
  6. Polymerse

    Polymerse

    Joined:
    Mar 6, 2017
    Posts:
    3
    Fog_example.jpg


    Hi guys, we are having an issue where the fog is rendering in front of world canvas UI. Any thoughts on how we can stop this?

    Thanks!
    Ben
     
  7. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    Hi!
    You can define all the UI in a same layer.
    TextInspector.PNG

    And in the camera where you attached the fog effect you just have to exclude this layer from the fog rendering.
    FogInspector.PNG
    This fix will only be visible in gameplay, you will not see effect during the setup, you must press "Play" to see it working.
     
  8. uani

    uani

    Joined:
    Sep 6, 2013
    Posts:
    54
    Hello,

    thank you for Azure!

    I like it very much!

    Using a skydome I observed the night sky milky way becoming "lower res" when the skydome is smaller. Do you have a higher res milky way image available or instructions on how to create one? I would have linked a preexisting photograph here but I didn't find any on NASAs' website(s).
     
  9. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    ew
    There is a panoramic image of the Milky Way created by ESO with a resolution of 6000x3000p. You can try to use this texture, but do not forget that the texture of the Milky Way that comes in Azure[Sky] also comes with the alpha channel where is stored the information of the common stars field used in scenes where the Milky Way is less visible and only some stars appear in the sky.
    Website:
    https://www.eso.org/public/images/eso0932a/
    Direct Link:
    https://upload.wikimedia.org/wikipedia/commons/6/60/ESO_-_Milky_Way.jpg

    You will need to edit the image so that the texture gets a resolution of 4096x4096p and take care so that the texture seams align properly, otherwise as you change the texture import format to Cube, it will not work correctly. This is a difficult process to do, especially if you plan to keep the stars common in the alpha's texture channel.

    A slightly simpler process is to use Panorama to Cubemap to transform the panoramic image into 6 separate images by creating a new cubemap and attaching this new cubemap to the sky controller.

    Panorama to Cubemap allows you to create textures with resolutions up to 1024x1024p, so I'll leave attached the modified Editor script that lets you create the 6 side textures with up to 4096x4096p. But note that the maximum resolution that each cubemap accepts is 2048x2048p.

    PS: If you also need the common stars then you should add them to the alpha channel of each of the 6 textures generated by the Panorima to Cubemap. If you do not need the common stars, then remove the "Star Noise" cubemap from the sky controller to prevent malfunction.

    The process of creating the texture with the stars and the Milky Way is a bit complicated and time-consuming, so if you have more questions don't hesitate to ask.
     

    Attached Files:

  10. uani

    uani

    Joined:
    Sep 6, 2013
    Posts:
    54
    Your linked image and script work wonderful!

    Only slight "issue" is moon and new cubemap moving at same pace. If this is how it is (and I didn't change the cubemap back :| to see how it is with your original) then fair enough :)

    How would I go about adding stars to the alpha channel? Brightness/Whiteness = Alpha(0 - 255) with 255 being full bright/white? And then remove them from the rgb channels?
     
  11. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    In Simple time mode the moon is always on the opposite side of the sun, and when the directional light of the sun rotates to simulate the rotation of the Earth, consequently the moon's movement is the same as the rest of the sky.

    In Realistic time mode, the moon's movement in the sky is equal to the real world, on each night with different date the position of the moon relative to the stars will be different if you always look at the same time.

    In the Options tab of the sky controller you can set a different position for the star field just by moving the sliders:
    • Postion X
    • Postion Y
    • Postion Z


    The alpha channel of the texture of the Milky Way containing the common stars is just a black background with some "white dots"(stars) in random places. You can open with Photoshop or Gimp the Starfield.png texture that comes in Azure[Sky] to better analyze the alpha channel.

    You can use the RGB of the Milky Way texture itself as a reference when adding the white dots in the alpha channel if you want stars and constellations in real positions. I just have not done this yet because I have no knowledge in astronomy to detect the main stars and constellations in the texture.
     
  12. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    483
    Hi @DenisLemos

    A question

    How can I change the color of the fog? I'm using the "realistic" Time mode and the Azure version is 4.2.0

    The profile 0 of the climates which configuration coje, the one of the DayProfile ??

    regards
     
  13. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    The fog color respects the same settings you set in the Scattering tab of each day profile. When you set the sky, you are also automatically setting the fog.

    The same colors that you customize to the sky will also be applied to the fog. The main properties that modify the colors of the sky and fog are "Rayleigh Color, Mie Color and Wavelength RGB".
    • This is the default profile settings.
      Fog1.jpg
    • Now two different settings changing only the Rayleigh Color.
      Fog2.jpg Fog3.jpg
    • And now changing only the Wavelength.
      Fog4.jpg

    The profile 0 of the "Weather Profiles" list is the same day profile defined in the calendar for that particular day. When you call profile 0 from the Weather Profiles list, you are actually calling back the day profile defined in the calendar.
    profile 0.jpg

    Note: When no profile is attached to the calendar on that particular day, then the sky controller will randomly choose one of the attached profiles from the "Standard Profiles" list of the Options tab.
     
    ftejada likes this.
  14. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    483
    Thanks for answering @DenisLemos

    It has not been very clear to me what you say here:

    Can you clarify it to me?

    regards
     
  15. deuxieme

    deuxieme

    Joined:
    Jul 15, 2015
    Posts:
    19
    Hi Denis,

    I purchased AzureSky this morning and think it's a really powerful and easy to use asset. However, I've been poring over the documentation and I can't seem to solve a fairly basic problem-- the Day/Night cycle does not play seamlessly out of the box. At Midnight, there is a noticeable flicker/jump in the colour of the scene. I have been trying to figure out if it's something to do with the gradient curves (EG, the gradient is not looping seamlessly due to some jagged curve) but I'm not sure where to look? Am I on the right track? Any help is greatly appreciated. :) If necessary I can provide more info about my setup, but it's just the unedited Standard Sky prefab in my scene.

    EDIT: How typical, I figured it out just minutes after posting. For anyone else reading, it's because your gradients/curves on Monday don't match the following day. Either make each day profile identical, or set the number of days to 1 under Time of Day tab. That will make it cycle just one day repeatedly and it'll look seamless.
     
    Last edited: May 10, 2018
  16. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    The Standard Sky System allows you to define a profile for each of the 366 days of the calendar (including leap year). In most cases, the user will not attach a different profile to each of the 366 calendar days because this would be very time consuming, so there is the Standard Profiles list in the Options tab to create a collection of profiles that will be chosen randomly when there is no attached profile on that particular day.

    So whenever the timeline passes midnight and the calendar changes to a new day, if this new day does not have a profile attached, a random profile from the Standard Profiles list will be attached to this new day.
    • When you have a profile attached to the current day of the calendar, the Day Profile field in the calendar will turn green and show the name of the profile in use.
      Calendar1.PNG
    • When you do not have a profile attached to the current day of the calendar, the Day Profile field in the calendar will turn yellow and show a message saying that a random profile from the Standard Profiles list is in use.
      Calendar2.PNG
    The Standard Sky System gives the user several work options.
    • Attach to the calendar a profile with a different weather for each day of the year, creating a predetermined year-round climate cycle as in Harvest Moon style games.
    • Attach to the calendar a profile with a different weather only on some special days of the year and on the rest of the days use random profiles from the Standard Profiles list.
    • Forget the calendar profiles and work only with the traditional weather system from the Climate tab. I think this is the most commonly used method.
    • Or even use together all of the work options presented above.
    • There is also the Repeat Mode available in the Options tab, which allows you to repeat the same day, repeat the same month or repeat the same year.


    Hi!
    First of all, thank you for supporting Azure[Sky]!

    I think you should be using version 4.1.2 ?! This version has only 7 different days to customize and I have made the customization of each day completely different to show the customization capability that the asset allows to achieve.

    I recommend you take a look at the new Standard Sky System that comes in the package as a subpackage. Be careful not to import the two versions in the same project, because it will cause conflicts between the versions.

    I think you've already figured out the problem, but you do not have to repeat the same day to make smooth and perfect transitions. This may take a little work, but you just have to set the curves and gradients to start with the same value as the previous day ended.

    In the new Standard Sky System, you can create an unlimited number of day profiles and work with the weather system from the Climate tab of the sky controller.
    ClimateTab.PNG
    The weather system makes smooth transitions from one profile to another and in most cases will eliminate the need to set up each profile with a perfect midnight transition. But you still have to set each profile with the same values at the beginning and end of the day cycle so that the midnight transition is perfect with itself if you want to repeat the same profile every day.
     
    Last edited: May 11, 2018
    ftejada and Akshara like this.
  17. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    483
    Thanks for the explanation @DenisLemos . It is very good the amount of options in this aspect. Very good design!

    I have another doubt that I do not know if it is a bug or that I do something wrong.
    There are times when the moon seems not to be seen at all and I do not know if it is because there are nights, in real life, in which the moon is not seen at all or some configuration fault of mine or azure. I leave video so you can see what I mean.
    If it is because the moon in real life there are nights when it is totally hidden, perhaps it would be good if the intensity of the moonlight in those days were zero.

    It would be too laborious to find those days in the calendar of each day of each year to configure it manually.




    regards
     
  18. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    In realistic time mode, on certain days it is possible for the moon to cross in front or near the sun, depending on the angle between moon, sun and our point of view here on Earth, the light reflected on the surface of the moon does not reach us because the sun is only illuminating the other side of the moon.

    To create the moon's light scattering effect into the atmosphere, I took into consideration only the direction of the moon. This is a complex problem to solve because it is necessary to compare the direction of the moon relative to the sun to know if the moon is near or in front of the sun, and then automatically reduce the moon's brightness in the atmosphere. And the problem does not stop there, it is also necessary to make the intensity of the directional light of the moon decrease until zero to not interfere in the scene lighting.

    I'm going to do some tests and try to find a simple solution.
     
    ftejada likes this.
  19. deuxieme

    deuxieme

    Joined:
    Jul 15, 2015
    Posts:
    19
    Hello there!

    I have a question about the Weather system included with Azure Sky. At certain points in my project, I am running Azure Sky's timeline backwards. This looks great as you watch see the lighting changes as you turn back the clock.

    However, when it is raining, the effect is lost, because the rain's particle system is not tied to the timeline. The rain does not react to the time being manipulated. (EG, the particles do not literally go backwards if rewinding the timeline). Is there any way to forge this connection? Is there an alternate way to achieve this through AzureSky?

    I only want to have to handle changes to AzureSky Controller's Timeline value, and have the particle simulation follow the flow of time realistically.

    Thank you very much for any help you can offer! I am loving the asset.
     
  20. sekever-n00b

    sekever-n00b

    Joined:
    Nov 4, 2017
    Posts:
    22
    Hello!
    Is it possible as idea maybe in the future to make stars twinkle, perhaps using a 3th background as gradient that rotates and like that blinks through transparent places-(stars in this case-(on 2th background)). Ist primitive idea but I dont know any better philosophical method on a cost for preformance.
     
  21. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    Hi!
    I do not know if this is possible with the current Unity particle system, because after the particle is emitted, it maintains for the rest of its life the values defined at the time of the emission. I'm not sure, but I think it's not possible to change the behavior of the particle after it has been emitted, but you can instead change the particle system configuration so that the new particles emitted are created at the bottom and moving to top.

    For example, at the exact moment you rewind time, simply change the Start Speed of the particles to negative values. Or rather, reverse the particle's Transform of the rain, that way the particles will move up.
    In that case, you just need to do the same as in the image below and change the rain Transform...
    from:
    • Position (0, 30, 0)
    • Rotation (90, 0, 0)
    • Scale (1, 1, 1)
    to...
    • Position (0, -30, 0)
    • Rotation (-90, 0, 0)
    • Scale (1, 1, 1)
    InverseRain.png


    Hi!
    If I understood correctly what you wrote, then I think Azure[Sky] already does that. The "StarNoise" texture is used for this, it is a grayscale noise texture that rotates around the sky and is multiplied by the color of the stars, reproducing the stars scintillation caused by the distortion of the light in the atmosphere.

    The Scintillation slider of the Deep Space tab of each profile controls the spinning speed of the "StarNoise" texture. The higher the spin speed, the more visible the scintillation effect will be. This effect is only applied to ordinary stars, the Milky Way is a different layer of stars and it is not possible to use this technique because the stars are very close to each other and the noise map would be noticed and create artifacts.
     
  22. deuxieme

    deuxieme

    Joined:
    Jul 15, 2015
    Posts:
    19
    Hi Denis,

    Thanks very much for your reply! You made good points which sent me on an investigation spree. I found this reddit thread in which the OP breaks down how he is able to make particles go backwards:
    https://www.reddit.com/r/Unity3D/comments/34fckj/i_finally_got_particle_rewind_working_in_chronos/

    In this case, the dev (Ludiq) talking about expanding his asset. However, he did say it is 'ridiculously simple'. What do you think about adding this as a feature to AzureSky? Would it be possible for you? If it is, I would be endlessly in your debt.

    As a sidenote, I know Ludiq is really responsive on twitter and might be helpful in expanding this functionality! Honestly, even aside from my own project, I think this would bring another level of realism and uniqueness to AzureSky that can set it completely apart from other Time of Day assets.
     
    DenisLemos likes this.
  23. banezaklan

    banezaklan

    Joined:
    Dec 5, 2017
    Posts:
    1
    Hello, would it be possible to use the plugin with two cameras in the same scene, but with different parameters?
    We got this scene setup where there are two cameras looking at the same scene, and the screen is split in half. One camera is rendering left side of the screen, the other right side. We need to be able to show different time of day (or night), on each camera (side of screen).
    If possible, how would we need to setup the plugin and the scene to make it work?
     
  24. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    Hi!
    The Standard Sky System allows you to use more than one camera, but you can not have different customizations. The sky controller globally updates the shaders' variables, so even if you use two different sky materials, the sky controller will send the same parameters for both materials. You may want to read this post as well.
     
  25. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    322
    Does Azure[Sky] Lite and Ultimate work in isometric/orthographic as well as perspective view type of games? Also, can it be configured to have different weather set on different areas/zones of a terrain on a single day?

    To explain my requirements further: The player controls several units within a world map and let's say we have two screens: a world map (top view) and a single unit's view (isometric or orthographic view). Each unit travelling on the world map can encounter different weather conditions depending on the area/zone they are in (illustrated by a 2D weather icon on each zone) and when the player's camera switches to a selected unit's view in one zone, the weather/climate is then visibly depicted.
     
    Last edited: May 22, 2018
  26. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    Hi!
    The Lite version has no weather system, only Azure[Sky] Dynamic Skybox comes with this feature. Although both versions have no error in the isometric camera mode, I do not recommend using the system with this camera setting because the sky image may be distorted and the fog, because it is based on the depth buffer, does not identify the correct distance of the objects.

    The weather system is not zoned, but this is very simple for the user to implement since there is only one observer in the scene. Just check if the camera is within a specific area and change the climate according to that area by calling public void SetNewWeatherProfile(int target).

    The climate system is global, that means that if there is another observer in a different place of the scene, it will not be possible to define a different weather for him. You can even use different cameras, but you can not set a different weather for each viewer.

    Overall, I would not recommend using Azure[Sky] with more than one camera unless you know what you are doing and have the knowledge to extend the plugin to your needs.

    In some cases, it will not be a problem to use a split screen as discussed in previous posts, but in other cases, we have limitations of the plugin and even of Unity since it is not possible to define two environment settings in the same scene.

    For example, if a certain area of the scene is raining, you need to set a darker ambient color. But if in another area of the scene is sunny, you need to set a clear ambient color. The problem is that this is not possible in Unity, the environment settings in the Lighting window modify the whole scene and only one of the settings will be possible for both cameras.

    I think the controls in the Lighting window should be an optional component to add to each camera or GameObject, just like the skybox is. This way each camera would render with a different lighting setting. If someone does not know this, you can add a different skybox for each camera from the menu: Component>Rendering>Skybox.

    Currently, it is not worth creating a zone system because you will not be able to use it. At the moment, one of the few cases that it is possible to use a zone system is when there is only one observer in the scene, and as I explained, it is enough to change the weather when the camera leaves from one area to another.
     
  27. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    322
    I understand. But based on my research, Enviro seems to have a weather zoning feature... but Azure[Sky] has nicer visuals and has a way to easily control scene lighting. Then again, Enviro has a Vegetation System. hmm...

    Your suggestion of calling public void SetNewWeatherProfile(int target) sounds like a good solution. I can then just use a database of various weather configuration in the world map that changes from time to time and use that to pre-define the weather before the player/observer enters the zone. Maybe that is how the Enviro weather zoning feature also works. Anyway, I would still need at least a perspective view to work... Thanks for the explanation and honest feedback sir.
     
  28. mike_kennedy989

    mike_kennedy989

    Joined:
    Feb 5, 2014
    Posts:
    51
    I am getting shadow jitter, the shadow and moving when in play mode.

    I love this so far, only thing that's stopping me from putting Azure into production is the shadow flickering / jittering
     
  29. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    The sky controller only rotates, defines the intensity and color of the directional light. If the shadows are flickering when the directional light moves, it may be the quality setting.

    I do not know if what you described is the same as an old case that was fixed by changing the latitude and longitude to a value other than 0.

    If the problem really is in the shadows, it may not be related to the directional lights, but the shaders that project and receive the shadows.

    But if you think it is the rotation of directional light that is causing the problem, you can change in the sky controller update and implement a simpler rotation system that suits your need.
     
  30. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    153
    Hello there, I've a problem:
    I'm reconstructing in Unity my town but unfortunately, for an optical effect, here the sun rise from Right (south) and Set on the left (North).

    upload_2018-6-10_15-8-6.png

    (Pesaro, Italy: https://www.google.it/maps/@43.9573232,12.6499798,11z )

    So, I need to reverse the sun motion.... is it possibile?
     
  31. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    Hi!
    That's a good question!

    I presume you're using Realistic time mode, and you want to make the sun and moon cross the sky of your city just like in real life. Well, if you set latitude, longitude, time zone, date and time correctly, then the sun's path should already be accurate.

    Reverting the movement of the sun is not the best choice, perhaps the direction of your city is not properly aligned with the 3D space of the scene. A very basic way to find out which direction the north is, is to open the arms laterally pointing your right arm towards the rising sun and the left arm towards the sunset, then your front will be the north and your back will be the south.

    Azure[Sky] is correctly aligned with the Unity 3D space. If you drag the sky prefab into an empty scene, switch to Realistic time mode and set latitude and longitude to zero, you will realize that the sun will rise at the right side and it will set to the left side of the scene. You can make the same comparison with a default camera direction.

    You can rotate your city to align the actual north of the city with the north of the scene, but I know this in some cases can be a headache, although I find this the most correct practice to do. A better solution is to make a simple change in the code snippet that controls the rotation of the sun's and moon's directional lights when Realistic time mode is selected.

    Just change this lines of code from Update of AzureSkyController.cs:
    Code (CSharp):
    1. //Set Sun and Moon positions.
    2. switch (timeOfDay.timeMode)
    3. {
    4.     case 0://Simple Time Mode.
    5.  
    6.         break;
    7.  
    8.     case 1://Realistic Time Mode.
    9.         //Sun and Moon position.
    10.         m_sunRealisticPosition = timeOfDay.SetRealisticSunPosition ();
    11.         sunTransform.transform.forward = m_sunRealisticPosition;
    12.         m_moonRealisticPosition = timeOfDay.SetRealisticMoonPosition ();
    13.         moonTransform.transform.forward = m_moonRealisticPosition;
    14.         //Matrix.
    15.         Quaternion skyRotation = Quaternion.Euler(90.0f - timeOfDay.latitude, 0.0f, 0.0f) * Quaternion.Euler(0.0f, timeOfDay.longitude, 0.0f) * Quaternion.Euler(0.0f, timeOfDay.lst * Mathf.Rad2Deg, 0.0f);
    16.         break;
    17. }
    To this:
    Code (CSharp):
    1. //Set Sun and Moon positions.
    2. switch (timeOfDay.timeMode)
    3. {
    4.     case 0://Simple Time Mode.
    5.  
    6.         break;
    7.  
    8.     case 1://Realistic Time Mode.
    9.         //Sun and Moon position.
    10.         m_sunRealisticPosition = timeOfDay.SetRealisticSunPosition();
    11.         sunTransform.transform.forward = sunTransform.transform.parent.InverseTransformDirection(m_sunRealisticPosition);
    12.         m_moonRealisticPosition = timeOfDay.SetRealisticMoonPosition();
    13.         moonTransform.transform.forward = moonTransform.transform.parent.InverseTransformDirection(m_moonRealisticPosition);
    14.         //Matrix.
    15.         Quaternion skyRotation = Quaternion.Euler(transform.InverseTransformDirection(90.0f - timeOfDay.latitude, 0.0f, 0.0f)) * Quaternion.Euler(transform.InverseTransformDirection(0.0f, timeOfDay.longitude, 0.0f)) * Quaternion.Euler(transform.InverseTransformDirection(0.0f, timeOfDay.lst * Mathf.Rad2Deg, 0.0f));
    16.         break;
    17. }
    Ps: I've removed some unrelated lines of code to make it easier to understand.

    This turns the transform.forward to local and the directions of the lights of the sun and moon will be relative to the rotation of the parent object.

    Now just what you need to do is rotate the y-axis of the sky controller to adjust a new north until it aligns with the north of your city.

    Below are two images:
    • The first one has no change in the rotation of the sky controller. Notice that the sun is rising on the right.
    • The second I set the y-axis of the sky controller to 180, so the sun is now rising on the left side of the scene.
    • You can control the rotation of the y-axis of the sky controller to make the sun rise in any direction of the scene, this approach is easier than rotating an entire city.
      North1.jpg North2.jpg
    I hope this has helped!
     
    Last edited: Jun 11, 2018
    MaximilianPs likes this.
  32. RendermediaUK

    RendermediaUK

    Joined:
    Jan 14, 2015
    Posts:
    1
    Hi there. I'm having some issues with the plugin, but its possible I've just missed a setting somewhere. Currently when I press play, in the Climate tab the weather starts transitioning straight away and just turns the sky black after a short time. I've tried some fixes, but this happens if I repeat day, remove all other profiles, add the same profile a number of times into the weather profiles tab, change the day profile and day etc. Each time no matter what I do it just transitions to black after a short time. Is there something I'm missing?
     
  33. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    Hi!
    I'm trying to reproduce the problem but I did not quite understand the process you did.

    The only way I can imagine for the sky to turn black during the transition is if some profile is missing, then the values for each property become zero. Make sure the calendar has a profile attached to the selected day.
    • When a profile is set for the selected calendar day, the "Day Profile" field shows green.
    • When you do not have a profile set for the calendar day, the "Day Profile" field should turn yellow. This is to advise that the selected day is using a random profile from the "Standard Profiles" list located in the "Options" tab.
    • If the "Day Profile" field shows red, it means that the sky controller could not find a profile in the "Standard Profiles" list to set to the calendar day. Probably the "Standard Profiles" list does not contain any profiles, removing profiles from the "Standard Profiles" list located on the "Options" tab was the only way I was able to make the sky go black during the transition. Check if this is not the cause of your problem.
    If you are sure that everything is set up correctly.
    • See if the sample scenes work without the problem.
    • Try deleting the package and download again.
    • Import the package into a new empty project.
    • Avoid creating a new profile from the "Create> Azure[Sky] Dynamic Skybox> New Day Profile" menu because the profile is created with all properties reset. Instead, select an existing profile in the project and press the "Ctrl + D" keys to duplicate the already configured profile.
     
  34. MarcoT

    MarcoT

    Joined:
    Sep 22, 2017
    Posts:
    2
    Hi @DenisLemos

    compliment for the very interesting asset and i would to buy it but i've a question:

    i'll use this asset on virtual reality environment (Unity 2018.1), using HTC and Oculus helmets, is it compatible with VR platforms ?

    Thanks in advance
    Marco
     
  35. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    153
    Can Azure Sky be Used also for cartonish hand painted environment?
     
  36. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    Hi!
    I do not have a VR device to test, but some users have already reported that it works, but I do not know what kind of devices they used and whether it works on all devices.

    I also followed all the steps instructed by Unity to make the fog effect compatible with Single-Pass Stereo Rendering, but unfortunately, I could not test to see if it really works.



    Absolutely!
    The Standard Sky System fits well with various graphics styles, especially with cartoon graphics.

    The Precomputed Sky System is recommended for more realistic graphics, especially as it requires more performance. Azure[Sky] Dynamic Skybox comes with both sky systems included in the same package.

    Onirism and Raft are examples of games with cartoon graphics that make good use of Azure[Sky].
     
  37. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    153
    Thank's tonight I'll purchase your asset, but I was thinking about clouds like this one


     
  38. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    The moving clouds do not produce this effect, maybe the static clouds can get something like that, but I cannot guarantee that.

    I just opened in Photoshop one of the textures available in the package for the static clouds and I applied some artistic effects and the result was this:
    • This is the original texture used in the static cloud shader.
      Cloud1.jpg
    • These are the same texture with some artistic effects added in Photoshop.
      Cloud2.jpg Cloud3.jpg Cloud4.jpg Cloud5.jpg
    To create the textures compatible with the static cloud shader, just follow this explanation: post #499

    Static Clouds have not yet been implemented in the new "Standard Sky System", only the old standard sky system and the "Lite" version have static clouds.
    PS: The old standard sky system of version 4.1.2 is also included in the "Azure[Sky] Dynamic Skybox" package.

    Another alternative is to turn off Azure clouds leaving only the sky in the background and create your own cloud shader with a transparent mask. You can even use the Azure Output System to update shader variables.
     
    MaximilianPs likes this.
  39. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    153
    Thank you Denis
    I'll do some test. :)
     
    DenisLemos likes this.
  40. SergeantBiscuits

    SergeantBiscuits

    Joined:
    Jul 22, 2012
    Posts:
    10
    Hello Denis, et all!

    I purchased Azure[Sky] for a sailboat navigation game I am working on, and I am absolutely in love. Such a powerful and cool asset! Thank you very much for all the effort you've put into it.

    I am wondering if it is fairly simple to change the 'orientation' of the system? That is, to change the relative 'up' direction, by just rotating a reference matrix or something along those lines? My game has a spherical world, and so the 'up' direction of the world can be in any direction depending on where you are on the 'planet.' I am comfortable modifying the code of Azure[Sky] to do this.

    I've tried rendering the skybox on a separate camera, which does work 'sort of,' but many of the effects in Azure[Sky] seem to fail when all the components aren't in the same reference space.
     
  41. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    Hi!
    First, thank you for purchasing Azure!

    Sorry for the delay in replying, although it sounds simple, this is a very complex feature to do and Azure[Sky] was not properly designed to be used on spherical worlds. So I first had to do some testing to make sure it was possible or not.

    Honestly, I did not think that would be possible due to the way Azure works. But anyway I decided to try and was surprised when I was able to implement this feature without breaking the sky system.

    It took me several hours to do this implementation, so it would be better if I sent you the scripts and shaders that were changed by private message than writing an instruction book here in the forum.:)

    How to use:
    • For now the feature has been implemented only in the "new Standard Sky System". The "Precomputed Sky System" is being rewritten and this feature will be added in the future.
    • If you are using "Shader Mode" as "Vertex Shader - Skydome", you need to make sure the skydome is of an appropriate size. The size of 1000x1000x1000 is enough, never set a size larger than the camera's far clipping plane, otherwise, the skydome will not be rendered.
    • The feature apparently works on all sky controller settings, so far I have found no restrictions.
    • The orientation of the entire sky system is based on the rotation of the sky controller. Then just edit the prefab rotation by Inspector or update the up direction by a script like this:
      Code (CSharp):
      1. using UnityEngine;
      2. using UnityEngine.AzureSky;
      3.  
      4. public class SkyOrientation : MonoBehaviour
      5. {
      6.     public AzureSkyController mySky;
      7.     public Transform myOrientaion;
      8.    
      9.     // Update is called once per frame
      10.     void Update ()
      11.     {
      12.         mySky.transform.up = myOrientaion.up;
      13.     }
      14. }
    • Even the sun and moon elevation used to control the curves and gradients is based on the orientation of the sky.
    Since I have no spherical terrain to test, I rotated the terrain of my scene and changed the rotation of the sky controller to adapt to the terrain's orientation, simulating what it would look like in a spherical world.
    • One of the cool things is that the height fog effect has been rewritten to adapt to the orientation of the sky.
      Sky1.jpg Sky2.jpg
    Note: When you change the orientation of the sky, the time of day will remain the same, you can create a location system to calculate the time zone and pick up the coordinates of your spherical terrain and apply for latitude, longitude, and UTC of the sky controller. This way the changes in the sky during the locomotion of the player around the world will be much more visible, realistic, and precise.


    With this new feature, it is also possible to modify the relative north and south directions without the need to rotate the scene, as discussed in some previous posts. So if someone also needs these scripts and shaders and does not want to wait until the next update, just send me the request with the invoice number via private message.
     
    Last edited: Jun 20, 2018
    Akshara likes this.
  42. SergeantBiscuits

    SergeantBiscuits

    Joined:
    Jul 22, 2012
    Posts:
    10
    Denis, I cannot even begin to explain how awesome you are for knocking this feature out so quickly and professionally. I fully expected an "I will look into it for a future release," not a "here, let me spend my whole evening doing this right now." Completely next-level.

    I dropped in your new files package and it seems to be working completely as expected... I'll report any bugs I find, but so far it seems completely functional. Thank you so much!

    Beautiful sunrise and fog scattering...


    ...at 90 degrees sideways!
     
    Last edited: Jun 21, 2018
    Akshara and DenisLemos like this.
  43. saru15

    saru15

    Joined:
    Jan 20, 2015
    Posts:
    3
    Hi Denis,
    For some reason I'm not able to find the email support for you guys and I've look at your asset in the store it looks great but there is no mention of platform support in the description.
    I'm developing VR application for mobile where I would like to try your asset but before purchasing I would like to ask whether your azure sky asset support the mobile platform or not.
    Thanks.
     
  44. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    Hi!
    Sorry, but Azure[Sky] is not recommended for mobile. It even works on mobile devices, but not with the proper performance, so I do not recommend any of the Azure[Sky] versions to be used on mobile devices.
     
    Last edited: Jun 25, 2018
  45. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    Azure[Sky] Dynamic Skybox v4.2.3
    Sunset.jpg

    Standard Sky System Improvements:
    • Added a new feature to change the relative up direction of the sky. Now the up direction of the sky will change according to the rotation of the sky controller making it possible to use the sky in a spherical world. Also with the same feature, it is possible to change the cardinal points of the sky just by rotating the y-axis of the sky controller.

    • Added the "Planet Radius" property on the Options tab of the Sky Controller to compensate the planet's circumference when using the height fog in a spherical world.

    • To avoid the risk that a script with the same name already exists in the project, the class and script name "SoundFX" changed to "AzureSkySoundFX".


    As discussed above, this new feature allows you to change the orientation of the sky, further increasing the usability of the asset.

    I found an error in the calculating of the height fog in the modified files that I distributed by private message to be used temporarily until this update. When the camera reaches a negative height in the global world space around the spherical world, the height fog does not work as it should, so with this update, the problem will be fixed.

    Another issue is that the height fog was originally made to be used on flat terrains, the Start Height and End Height are relative to the global position (0, 0, 0) of the scene without taking into account the radius of a spherical world. To work around, the "Planet Radius" property has been added on the Options tab of the sky controller to compensate the Start Height and End Height when working with spherical worlds.
     
    Last edited: Jun 28, 2018
    Akshara likes this.
  46. JonasPersson

    JonasPersson

    Joined:
    Aug 14, 2016
    Posts:
    65
    Hi!

    Im having some issues with the Environment reflections being completly black. Im using Azure as skybox.

    Its a vr project. It works until i push play then it goes black. From a lot of testing it seems like its related to the scene(i removed everything from my scene and it still went black). Although, the reflection works in an empty scene but not in mine. But the scene settings (lighting) of my scene is default, every setting.

    Any suggestions?
    i would like to still use skybox

    Im running unity 2017.1.1.

    Another question, the sun and the halo is very big, i tried every setting but couldnt really get the sun (and its really white soft halo) any smaller without lowering the overall exposure. Is it possible to get a smaller sun? more the size like in the unity standard sky?

    Thanks!
     
  47. JonasPersson

    JonasPersson

    Joined:
    Aug 14, 2016
    Posts:
    65
    Another thing :)

    It would be super nice if the asset could make it whithout having a main camera active in the scene. Now its spamming errors.

    NullReferenceException: Object reference not set to an instance of an object
    UnityEngine.AzureSky.AzureSkyController.Update () (at Assets/Azure[Sky] Dynamic Skybox/Scripts/AzureSkyController.cs:287)

    Thank you!

    Great asset otherwise!
     
  48. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    387
    • Check in the Options tab of the sky controller if the reflection probe is enabled, for performance reasons this option is disabled by default.
    • Check in the Lighting window if the Auto Generate option is active. Otherwise the lighting will not update on materials that use the default setting.
    • Check if the "child reflection probe" of the sky controller is configured correctly.
    • If you are using other reflection probes, make sure they are also correctly configured to render the skybox.
      The Azure[Sky] reflection probe is configured by default as follows: Note that Clear Flags is set to Skybox.
      ReflectionProbe1.jpg
      This is what happens if Clear Flags of some reflection probe is set to Solid Color. The scene turns black.
      ReflectionProbe2.jpg
    • See the GI example scene. If the asset works in this scene, then it should work on all other scenes if they are properly configured.

    I assume you're using the latest version of the Standard Sky System.
    • In the Options tab of the Sky Controller has a slider to control the size of the sun disk.
    • To reduce the brightness around the sun, you can set the Mie property on the Scattering tab of each day profile.



    You can be sure it does!:)
    If Follow Active Main Camera is checked in the Options tab of the sky controller, then it is assumed that you have a camera tagged with the MainCamera tag. If you do not have any cameras with the MainCamera tag, disable this option so that the error message disappears.

    I advise you to keep this option enabled and tag your camera with the MainCamera tag if you want to use the particle effects. Otherwise, when you move the camera, you will leave the area covered by the rain particles effect.
     
  49. JonasPersson

    JonasPersson

    Joined:
    Aug 14, 2016
    Posts:
    65
    Hi!

    Thanks about the Follow Main camera option, it worked!
    It doesnt make any difference if you use the skybox option anyways, right?

    As i mentioned i want to use Skybox, and use it as my ambient reflection.

    The problem with using one Huge reflectionprobe to cover the whole scene is that it doesnt work with other reflectionprobes in the scene. It takes over everything. While the environment reflections (skybox in this case) is just used as fallback if there is no reflection probe around.

    But now i can use skybox!,It was the Auto generate button that Was the problem, thanks!
    Why is this setting connected with the ambient reflections? Super strange.
    If you know more about this please explain.
    one thing i wonder. What do you mean by "Materials using default setting" here?.

    About the sun size, the Mie property was the setting i was after Thank you!
     
  50. JonasPersson

    JonasPersson

    Joined:
    Aug 14, 2016
    Posts:
    65
    I just realized, now i have the Azure skydome as My "Environment reflections".

    But its not updating anymore its always daytime in my environment reflections. Can you get unity to update its environment reflections from the skybox every frame? feels like im soo close now...
    :-(

    I did some research, but is there at all a solution to this? Getting the unity environment reflections to update at runtime? Or are you stuck with using a giant reflectionprobe, (witch does not work very well with other probes)?
     
    Last edited: Jul 3, 2018