Search Unity

Graphics Azure[Sky] - Dynamic Skybox

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

  1. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Thanks Gary!

    I'm collecting information to choose the best way of doing procedural clouds. I also want the clouds to work directly in the skybox, without the need of using a skydome mesh.


    I made a simple tutorial showing the creation of clouds for use in azure[Sky].
    This video is divided into 3 parts.

    1 - Creating the luminance of clouds in Terragen. 0.0 >> 07min 55sec
    2 - Editing the textures in Photoshop. 07min 55sec >> 11min 38sec
    3 - Importing to Unity and showing some customizations. 11min 38sec >> 21min 45sec

    The cloud created in the tutorial did not look good, to make the cloud look realistically would need to use the node editor, but it would take a long time to video. The quality of azure[Sky] cloud will depend largely on the quality of the rendering. The point of the tutorial is to show how the texture is created.

    I dont know speak in English, so I put comments in the important times.
     
  2. S_Darkwell

    S_Darkwell

    Joined:
    Oct 20, 2013
    Posts:
    320
    @_7stars: Thank you so much for that! I look forward to having a chance to watch it this weekend!
     
  3. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Looks awesome. I'm sure it will become best sky cycle on asset store.
    Just one question, is there any options for changing fog or sky or ambient color?
    For example I need an ambient light color on the day and another color on the night
     
    Last edited: Nov 25, 2015
  4. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    The fog and the sky are fully customizable in the day, night and sunset.

    Do not have an option to change the ambient color, but it is simple to implement a future release. It is also possible to change the ambient source to Skybox because azure[Sky] works directly in the skybox.
     
    ksam2 likes this.
  5. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    azure[Sky] also is amazing in games with simple graphics!

    Screen shoot of azure[Sky] with Simple Town.
     
    ksam2 likes this.
  6. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    The image that inspired me to do azure[Sky].

    I tried to reproduce the image above using azure[Sky], Synty Studios assets and Gaia.
     
    SAOTA likes this.
  7. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Wait, so it doesn't set the ambient of the scene automatically? How can you have a day/night cycle without that.
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    @_7stars you might want to check out http://blogs.unity3d.com/2015/11/05/awesome-realtime-gi-on-desktops-and-consoles/ which has a pretty good method for setting ambient. This is the method we use because it avoids readback from GPU, which is essential for console or VR games.

    Speaking of which I hope you continue work. This is becoming a good choice for our PS4 title due to speed. A bit more speed some more care over the animated clouds (animation is really quite essential) and it becomes a special asset! nice work.
     
    DenisLemos likes this.
  9. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Will be implemented, do not worry. I just forgot.

    Thanks for the article.

    After I finished making all the settings of the current version. I plan to make a version for use with Skydome and write everything I can in the vertex shader. If this works will greatly increase performance. For now almost everything is calculated in the fragment shader to work well with the skybox.
     
  10. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    If currently it cannot effectively self-manage scene ambient and reflections natively, it isn't usable for anything other than screenshots of pretty sunsets. Additionally, transparent effects such as smoke play in front of it at all times. Unless you're planning on pushing an update that addresses these concerns in the next 48 hours, honest/unfavorable review or refund my man, those are your options.
     
  11. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Sorry my English is bad. But if I understand correctly you are trying to coerce me to implement a feature you want in exchange for not making a bad review. If so, this kind of attitude does not work with me.

    Be patient it will be released soon, it has been implemented. Soon after Ksam2 have asked about it I started to implement this feature and it's already done, I just need to upload it to the Asset Store. But it also has other features that I'm ending to implement and want to make them first.

    I did as @ksam2 commented, is possible choose the ambient source and control the color and intensity at sunset, noon and night.
     
    ksam2 likes this.
  12. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    That's good to hear that you're implementing that. It's one of a few things that need to be done, such as adding the same functionality for reflections. Probably in some time it'll be a comparable alternative to other more well known systems, but if you want to sell it right now, then the "right now state" is also how it's going to be reviewed. I was simply giving you the option to say "I agree that it isn't completely functional and would prefer to avoid having it reviewed in its current state.".
     
  13. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    That doesn't read like a friendly "Admit your mistake and we're fine". Based on this and your post in sonicether's GI thread, you seem to have an interesting sense of entitlement.
     
    DenisLemos and S_Darkwell like this.
  14. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    It's not the best sky cycle on the Unity. it's the best sky of whole games industry! even better than GTA V sky... thanks man you're a genius.

    I never thought that could be so awesome!
     
    Last edited: Dec 3, 2015
    DenisLemos likes this.
  15. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    And your basis for why this is better than Time of Day, or any other sky system (let alone GTA) is... what exactly? Still images?

    If it actually integrated fully with one ocean system out there, such as CETO or Playway, not only would I not be wanting a refund, I'd actually pay him more. But the issue is that all of these guys seem to have one thing in common, and that's that they design their products in a vacuum instead of supporting other common products that will undoubtedly be used in conjunction with it. If the common buyer looks at a product like this on the asset store and finds out that, pretty as it may be, they'll have to choose between having a sky or having actual water in their game, they won't waste their money on it.
     
  16. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Thanks ksam2. I'm glad you like it. Your request made in the post # 53, as I mentioned above has already been implemented. Is occurring server error at the time of upload to the asset store, until everything returns to normal will not be possible to send an update.
    I planned to add a feature that would give the option to the fog ignore certain layers of objects. But it did not work as I wanted, I'll try to do it any other way. So I will release an update with only the changes made to control the ambient.

    Some of your point of view are right and I will use them as constructive criticism to improve my asset, but most of the things what you say sounds like a big nonsense.

    I do not like being rude to the people, especially if they are my customers. All comments you wrote seems to have been with the intention to devalue and denigrate the asset. Looking at your history of postings, it is possible to note that you write the same in topics of other assets. It seems that you have purchased various assets and is frustrated by not being able to make them work.

    I respect your opinion to prefer other sky systems, but if you say that azure[Sky] is useless and that other sky systems are better, why the hell then bought azure[Sky]?
    In the first post has 10 demo scenes and lots of information about the package, the topic itself serves to ask questions before buying and also has the support email. All this is for you to decide whether or not to buy the package. But it seems that all this information added to his certainty that other sky systems are betters, even so you decided to azure [Sky]. Or you are lost or you're with the worst of intentions.

    Not be compatible with water system of others developers is not an defect of azure[Sky] or any other sky system. It is an illogical thought to want that a sky system must be made to interact with water. The water has no influence on the appearance of the sky.
    The water system must interact with the ambient around it and not vice versa. If the water interact with the rest of the environment you can use a simple skybox or a dynamic sky that you'll get a good result.. Now if the water does not interact with the changes of the environment, you can order a sky system developed by NASA that even so you will not get the expected result.

    An example is the shader FXWaterPro of the Unity Standard Assets. As can see in the picture below, when used with azure[Sky] does not work correctly.
    I just made a small change in shader to draw it to the depth buffer. As can see in this another image, now the water is affected by the fog and the horizon looks better.
    This means that the problem no is in the azure[Sky] but in the water shader.

    azure[Sky] and any other sky system, work exactly on the way that is expected them to work. If your water system does not work as you want, you are dumping all their frustration on the wrong topic.
     
    ksam2 likes this.
  17. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    I think Azure is more principled than Time of Day or any other sky cycle, specially fog with the Azure looks pretty cool

    There is just one issue I have, fog looks pretty on Gamma mode but on Linear it doesn't looks same as it is on Gamma! Is this a known problem or am I wrong about this?
     
  18. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Version 2.0.1 was submitted for approval. This release has been added support to control the ambient.

    Yes, it has some glitches in color space conversion that need to be corrected. When using the linear color space is preferable to disable the "Linear Fog" option in the Fog tab. Also change the "Color Space" option in the Options tab to "Linear To Gamma".

    I am making some changes in the shader. The problem is almost solved, but the image is getting a little darker than it should be.
    This is an image of Gamma color space.

    And this is an image in Linear color space. As can be seen the image is slightly darkened. The "Global Color" variable is causing it, but I do not know why. The code seems to be ok.
     
    ksam2 likes this.
  19. Z43D

    Z43D

    Joined:
    Jan 2, 2013
    Posts:
    100
    I love the look of this system, your atmospheric scattering & clouds are particularly impressive. One thing I noticed though - When looking straight up in your demo, you can clearly see the cloud textures animating and it gets a bit blurry/nauseating. It isn't nearly as easy to notice from other viewing angles. I understand that the clouds you have implemented took quite a bit of time to render...what would be the best way to remedy this effect?
     
  20. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    This is because I render the animation with a very large displacement. As the cloud becomes with very different position from one frame to another, a transition is made to make smoother animation using the "Lerp". For this reason in the middle of transition shows a blend of each frame giving the impression of a blurred effect.

    To correct or reduce the blur, will be necessary render an adjacent frame for each transition. Or decrease the displacement of clouds.
    For this so I'll have to make a new animation. As I mentioned in a previous post, I plan to redo the animation after that I get a more realistic cloud.

    This may take some time due to the time it takes to render the entire animation sequence. And also because I am not an expert in the tool I use to render the clouds.

    I can inform you when this is done, then you may decide to purchase or not the package after testing. And the package price will be the same, I do not intend to increase the price in the future.
     
  21. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    How would one go about getting the time of day whilst it's running? I also want ambient light control, what would be very cool is if Azure auto matches the ambience as the day passes without any need for constant tweaking of the 3 colors used. Otherwise gradient curves are fine.
     
  22. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    In version 2.0 has a method called "GetTime ()".
    Code (CSharp):
    1. // Get "Time of Day""
    2.     public float GetTime()
    3.     {
    4.         float  angle = SUN.transform.localEulerAngles.x;
    5.         return angle / (360.0f / 24.0f));
    6.     }
    Testing this method now, I noticed that lacked add up to six more hours in the result to sync with the sun's position.
    Code (CSharp):
    1. // Get "Time of Day""
    2.     public float GetTime()
    3.     {
    4.         float  angle = SUN.transform.localEulerAngles.x;
    5.         return (angle / (360.0f / 24.0f)) + 6.0f;
    6.     }
    In version 1.5 this method is not present, but only just copy it to the control script.

    You can use this method at runtime. An example:
    Code (CSharp):
    1. void OnGUI()
    2.     {
    3.         GUI.TextField(new Rect(10,10,250,250),"Hour:" + GetTime().ToString());
    4.     }
    Recalling that it will only be returned the hour, if you also want the minutes I can make a change.

    About ambient control, it has been submitted for approval in Asset Store. I did as follows.

    I did it very simply. It is based on the sun's position and the color setting will automatically change based on these three colors.

    But I agree that using a gradient color will be better. I can switch to a gradient with no problem.
     
    ksam2 likes this.
  23. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    Thats great 7 Stars, I'm still working with 1.5 so probably why I missed, I've tweaked the scripts a little so not jumped to 2.0 yet, suppose I'll wait for 2.1 ;). With some tweaking and the get time calculation I should be able to do some nice stuff with time now thanks.

    I have one other question and that is being able to retrieve the position of the Sun in WorldSpace so I can move a 3d object that is aligned with the sun (custom flare in this case). Sorry for the maybe basic question but my Vector math's is still growing. I know principally I need work out the angle of the sun from the camera and then project the object away from the camera in that position. Just not sure how to do this? :) great support 7 Star, Cheers.

    Edit
    Ah, I see the sun angle is returned by GetTime. I think this may be what I need for the above.
     
    Last edited: Dec 4, 2015
  24. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    @Beloudest

    If I understand correctly.
    The best way would be you create an empty object, make this object child of the sun and move it away. Thus when the sun rotate, the child object will also rotate by using the sun as a pivot point. Then just take the position of this empty object and use to what you need.

    If you look at the demo scenes of the version 2.0 will notice that has two empty objects, one of them is child of the sun light(the "Sun Shafts") and the other is child of the moon light(the "Moon Shafts"). These two objects are used for a similar purpose, but in this case is to serve as a caster for the sun and moon shafts image effects.

    [Edited]
    If you only want the direction of the sun, then simply use Transform.forward.
    Exemple:
    Code (CSharp):
    1. angle = SUN.transform.forward;
    2.  
    3. //     or      //
    4.  
    5. angle = -SUN.transform.forward;
     
    Last edited: Dec 4, 2015
    Beloudest likes this.
  25. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    This is a generalisation that is hardly true in every case. For example the author of Ceto published an update that dealt with reflections of the Time Of Day sky on the water being too bright. I see asset authors responding positively to compatibility issues with other assets all the time.

    In some other cases, there are complex technical issues that prevent the authors from offering trivial solutions to certain problems. Sometimes solutions can be found, sometimes it takes both assets authors to come together to fix a problem, sometimes just one of them needs to make a change.
     
    DenisLemos likes this.
  26. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Cool man, Cooooooooooooool

    I think it'll be better if you make sun directional light intensity a bit more like 2.5 or 3!
    I don't understand why you should Upload previous version too!!! it just make asset bigger and harder for Upload-Download
     
    Last edited: Dec 5, 2015
  27. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    I can place an adjustment to the intensity and color of directional light like what was done to the ambient control.

    I always used the 5.0 version of Unity to make the package compatible with all releases of Unity5x. Now I am using the 5.2 version and has noticed some differences in ambient control of "Lighting" window. Some controls use different values now, I will make some changes according to the latest version of Unity available.

    Version 2.0.1 has already been submitted, so I'll make these modifications in version 2.0.2.

    Version 1.0 I'm thinking of removing from package because it seems that no one uses it. But version 1.5 has yet users and also has a different visual graphics that can be used in a game with different style.
     
    ksam2 likes this.
  28. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Version 2.0.1 is available.

    The setting values are consistent with those allowed in version 5.0.0 of Unity. A example is the ambient intensity control that is between 0-1 and in the latest version is between 0-8. But that does not seem to greatly affect the outcome. I will update these values according to the latest release of Unity.

    To version 2.0.2 I will create a section only for customizing the ambient, light and reflections as suggested by DivergenceOnline and Ksam2.
    Improve the ground color of night sky. Currently has a color tone close to brown, which is not very good, it affects the fog when seen in an aerial scene making the fog with the same look in the floor area.
     
    Last edited: Dec 30, 2015
    ksam2 likes this.
  29. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Can't wait for 2.0.2 :)
    Can you please do the same with moon directional light? cause we need to setup directional light intensity and color at the night time too.
     
    DenisLemos likes this.
  30. JohnML

    JohnML

    Joined:
    May 24, 2013
    Posts:
    11
    Way back in this thread, maybe around v1.5, you didn't recommend this product for mobile. How about now with the latest version? iPhone 6+, iPad Air, etc ...?
     
  31. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Yes, the directional light of the moon will also be done.

    I do not know the iPhone 6 processing power, but I would not recommend using dynamic sky in a mobile game. You may find in the store some dynamic sky package that works on mobile, but I believe it will suck most of the game performance and when putting other game elements possibly the performance will drop dramatically.

    Honestly for a mobile game I recommend you use most of the processing on the main elements of the game, although in an open world game the sky is very important for realism of the scene, on mobile devices I think it is still far from we can use a dynamic sky. The most correct would you use a still image for the skybox and leave most of the processing to other elements of the game.
    A package that looks good and has many images to use in the skybox is this:
    https://www.assetstore.unity3d.com/en/#!/content/10109

    Currently I am on a team in a game project for mobile devices, this game will not use a dynamic sky but a simple static skybox. I'm developing a fog that will blend with the sky on the horizon according to the image of the skybox. If the result is good, I will make available free at asset store.
     
    Last edited: Dec 11, 2015
    ksam2 likes this.
  32. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    I agree! why someone should use such an asset for a mobile game? let count on this for high end games
     
  33. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    Do you use Terragen for animated clouds? Not sure how that's possible? Maybe you use something else for this? Thanks.
     
  34. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Yes, I use only the Terragen. If you need I can send you the ".tgd" file to edit and see how it's done.
     
    Last edited: Dec 18, 2015
  35. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    That would be great :)
     
  36. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    I hope more people will buy this cause I believe it's the best sky cycle for now and like to see more update of this asset. :D
     
  37. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Then it needs to be able to compete, which means at the very least an integrated reflection probe.
     
  38. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Lately I'm too busy in daily affairs and do not have time left over to work on my game and not even in updates Sky package.

    But I've been analyzing the clouds of GTA 5 and realized that is used only a static texture that rotates around the scene. And each period of time this texture is changed for another when changes the weather. I'm not with time to play GTA 5 as I wanted, but in the short time I played I only seen a few different textures of clouds in the sky. I think I can do something like this to control the weather in azure[Sky], even being simple is something that azure[Sky] does not have still.


    I do not quite understand when you talk about being able to control the reflection. If you are talking about controlling the value of "Reflection Intensity" and "Reflection Bounces" of the Lighting window. If it is then yes, I can do and put together with the light and ambient control options that will be integrated in version 2.0.2.
     
    ksam2 likes this.
  39. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Super Discount!
    From $45 for only $25

    The offer will last until the end of January.

    Happy new year to everyone!
     
    ksam2 likes this.
  40. Tiny-Man

    Tiny-Man

    Joined:
    Mar 22, 2014
    Posts:
    482
    Nice will buy :)
     
    DenisLemos likes this.
  41. rgrlee71

    rgrlee71

    Joined:
    Sep 11, 2012
    Posts:
    37
    Hi,

    Has anyone actually tested this with Ceto Ocean? Do they not work together at this time? I'm interested in buying this if they are compatible.

    Thanks.
     
  42. Tiny-Man

    Tiny-Man

    Joined:
    Mar 22, 2014
    Posts:
    482
    H
    havent tested. But from what I've tested so far, there shouldn't be any problems. Maybe fog will have some issues (like being underwater) but if the ocean writes into the z buffer it should work.
     
    DenisLemos likes this.
  43. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    I'm developing a version to run on mobile devices that I'll call azure[Skybox]. This version will be always included with azure[Sky], but will also be sold separately at a lower price to facilitate people who develop their games to mobile devices and only wish to have this product.

    azure[Skybox] will be a very simple package, but with amazing results which will make your mobile game much more realistic and at the same time with low cost performance.

    azure[Skybox] will contain many skybox of all kinds and also a shader fog that will blend the skybox with the scene creating a very realistic atmosphere effect. The fog will use only the skybox texture, will not need to do any complex calculations.

    A scene only with this skybox:


    Now the same scene with the same skybox blended with the scene creating the atmospheric effect:


    Another examples:


     
    ksam2 likes this.
  44. Tiny-Man

    Tiny-Man

    Joined:
    Mar 22, 2014
    Posts:
    482
    Do you plan on adding more weather types later? Like completely clear sky, over cast etc.?
     
  45. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Just cool, great sky
    What about Azure 2.0.2?
     
  46. Tiny-Man

    Tiny-Man

    Joined:
    Mar 22, 2014
    Posts:
    482
    Tested out azure with scion, works very well in conjunction.
     
    DenisLemos and ksam2 like this.
  47. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    I will be very busy until the end of this month and will not have much time to work on azure[Sky] and not even in the game that I'm producing. When everything back to normal, I believe that to happen early next month I will use all my free time for the update 2.0.2 which will also come included with azure[Skybox].


    After it is released version 2.0.2 I will start working on a new version with weather control. Initially I plan to do something similar to what is done in GTA5 that is used static textures to the clouds that change according to the weather. Possibly for this new version I start to redo everything from scratch, so it is possible to correct errors and make other improvements.
     
    ksam2 likes this.
  48. PixelaLabsLLC

    PixelaLabsLLC

    Joined:
    Dec 23, 2013
    Posts:
    4
    there is a bug with azure sky 2.0 and cutout mode in standard shader.
    depend on camera position azure just stop doing any rendering and sky filled with camera fill color.
     
  49. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    787
    Hi @PixelaLabsLLC! Welcome to the forum.

    Strange, I tried to reproduce the problem and everything seems to be ok here in my tests. If you can send me some pictures by private message maybe help me know what might be happening to reproduce the bug here to fix it.
     
  50. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    175
    Hi, i was just wondering if this is compatible with the likes of Horizon[on] and Terrain Composer?

    Thanks
    Andy