Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Azure[Sky] - Dynamic Skybox

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

  1. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,830
    I am very interested in Azure Sky. I already own Time of Day and uSky and although I like uSky better for some things, Time of Day is better for others. From the screenshots I see, Azure Sky seems to be better across the board than both ToD and uSky. However, your web demos are so primitive that they give no real impression of what we will really see with this product. You have so many great screenshots with landscapes filled with foliage showing dynamic sky effects, but the demos are just spheres hanging in space. Without a proper demo showing a realistic scenario like we see in the screenshots, it's just too risky to take a chance on this product. I am a Wii U developer so there's also the possibility that it may not work on that platform. Any chance of getting a more realistic demo scene? A stand-alone exe would be nice.
     
  2. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,689
    I was playing with this yesterday with Gaia for a demo I am doing. Must say it is very pretty!

    Grab 20160624062600 w1900h1200 x-106y54z-73r189.jpg
     
    Last edited: Jun 23, 2016
    DenisLemos and magique like this.
  3. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Hi!

    I'm waiting for the release of the next version of Tropical Forest Pack that will come with shader compatible with night scenes to create a demo like the foliage screenshots, because I want to do a 24-hour cycle scene.

    To make the most realistic vegetation screenshots, I used Scion who made the fog most bright and vivid as you may have noticed in the screenshots.

    I do not know the limitations of the Wii U, but if you accept wait. I'm almost done with 3.0.2 version, which will come with the functionality to blend the fog with a regular skybox. When I send the update to evaluation in the Asset Store, I send you the package by private message for you in exchange for the information if Azure works or not on this platform.;)




    Awesome scene!
     
    Tiny-Man likes this.
  4. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,830
    Excellent. I will happily evaluate on Wii U and report my findings.
     
  5. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Version 3.0.2 is already pending review in the Asset Store.

    * Added Skybox Fog Effect with 10 skybox in the "Extra" folder.
    * Added custom skybox shader to use a panoramic texture.
    * Fixed procedural cloud uv error when build to WebGL.
    * Fixed some minor errors in the editor script.

    The Skybox Fog Effect is a very fast effect that creates a realistic fog based on the skybox color. The skybox color is grasped and applied in the scene based on the distance. To work properly you need to provide to the SkyboxFog material, a Cubemap or panoramic texture of the same sky used in the skybox.

    Some screenshots obtained with the effect. The terrain was generated through satellite images of the real world and was created using WorldComposer. The terrain is not included in the package because the files would be more than 1GB in size.​
    Skybox1.jpg Skybox2.jpg




    To use Skybox Fog effect:
    1- Use on the scene one of the skybox materials available in the folder azure[Sky]v3>>Extra>>SkyboxFog>>Textures. Or you can create your own skybox. The quality of the effect will depend and change according to the Skybox used.

    2- Attach the image effect to the camera by Components>>azure[Sky]>>Extra>>Skybox Fog Effect.

    3- Customize the Skybox Fog effect by the Inspector of SkyboxFog material located in the folder azure[Sky]>>Extra>>SkyboxFog.

    4- The SkyboxFog material need to be supplied with the same sky texture used in the skybox. You can choose between a cubemap or panoramic texture, just select the appropriate shader to the SkyboxFog.
    azure[Sky]/Custom/Panoramic Fog.
    or
    azure[Sky]/Custom/Cubemap Fog.

    It is provided a panoramic texture and Cubemap for each of the 10 skybox. Also a skybox material with custom shader to use a panoramic texture.
     
  6. auroxi

    auroxi

    Joined:
    Dec 31, 2012
    Posts:
    82
    I am already glad I purchased this yesterday. I own other time of day/weather systems and this is already looking the most promising of them all. Look forward to trying it out some point next week!

    Are you planning on adding any weather types such clear/rain/storm/snow?

    Keep up the good work 7stars!
     
    DenisLemos likes this.
  7. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Thank you!

    Yes, I plan to add the effects of rain and snow. I believe most of the rain and snow effects we see in games are created with particle effects. So if you already have some of these particle effects, you can control the "intensity" or any parameter of the effect through the "Output" tab. But I want to create a tab especially for the climate control.
     
  8. Quique-Martinez

    Quique-Martinez

    Joined:
    Oct 1, 2013
    Posts:
    112
    Trying out the new Skybox fog feature.
    Each revision of asset is a huge improvement.
    Thanks a lot and congratulations! Sky.png
     
    DenisLemos likes this.
  9. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    447
    Hi,
    How do i set the time length of a day/night cycle?
    Meaning, i want the day/night cycle to be 5 minutes long.

    thanks.
     
  10. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Hi!

    You only need to set the desired value to the property "Day Cycle in Minutes".
    Capturar.JPG
    The set value in this property is the length of the 24-hour cycle. In this case day and night will have the same time length.

    If you need the day lasts longer than the night and vice verse, you can check the "Set Time of Day by Curve" and set the length of each in the curve field. Check the documentation that explains more about this.


    PS: If you are trying this in the demo scenes, then it will not work because of the UI slider that controls the timeline. The script which controls the UI has the execution order higher than Azure script, then the time of day will be in accordance with the value of the UI slider. This is deliberate so that customers could change the time of day in the web player demos.
     
  11. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    It would be great to have the ability to save and load presets.For the entire assets or only on certain tabs maybe? Anyway, you can build your own library of presets and that will speed-up the workflow considerably.
    On a second thought, why don`t you open a new thread on Assets Store forum. I`m sure it will increase your visibility and of course help with sales. :)
    Love your asset. Thanks for your hard work.
    I didn`t tried yet v.3. Maybe in a moth I`ll have a chance to test it. Is it possible to increase the distance for the fog something like 100.000? Or maybe more.
    Thanks.
     
  12. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Hi! Sorry for the delay in responding.

    About the presets, it's something I want to do, but has no need or so urgent to do considering that you can just save the sky as a new prefab. Just remember that in version 3 you have the option to customize 7 different days. And creating a control script, you can have several prefabs sky in the scene with different customizations, simply go turning on and off each sky when needed, that way you can have a huge amount of different days in the scene.

    The distance of the fog is not based in exact units, because the closer to zero the value get, more distant the fog will be. And the values of the camera "Near" and "Far" Clipping Planes will influence in the fog distance, changing the setting value. But I have tested the fog with distances higher than 100,000 and worked normally. I saw that the Unity's GlobalFog effect has a more accurate way to calculate the distance of the fog, I think I'll implement the same way to the next update.

    Thanks for the suggestions!
     
  13. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    I asked about the fog distance because I saw that throwing in the background a few terrains you can get a more realistic feeling if the terrains are placed at a more realistic scale/distance, especially when you are able to fine tune the fog gradient.coverage. Also, my intention was to have a perfectly clear/no fog foreground. And I also think it`ll really help with flight-sim type of games.

    No delay in response noted here. :)

    Have to say again that your sky solution is just wonderful.
     
    DenisLemos likes this.
  14. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    416
    @_7stars
    Sent you a mail about problems with the moon and the buid.exe.
     
  15. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Hi!
    First I apologize for the inconvenience.

    I just installed the 5.4.0f3 version for testing and the same problem happened here. In fact this is not a problem with the moon but with the new version of Unity that seem to have a few bugs that happen when using Render Textures.

    It seems that the Render Texture of the moon is deleted or something like it at the moment which makes the build of the project, making the camera that look to moon lose the reference of Target Texture. The moon then is not shown in the sky because there is no more the texture of the moon, that in this case is a Render Texture.
    RenderTexture1.jpg

    The reason for the moon appears in full screen in TimeByCurve demo scene is precisely because of the reference loss of property Target Texture of camera that look to the moon. When has a Render Texture target attached to the camera, Unity does not draw the render of this camera on the display, but when do not has a Render Texture target attached to the camera, Unity will think it is a main camera and will draw the rendering of this camera on the display. In the scene you mentioned the problem, the camera that renders the moon has the greatest depth and so it will draw in front of the camera that renders the scene and the sky. Note that this only happens because of the reference loss in Target Render of the MoonCamera.

    If you change the depth value of the camera that renders the moon to a value less than the main camera, will fix the problem the moon appears covering everything in front of the display, but the moon will not be drawn on the sky because of what I have explained above.

    The error report shows the following message after the build has been made:
    Releasing render texture that is set as Camera.targetTexture!

    I researched about the error and read reports of several causes it to happen, but no exact reason for this. I just created a new project and did not change anything and the error occurred in the same way regardless of the configuration I set.

    So I believe that Azure is not guilty in this situation, but fortunately I found a simple way to solve the problem temporarily until I know more about or Unity launches a fix if the problem is even a bug.

    Simply create a C# script with the name of TargetRender with the following code and then attach the script to the camera that renders the moon, just as is shown in the image below. Do not forget to drag the MoonRenderTexture into the targetRender variable in the Script Inspector.
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class TargetRender : MonoBehaviour {
    5.  
    6.     public RenderTexture targetRender;
    7.  
    8.     // Use this for initialization
    9.     void Awake () {
    10.         SetTargetTexture ();
    11.     }
    12.  
    13.     // Update is called once per frame
    14.     void Update () {
    15.  
    16.     }
    17.  
    18.     public void SetTargetTexture() {
    19.         GetComponent<Camera>().targetTexture = targetRender;
    20.     }
    21. }
    RenderTexture2.jpg

    The script only reference the MoonRenderTexture again to the property Target Texture of MoonCamera. So whenever you make a change at runtime and noticed that the same bug happened, just call the SetTargetTexture() method to reference the texture again.

    I hope this solves your problem, because here it seems that fixed the problem completely.

    Best regards,

    Denis Lemos
     
  16. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    416
    This works, thank you. :)
     
  17. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    613
    hi!!!!

    I am very interested your product and I'm thinking of buying. I think the best visual results that has all the assets I'm looking (Unistorm, Time of day, etc)

    The problem is that it has weather for example Unistorm.

    1) I would like to know how you can take to introduce a climate system in its asset approx ?? Can Azure (Sky) working with external climatic systems?

    2) The clouds cast shadows? if not, does it plan to include and how much could take?

    3) Does your asset sky with stars at night ?? You can get a real star sky, ie (actual constellations) ??

    4) The options "Lighting-> Enviroment Lighting-> Ambient Source" Can Azure (Sky) use Gradient or Skybox?

    5) I can control all parameters (Intensity and Ambient Reflection Intensity) Azure (Sky) by script in runtime and affecting objects and terrains of the scene at runtime?

    I await your reply , greetings .
     
  18. JonasPersson

    JonasPersson

    Joined:
    Aug 14, 2016
    Posts:
    65
    Hi! i just bought the asset.

    I have unity 5.4.0f3

    The scene looks to way to bright, like a white color is applied to it.
    This is what it looks like when i drag the prefab into a empty scene (and remove the standard directional light)

    Even the Demo scenes look to bright. Azure.jpg

    Something to do with the new unity version? or is it just some stupid setting i missed? (i have linear colormode on)
     
  19. JonasPersson

    JonasPersson

    Joined:
    Aug 14, 2016
    Posts:
    65
    Hi again, i think i have located the problem: All the gradients in my azure sky controller is completely white all trough the day as a preset when i import the asset.
    That is probably why its to bright.

    How do i fix it?
     
  20. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Hi!
    Azure does not have a climate control. I do not know how the other systems make the climate control, but I think it's using particles. I plan to add to the tab "Obj & Mat" two fields for you drag your rain and snow particles. And create a new tab called "Weather" to control some parameters of the particles based on Azure curves system. Thus it will be possible to use other particle effects that you find in the asset store.

    Azure comes with a "Output System", which with a simple script you can change the parameters of other components and objects based on the curves and gradients system. That way you can change the value of virtually any property of any object or system, since these properties are public and accessible. You can for example change the glow color and reflections intensity of your favorite water system at any time of day based on curves and gradients of Azure.

    Take a look at the online documentation which talks about Outputs (Pages 10, 36 and 37). I recommend you to read the online documentation, so you can know better as Azuer works and also all your customization options.

    The clouds do not cast shadows. Azure clouds are drawn together in the Skybox material in a additional pass, then it is not possible to fly through them.

    Azure has stars and also the Milky Way. You can see a little of the Milky Way that Web Player demo scene, just change the time of day and decrease cloud cover.
    https://dl.dropboxusercontent.com/u.../Azure_PlayWay_Scion/azure[Sky]_v3_Demos.html
    You can find other Web Player demos on the first topic or on the Asset Store page.

    The stars are not based on the actual constellations, it is a simple texture in cube map format created on Photoshop. But if you have a texture with the map of constellations, I believe you can do the same process I did to create the texture of the Milky Way. I took a panoramic texture of the Milky Way released by NASA and turned into cube map using this asset.
    https://www.assetstore.unity3d.com/en/#!/content/13616
    Then I took the images resulting from each side of the cube map and put it all together in a single texture in cross format.

    I can not promise, but I will try to do this in the next update.

    Below is an image of the "Ambient" tab. As you can see, you can change the source to (Skybox, Color and Gradient) and set the color and intensity with different values at any time of day.
    AmbientTab.JPG
    Note: The ambient light based on Skybox does not work in real time, so any changes will not affect the ambient at runtime. This is because of the Unity and not the asset.

    I did not quite understand that question. But all Azure parameters will respect what you defined in the curves and gradients for each time of day. Then the values will change in real time based on the configuration of the curves and gradients depending on the time of day changes.
    If you want to change the parameter values through scripts, make sure that the execution order of your script is greater than AzureSky_Controller.cs. Otherwise the value set in the curves and gradients will prevail.

    Hi!
    First thank you for acquire Azure and apologize for the inconvenience.

    A user has reported me the same problem days ago, and this seems to be a bug with Unity that in importing the asset all its gradient parameters are reset.

    The solution was as follows:
    * Delete Azure[Sky] package of your project.
    * Change the "Asset Serialization Mode" option to Mixed instead of Force Text in "Edit>Project Settings>Editor".
    * Import Azure[Sky] again.
     
  21. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    420
    Nice sky system. just fog and clouds wasn't better on previous version?
     
  22. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    613
    Thank for reply

    I see very important that we can have will be possible to use other particle effects that we find in the asset store.

    There any way to solve this issue ???. I want cycles of day and night with the ambient source in Skybox ... But if the ambient light does not work at runtime when it changes, is a problem for me because I would have to use AmbienSource "Gradient" ... and I do not like the results compared to Skybox.

    Precisely your product is the one I like for like ambient works, but for games that no system of dynamic days, is a problem that the ambient light does not change at runtime

    regards
     
  23. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    The fog is the same, the clouds have changed considerably. But the previous version was very limited because you fit the parameters and they are always the same regardless of the time of day. The current version you control every parameter by the curves and gradients system, with the possibility of each parameter having different values for any time of day, with the option to customize up to seven days.


    I may be wrong, but what I found reading the forums is that by default the ambient light based on Skybox, is not updated at runtime for performance reasons.

    I read that to update the Skybox lighting in real time you must then call the DynamicGI.UpdateEnvironment (). But it is very slow and is not advisable.

    You can take the test in your scene by placing a script to rotate your directional light and try to change the ambient intensity in game. If the lighting do not update, try calling DynamicGI.UpdateEnvironment () to see if it works and does not affect your game performance.

    After I written the answer, I tested here to make sure and ambient lighting marked with Skybox not updated in real time, only calling DynamicGI.UpdateEnvironment() did the update, but the performance fell to half. So I assume that your game will not run on a good performance if you use Skybox as the source of ambient light.
     
    ftejada and Crossway like this.
  24. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    420
    You're right, it looks beautiful. Is there any chance for a cloud shadow script? that would be so nice.
     
  25. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Regarding the updated fog implementation, when can we expect the update to be available on asset store?
    Thanks!
     
  26. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    613
    thanks
     
  27. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    420
    Can you please check to see why Azure doesn't work on Unity 5.5?
    Thanks.
     
  28. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Hi!

    I just installed the Unity 5.5.0b3 to test and worked normally here. The only problem that occurred was the moon texture does not appear in the sky. This is because that starting Unity 5.4, the property "Target Texture" of the camera is lost after build the project. To solve this just add a simple script on camera that render the moon. The process is quite simple and is described in post number #265.

    The error report, shows the following message after the build has been made:
    Releasing render texture that is set as Camera.targetTexture!

    I'll send an update this weekend to correct this error.

    With the exception of this problem, it seems that everything is working fine.
     
    Crossway likes this.
  29. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Version 3.0.3 is pending review. Problems related to Moon Render Texture been fixed.

    I would like to take this opportunity to inform that I am working on another major upgrade. I apologize for the delay in updates, I am simultaneously working on other projects.

    • I'm trying to implement other optional sky models. Right now I'm looking at the method of Bruneton and Neyret. This model uses pre-computed tables to reduce the number of calculations and is one of the most realistic methods currently. The source code of this model is freely available, and can be found here: http://www-evasion.inrialpes.fr/Membres/Eric.Bruneton/

      This method is one of the most realistic, but it is also very difficult to implement in Unity. The 2D textures tables I already created, the problem is the 3D tables, I could save those 3D tables in volumetric Render Textures, but this is not supported in DirectX9.

      Starting with Unity5.4 is available Textures arrays that could be an alternative instead of using 3D texture, but it is also not supported in DirectX9. So make this method work properly in DirectX9 will be a headache.
    That's what I got so far using the 2D tables only. The variation in altitude does not work in real time because this information is stored in 3D tables. The terrain used in the images is from HorizonON.
    S1.JPG S2.JPG S3.JPG
    That was my first attempt to test, then still with many errors to be resolved.

    I'm also implementing:
    * A more realistic cloud system (using Ray Marching);
    * Climate system;
    * Positioning sun and moon based on the date and time, latitude and longitude.
     
  30. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    420
    Looks awesome, just I can't figure out why but when I use Azure I have a heavily specular highlights on my materials! but when I use a single directional light I don't have that much of specular highlight on my materials.
     
  31. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    420
    I figure out what is the source of this issue. I mentioned Alloy Area Light just doesn't work on Azure Sun light! but it works with a directional light. can you please check this out? thanks.
     
  32. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Azure lights are just regular directional lights like any other and does not have anything special that make them work different from the conventional way. So I do not know what can be your problem, maybe it's just a different setting.

    Azure controls only the intensity, color and rotation of the directional lights that are set as target of the Sun and Moon in the Inspector, nothing more than that.

    You said that when you create a new directional light works normally, so you can simply replace the Azure directional lights by these new lights. Just need to keep the child objects of the directional light of the moon, which is the moon sphere and the camera that render the moon texture. Also make sure that the rotation of the new directional light of the moon is the opposite of sunlight.
     
    Crossway likes this.
  33. Harald_Heide

    Harald_Heide

    Joined:
    Jul 22, 2015
    Posts:
    62
    Can confirm that this thingie looks absolutely stunning with the HTC Vive. Thought the sunset was a bit too colorful but then mother nature herself provided me something similar in common reality just outside my window, as if wanting to prove me wrong. Works off course great with world creator and will now continue to set it up with Aquas water river.
    Was a bit annoyed with meself not picking this up at 25$ but would probably just have gotten bad conscience.
    At 45$ its still a steal... and by the looks of Denis commitment and support, this is a solid future investment...
    With great respect...

    Btw. anything I should take into consideration when using this with Aquas???... Anyone?...
     
    DenisLemos likes this.
  34. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Thanks for the feedback!

    I do not have Aquas yet, so I do not know how Aquas works. The only thing you need to check is whether Aquas draws for the depth buffer. Because for the fog affect the objects in the scene is used the z-buffer information to find out how far the object is from the camera. So if an object does not draw to the depth buffer, the fog will not know It's there and will look to the first object behind it that draws to the depth buffer as a reference point to calculate the distance.

    Usually the objects with transparent materials do not draw to the depth buffer, I'm looking for a solution to this problem, but until then the developers of water systems has made its assets draw to the depth buffer, PlayWay is an example.
     
  35. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    613
    hi

    A new question before buying your asset ...

    I'm thinking license the asset "kode80 Volumetric Clouds" from which you can download a free non-commercial version here: http://kode80.com/blog/2016/04/11/kode80-clouds-for-unity3d/index.html

    1) Can I use the Asset "kode80 Volumetric Clouds" instead of Azure cloud system?

    2) With the "Output System" Azure, I can control all parameters "kode80 Volumetric Clouds" to set the color of clouds according to time of day, cloud amount, etc, etc?

    3) When not being able have a trial version of Azure to test it thoroughly, I find it very difficult to assess whether I should spend the money on their asset. Do you have a trial version to test it?

    regards
     
  36. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Hi!

    Yes, you can use Azure with any other cloud system you prefer. You only need to disable the Azure cloud on the "Cloud Settings" tab.

    I did not know about the Kode80 cloud system, so I never tested it with Azure and do not know how this cloud system works, but if you are able to change these parameters using another script, then the Azure output system will also work.

    Recalling that the Azure output system so far only available output type of "Color" and "float", but you can easily convert "float" to "int". In most cases these are the only types of variables available for customization.

    You also need to write a script to get the value of the "output" and send it to the destination variable. See the documentation to learn more about it, there is a section explaining how to use the output system.

    No, I do not have a trial version yet.

    If you think $45 is a high value to risk buying at the time, then you can wait and save money at the end of the year. I'm planning a promotion that will last the entire month of December. The value of the package in the promotion will be between ($25 - $30).
     
    ftejada likes this.
  37. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    613
    Thank for the answers... I´ll think about it.

    regards
     
  38. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    WIP

    Precomputed Atmospheric Scattering based on Eric Bruneton and Fabrice Neyret
    After a long time, I finally managed to correctly create the pre-computed tables. Instead of using 3D textures I created each layer in different 2D textures. This way you can store the textures in the project for them be already available before build the game, so you do not need to pre-compute the tables every time you start a new scene in the game.

    I created a short video that shows the operation of the script that creates the tables. The script can be used in any GameObject and only works in the editor. Simply just push a button and all the work is done, the tables will be computed and then saved as Texture2D in the project.

    The skybox shown in the video is not originated by Bruneton method, actually is the new implementation of Preetham model I'm doing. The new Azure version you will be able to choose the sky template that you want to work.


    After get the tables stored in the project, is need just send to the shader the texture containing the data concerning to the altitude of the camera.

    And this is the result!
    (GIF size = 6.86MB)
    http://imgur.com/OvekD4q
    The terrain used in the GIF is from Horizon[ON].

    Naty Hoffman and Arcot J. Preetham Atmospheric Scattering
    The current version of Azure already use the sky model of Preetham, but I'm redoing from scratch and following the equations more precisely. So far the results are very good. By not using pre-computed parameters, this model is going to have a lot more customization options than the Bruneton sky model.

    The development of the new Azure version is still early, and still has many problems to be solved until the release of a beta, especially in the implementation of Bruneton model.​
     
    Last edited: Apr 28, 2017
    adventurefan and Shodan0101 like this.
  39. Shodan0101

    Shodan0101

    Joined:
    Mar 18, 2013
    Posts:
    135
    !!!!Waves arms profusely so much happiness!! Mad skills ;) fantastic work!! So proud to be able to use this asset! Thank you for all the hard work and good luck with remaining bug fixes and the implementation of Bruneton model!
     
    DenisLemos likes this.
  40. JonasPersson

    JonasPersson

    Joined:
    Aug 14, 2016
    Posts:
    65
    Hi!
    Is there any way to set the ground color to something else than white? I see a night ground color but no day ground color for the reflection.

    Thank you!
     
  41. adventurefan

    adventurefan

    Joined:
    Jan 17, 2014
    Posts:
    201
    my goodness! I hadn't even thought of my game being extended to have sort of the space view but that could be an... interesting... twist! It occurs to me I'll probably want the ability to mess with how the altitude changing effect is applied, some of the scale in my game probably is favored by having an extra unrealistic space between the sky and space to mess around in. But cool work!
     
  42. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Hi!
    This option is currently only available for the night sky. This option is not physically realistic, I just added to the night sky to correct the brown fog at night. My implementation of the optical depth equation is not entirely correct in the current version, for this reason the white color on the sky ground at daytime.

    I'm rewriting the shaders from scratch, and it seems that I managed to implement the optical depth correctly. This screenshot shows the new calculation of the optical depth and the correct color as the sky ground should be.

    I will try to put an option to choose the ground colors based on physical or custom colors.

    Another thing I want is to fix the blue haze. That in the current version is white as the ground color. The correct color of the fog on a sunny day is to be blue and go becoming white as far away on the horizon, as is shown in the image above.

    Keep in mind that will not be possible to completely exit the planet and land on another planet or orbiting it as it is in the game No Man's Sky, because Azure will continue working as regular skybox and you will always be trapped inside the skybox.

    By default the change in altitude will be based on the camera position, but you can easily change the script to instead of using the camera, use your own custom variable to change the effect of altitude.
     
    ftejada likes this.
  43. PiotrW

    PiotrW

    Joined:
    Nov 2, 2014
    Posts:
    20
    I got really strange problem. Sun - is in different place than on skybox. I added flare to have better view of it. Do you know what can cause this?
     

    Attached Files:

  44. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Hi!

    Strange, it seems that the direction of sunlight is just reversed. You are using the directional light that comes with prefab? Perhaps the rotation of the sun directional light has been changing for some reason.

    I tried to reproduce the problem here and it was not possible, always work correctly. Azure always automatically rotates the sun directional light in the right direction shown in the skybox.
    Make sure that the directional light is set as target of sunlight in the "Obj & Mat" tab in the Inspector of Azure controller.
    SunlightTarget.jpg

    This also happens in the demo scenes?
    You tried to create an empty scene, deleting the default directional light and draging the Azure prefab to the scene to see if the problem persist?

    If the error persists, try creating a new project with the error and send me this project, maybe this way I can find out the source of the problem if it happens when I open the project here.

    Cheers!
     
  45. PiotrW

    PiotrW

    Joined:
    Nov 2, 2014
    Posts:
    20
    I found a reason probably. It is working fine with my camera and ship at 0,0,0 position. But when I'm for example far away at -2000,0,-900. Should I move sky with camera position?
     
  46. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    I put my camera in the same position as you said and left Azure controller at (0,0,0). And realy the position of LensFlare and Skybox were not the same. The difference was not as great as the one shown in your image, it seems to be related to the camera position and the value of "Camera Far Clipping Plane".
    Lens1.jpg
    So I made a simple change in shaders and completely fixed the problem here.
    Lens2.jpg


    I'll update the fix soon, if you do not want to wait, it is very easy to correct for yourself.

    Just open each sky shader and change this line of code in vert program.
    Code (CSharp):
    1. o.WorldPos = normalize(mul((float4x4)_Object2World, v.vertex)).xyz;
    Code1.jpg

    To this:
    Code (CSharp):
    1. o.WorldPos = normalize(mul((float3x3)_Object2World, v.vertex)).xyz;
    Code2.jpg
     
  47. b1gry4n

    b1gry4n

    Joined:
    Sep 11, 2013
    Posts:
    99
    Hello, I am using your asset with playway but I am experiencing some issues with the fog and playway's water. One of the coolest features of playway is the waves imo, and one of the best ways that azure and playway look amazing together is the fog. How the water blends into the sky at a far enough distance, it looks really good. My problem is when the waves are large and the perspective is on the horizon. I was wondering if you have any advice for how I might fix this.

    Note: I have the fog script above the water renderer as the docs recommend and this issue persists when the only components on my camera are the fog and playways water renderer

    Thanks



    Here is another image rendering just the fog

     
    Last edited: Oct 16, 2016
  48. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    578
    Hi!

    This seems to be an error in PlayWay not in Azure. You should be using DirectX 11, try switching to DirectX 9 you will see the problem go away. I never had time to study well the working PlayWay, but I'm almost certain that the problem is due to Wather Sprays. I think the Wather Sprays is interfering strangely in the depth buffer, as this feature is not supported in DirectX 9 this problem does not happen.

    I do not know what changed in PlayWay, but it seems that starting a particular update this problem started happening. Before it worked perfectly in my tests even in DirectX 11.

    If you use Unity's GlobalFog image effect, the same problem will happen, here are some screenshots using Unity's GlobalFog.
    PlayWay1.JPG PlayWay2.JPG
    To use Unity's GlobalFog with PlayWay, you need to comment out the line with [ImageEffectOpaque] command in the GlobalFog.cs script.
     
  49. b1gry4n

    b1gry4n

    Joined:
    Sep 11, 2013
    Posts:
    99
    Strange. Your suggestion in switching to dx9 worked, thanks. I will go have a chat with the playway people!
     
  50. adventurefan

    adventurefan

    Joined:
    Jan 17, 2014
    Posts:
    201
    Ok. That's fine, as I definitely don't want to go as far as other planets... too much content to produce there ;)
     
unityunity