Search Unity

  1. Full schedule for #UniteBerlin is now available! Featuring talks on our roadmap, hands-on labs and much more! Check it out!
    Dismiss Notice
  2. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  3. Scriptable Render Pipeline improvements, Texture Mipmap Streaming, and more! Check out what we have in store for you in the 2018.2 Beta.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. 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:
    2,841
    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:
    340
    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:
    340
    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:
    35
    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:
    340
    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:
    35
    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:
    340
    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:
    402
    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:
    340
    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:
    402
    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:
    13
    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:
    340
    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:
    402
    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:
    340
    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:
    13
    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:
    4
    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:
    340
    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:
    13
    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:
    340
    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:
    28
    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 at 3:01 AM
  26. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    340
    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:
    28
    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.