Search Unity

DeepSky Haze - Physically-Based Atmospheric Scattering [RELEASED]

Discussion in 'Assets and Asset Store' started by PiranLBB, Apr 25, 2016.

  1. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    Hello!

    Very happy to introduce DeepSky Haze - a physically-based atmospheric scattering package designed to easily add stunning natural fog and true volumetric haze effects. It takes advantage of modern rendering techniques such as temporal reprojection to give high-quality results, fast.

    Available now on the store!

    Check out the trailer:


    Features:
    • physically-based atmospheric scattering (classic Rayleigh and Mie)
    • true volumetric haze, using the directional light shadow map for light shafts
    • height-based fog with sun lighting
    • flexible zoning system to create effects for specific areas
    • create custom time-of-day variants for changing atmospherics during day/night cycles*
    • custom transparency shaders to integrate with the atmospherics
    (*DeepSky Haze is not a time-of-day system, but allows you to create atmospheric effects that can be smoothly blended via a Time parameter.)

    The system works on DX9, DX11 and OpenGL Core (for best quality and performance, DX11/OpenGL Core are recommended, mobile platforms are not supported).

    Take a look at the main page and user guide, for more information and to download a demo (Windows only for now).

    Thanks for taking a look!
    Piran
     
  2. mittense

    mittense

    Joined:
    Jul 25, 2013
    Posts:
    168
    I've been really digging this. Some screens:



     
  3. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    Awesome!

    Great to see someone using it, feel free to post feedback either here or via mail as I'm currently working on the next update :)
     
  4. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    Currently working on the next update so here's some info on what's planned for DeepSky Haze.

    In the next version (ETA within the next couple of weeks):
    • compatible with more Unity versions - everything from 5.2.1 up
    • quick setup 'one-click' option to speed up adding atmospherics from scratch
    • step-by-step guide to adding DeepSky Haze atmospherics to custom transparent shaders (already up on the website)
    • specific shaders for transparent skybox objects, without the expense of the full transparent shaders
    • example water shader with atmospherics support
    Coming soon:
    • directional light gobo - allow a cloud layer to create light shafts (for objects that don't cast shadows)
    • further optimizations for DX11/OpenGL Core
    I'm also working on a new demo based on Unity's Viking Village showing a more complete scene and time-of-day setup. Expect screenshots soon!

    In the mean time, here are a couple of comparison shots - DeepSky Haze on the left, base scene on the right:



     
  5. A1taIR

    A1taIR

    Joined:
    Jan 17, 2014
    Posts:
    11
    Hi!
    I have such space scene with asterois on it. Will Deepsky Haze work for me to create haze effect? Does it visible with Skybox on background?
     
  6. mittense

    mittense

    Joined:
    Jul 25, 2013
    Posts:
    168
  7. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    A1talR - DeepSky Haze is mostly designed for landscapes so to be honest I've never tried a space scene! Will do some tests over the next couple of days and see if it works. The next update will have some skybox-specific shaders, so that might be more suitable for you.

    mittense - cool! Really dig seeing how it's being used so thanks for posting :)
     
  8. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    This looks really cool, but I have a few questions:

    1) Do you modify / clamp the output pixel intensity to 1? Or does DeepSky Haze output full pixel intensity?
    2) Would you happen to know if this works with Sonic Ethers Bloom / Dirty Lens package?

    I ask because other implementations of Light Scattering packages don't play well with Sonic Ethers Bloom package because the atmospheric scattering packages usually perform some sort of tone mapping which kills the high dynamic range needed for a good bloom.
     
  9. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    Hi there,

    1) No clamping at all when HDR is enabled on the camera, DeepSky Haze makes no assumptions about how the output is going to be used and simply outputs the full scattering intensity.
    2) I'm afraid I haven't tested it but there's no reason why it shouldn't - it's implemented as a standard opaque image effect, so as long as it comes before bloom effects there should be no problem at all. All the screenshots and scenes in the trailer have tonemapping and colour correction image effects after the atmospherics.

    Here's a screenshot showing the atmospherics with Unity's standard tonemapping. The only thing changing here is the exposure:



    Hope that's useful!
     
    AdamGoodrich likes this.
  10. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,622
    When is the next version of this due ? I am about do some cool demo's with Gaia and would love to use the latest if possible :)
     
  11. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    Hi Adam,

    I've unfortunately been delayed due to hitting crunch time at the day-job (the usual E3 demo madness!) but I'm wrapping up v1.1 this weekend and submitting to the store on Monday. Can send you a package on Monday if you'd need it sooner (I guess it'll take another week to actually hit the store)?
     
  12. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,622
    Completely understand.

    Not sure if you have considered it for your next release - but the ability to over compensate / enhance the god rays would be an awesome addition.

    I am just about to launch a flythrough / cutscene generator called Pegasus - I created because I needed something to show off my Gaia scenes.

    I think your stuff is lovely and I would love to show it off as well :)
     
  13. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    Hi all,

    Just wanted to give an update. Apologies again to anyone that's been waiting on updates; as mentioned previously the day-job has taken up pretty much all my time in the run-up to E3.

    But DeepSky Haze v1.1 is currently in the review process, so hitting the store soon!

    Here are the features you can expect:
    • Improved compatibility - minimum Unity version is now 5.2.1
    • New 'Quick Setup' window to add atmospherics to a scene with just a few clicks
    • Initial support for different height falloff options - currently Exponential (the default) and None (good for space scenes!)
    • Multipliers for scattering parameters to help fine-tune them to your scene size, or to create overblown effects
    • Complete re-write of transparency shaders - now uses the exact same functions as the main effect
    • Transparent shaders apply atmospherics per-vertex by default for big performance gain (per-fragment option still available)
    • Support for trees made with Unity's Tree Creator (replacement billboard shader)
    • Choose which atmospheric effects are applied to the skybox (for when your skybox already has eg. atmospheric scattering)
    • Example custom transparent shaders and more documentation!
    Lastly, here are some new screenshots from Unity's Blacksmith asset pack available on the store, with DeepSky Haze added:


     
    nxrighthere likes this.
  14. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    475
    how does this work, its a script on the camera, and does it work with multiple cameras
     
  15. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    Hi Paulojsam, there are two main parts - a zone system (GameObjects in your scene) which define the atmospheric settings and then an image effect on the camera which does the rendering. Yes it works with multiple cameras, and each camera can have different settings :)
     
  16. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    475
    Thank you thats good to know!
     
  17. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    DeepSky Haze v1.1 is now available on the store!

    Features:
    • Improved compatibility - minimum Unity version is now 5.2.1
    • New 'Quick Setup' window to add atmospherics to a scene with just a few clicks
    • Initial support for different height falloff options - currently Exponential (the default) and None (good for space scenes!)
    • Multipliers for scattering parameters to help fine-tune them to your scene size, or to create overblown effects
    • New Fog Opacity parameter - control the maximum amount of fog, regardless of depth (not physically-based, but will still be HDR if enabled)
    • Complete re-write of transparency shaders - now uses the exact same functions as the main effect for better consistency
    • Transparent shaders apply atmospherics per-vertex by default for big performance gain (per-fragment option still available)
    • Support for trees made with Unity's Tree Creator (replacement billboard shader)
    • Choose which atmospheric effects are applied to the skybox (for when your skybox already has eg. atmospheric scattering)
    • Example custom transparent shaders and more documentation!
    Note for existing users: because the transparency shaders have been completely rewritten/replaced, you will need to update materials to use the new ones. Apologies for the inconvenience - the trade off is a big performance boost and better consistency with the main image effect. Any problems, do please drop me a mail!

    Here are a couple of new screenshots:

     
  18. SazanOFF

    SazanOFF

    Joined:
    Oct 20, 2014
    Posts:
    11
    Hi! I can use only fog from this asset with TOD Sky? Thx. for reply.
     
  19. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    Hi, unfortunately DeepSky Haze isn't currently compatible with TOD Sky as they render their background clouds as transparencies.

    I have some ideas to make this more flexible, but to be honest if you just need fog you might be better off with something simpler, as there will be some wasted performance.
     
  20. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,286
    Purchased at the weekend. Sadly, as several other people also reported in the 'new forum' that got axed, it doesnt seem to work in Unity 5.4 (recent beta versions). A fix for this would be most appreciated.

    Also I'm probably doing something stupid but I'm having trouble getting the 'volumetric light rays/shadows' working when using it with the latest 5.3.5 Unity. Probably something silly I'm doing I guess, so far I've just been trying it using the default sample scene. Any tips most appreciated, cheers.
     
  21. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,286
    Hmm actually it may have started working again with 5.4.0b25. But I was rather tired when I noticed this last night so dont take this as 100% confirmation right now.
     
  22. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    Hi folks,

    Firstly, apologies for the late reply - I've had real trouble with notifications and just getting here in general with whatever's going on with the forum. Please do feel free to email me directly if you don't get a reply here within a couple of days - piranlbb[at]gmail.com

    Regarding the beta issues - I can confirm the bug in Unity that caused this is fixed in 5.4.0f1. I believe the fix went in for b25, but I haven't tested that.

    Lastly, I've submitted v1.1.5 today, so look out for that hitting the store next week - it contains a couple of bug fixes (including the skybox options not always working in a build), as well as a new example scene and particle shader. I highly recommend updating when it's available.

    Thanks,
    Piran
     
  23. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    906
    Does this work with TrueSky?
     
  24. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    @Piran
    do you have news about the develepment of DeepSky Haze?
    • New features
    • Improvements
    • bug fixes
    Thanks.
     
  25. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    475
    can anybody with this asset to please post a indoors screenshots please, i am curious to see how it works with more scenarios
     
  26. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    Hi everyone,

    @adamz - not tested with TrueSky so I honestly can't say. DeepSky Haze renders as an opaque image effect (after skybox, before transparencies), so depending on where in the render pipeline TrueSky renders it may or may not work. Sorry, I appreciate that's not particularly helpful!

    @mkgm - I'm wrapping up the latest version right now, should hit the store next week. The main new feature is Point / Spotlight Volumetrics - now you can create haze from local light sources! They support the following features:
    • Full integration with Unity shadows and cookies, from both spotlight and point sources
    • The same fast, high performance, physically-based sampling as the existing atmospheric scattering
    • 3D density textures, for creating animated hazy mist/fog as it passes a light source
    • Configurable sampling quality - set the quality per-light depending on size/importance
    • Per-light distance fading - for fine tuning performance
    • Works in both deferred and forward rendering paths
    Here's a pre-release screenshot of a volumetric spotlight in the viking village demo (only other effect is tonemapping from the Cinematic Image Effects package):


    To be clear: the version of DeepSky Haze currently available on the store DOES NOT include the point / spotlight volumetrics, they will be in the next version releasing next week (depending on store review times etc.)

    Other updates/bugfixes include:
    • Better resource handling / sharing of resources
    • Improved sampling - changed the way the sampling pattern animates so less obvious repetition during temporal reprojection
    • Exposed more parameters for extra control from external scripts
    On the roadmap (timing to be decided):
    • Make temporal reprojection optional, for better integration with other effects using reprojection (such as temporal AA)
    • Directional light cookie support for atmospheric scattering ('fake cloud shadows')
    • Custom cloud shadows texture slot for atmospheric scattering
    • Investigate VR support (note I'm not sure VR support is really feasible, I want to look into it but no promises!)
    It's late in the UK but will be back here first thing tomorrow to pick up replies (about 4 hours before the sale ends ;) )

    thanks,
    Piran
     
  27. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    Hey Parin,
    thanks so much for the feedback and the updates.

    By the way, I'm a new happy customer.
     
    PiranLBB likes this.
  28. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,622
    I like this asset too :)
     
    PiranLBB likes this.
  29. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    124
    Looking stunning :) does this work with unistorm?
     
  30. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    I don't have UniStorm I'm afraid - after a look at the documentation I think the answer is 'partly'. I'll get it soon and see if I can make DeepSky Haze compatible :)
     
    kilju likes this.
  31. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    124
    nice to hear :) im keeping my thumbs up
     
  32. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,331
    A few questions:

    -Is it possible not to work with zones but use a global height fog instead? If not, can zones be added at runtime?

    -Does this work with my SpriteLight shaders?
    https://www.assetstore.unity3d.com/en/#!/content/46409

    -Is the sun an HDR object? Many atmospheric scattering packages have a fake sun which is baked in and is not HDR, causing it not to work with bloom effects.

    -Can you post some screenshots of the sun at dawn/dusk?

    -Lack of VR support is a show stopper. Any progress on this?

    -Any plans to add a time of day script? It's no fun for everyone to re-invent the wheel on that one.
     
  33. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    Hi,

    - The fog is global, the zones define the atmospheric settings the camera should use when in a zone, but the height fog always starts at 0 in global Y axis. You can add zones and control them completely at runtime, the only requirement is they have to be parented to the DS_HazeCore object (although they can be anywhere in the scene physically - I've used setups with a single zone that follows the camera position at runtime).

    - Yes it does! Here's a (not very good) screenshot from your example scene (just a bit of fog and haze):

    - There is no sun object, DeepSky Haze is just dealing with the air between your eye and the skybox so makes no assumptions about how the sky is setup. All the scenes in the trailer and screenshots use either Unity's default procedural skybox or a HDR sky from the Blacksmith assets package (with the sun as part of the image).

    - Should have answered this first, the main issue with VR is simply I don't have access to a Rift or Vive and as I'm not developing on VR I can't justify the expense.

    - There are so many time-of-day solutions on the store I kind of assumed everyone already had one ;) I wasn't planning on it but I could include a basic one to get people started.
     
  34. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,331
    I see. The two go hand in hand though. Compatibility might be an issue.

    The default skybox is very limited as it doesn't change color with height. uSky Pro looks good but the sun isn't HDR, so no bloom when partially occluded by a mountain. I can name a couple of others with issues. So far no luck finding something with atmospheric scattering and a proper dynamic skybox.

    Also, is thick fog supported and do the lights (emissive objects) handle in thick fog similar to this?
     
    Last edited: Sep 23, 2016
  35. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    Yeah I totally understand, it sounds like for your use-case you need a complete integrated sky/atmosphere solution (I'm guessing you're making a flight sim?).

    Thick fog works fine and is also HDR so bright objects punch through correctly. Here are two emissive planes, both 20 metres away - the one on the right is 4x brighter (using the bloom from the cinematic image effects package):
     
  36. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,331
    Good to hear that the punch through fog effect works correctly.

    I am making a flight sim indeed (one of the team anyway). But I will see if I can somehow mix it with a dynamic skybox solution. Or if you can make it work, even better ;-)
     
  37. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    DeepSky Haze v1.2.5 is out now!




    The main new feature is a new Light Volume component for rendering volumetric light scattering from point and spot lights:
    • Uses the same physically-based light scattering for local light sources as the main atmospherics.
    • Full support for shadows and cookies from both point and spot lights.
    • Assign a 3D texture to a light volume for smoky/foggy effects (3 examples included).
    • Configure sampling quality and fade distances per-volume to fine tune performance.
    • Just like the main effect, works in both Forward and Deferred render paths.
    You can see these in action in the updated trailer (Ok, they were actually released in v1.2 but I wanted to make some new art and then ended up fixing some bugs as well...):



    Other highlights:
    • Temporal Reprojection is now optional and can be turned off per-View component; useful if a later image effect (such as AA) is also temporal. This saves a little performance and GPU memory.
    • Better handling of non-linear and non-HDR rendering (all intermediary render targets now use the correct formats).
    • Several bugfixes to improve compatability and avoid conflicts with other image effects.
    For more detail you can view the User Guide online.
     
    JBT27, AdamGoodrich, elbows and 3 others like this.
  38. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,622
  39. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    364
    Looks very very nice, there is a problem for me, as I'm using a Cycle day and night I have a sun and a moon but It just support one directional light. so it isn't an issue for night?
     
  40. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    @Crossway Sorry for the late reply I've been a bit ill lately. You're correct, ususally using more than one directional light is too expensive so it's not supported I'm afraid. You can set which light is being used by the effect at runtime, so you could switch at sunset although I imagine the change would be really obvious depending on how you animate the lights.
     
    GMax and Crossway like this.
  41. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    45
    I have been following the development of this and another asset for a while now and have been pondering what the difference(s) between yours and the one called hx Volumetric Lighting is/are (not just in terms of features, but also in terms of performance). I'm trying to decide but except for a cleaner interface I cannot see any differences.

    Many thanks in advance!
     
  42. PiranLBB

    PiranLBB

    Joined:
    Apr 10, 2015
    Posts:
    32
    From what I can tell from the HitBox documentation/website the main differences are that DeepSky Haze is designed to be a more comprehensive atmospheric scattering solution. It does full Rayleigh & Mie scattering with classic height fog as well as the volumetric lighting.
    Plus there's the full zone system as well for changing the atmospherics in different parts of the level, with support for time-of-day systems if you want to change effects smoothly through a day/night cycle.

    However hx Volumetric Lighting has some cool more 'modern' features such as being able to control density with particle systems.

    As for performance I expect they're about the same (as really they're doing much the same thing) - from the screenshots I've been able to find with stats they seem comparable. I'm afraid I don't have their asset so I can't be more specific than that.

    Really I think which is better for you will come down to your use case - are you making a corridor-based FPS and just want some cool lighting effects (in which case hx might be better)? Or are you making something larger with longer view distances and need the zones/time-of-day support?

    (DeepSky Haze handles corridor based FPSs very well actually, but ya know... might as well save $10 ;) )

    I hope that helps, feel free to ask me questions here or via email (piranlbb[at]gmail.com) if there are more specific things you'd like to know!
     
  43. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    526
    Hi

    I'm very interested in your asset, but I want to get it together with another asset called Azure [Sky].

    The problem is that I do not know if they will be compatible or it would be of no use to combine them.

    Can you leave me a trial version to test it thoroughly before buying it? I would appreciate it very much since I would not like to spend the money and that I can not use it for what I want.

    regards
     
  44. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,622
    I have used both and I prefer deep sky haze. It performs well and gives a nicer effect imho.
     
    ftejada and spaceemotion like this.
  45. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    I was using uSky for my atmospheric scattering, but I switched to DeepSky Haze a while ago and never looked back. It performs great, the zones feature is awesome, and the volumetric lights look beautiful. Plus honestly I think it performs better than uSky. Here is a WIP of a scene I am making with DeepSky Haze:
     
  46. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    526
    What are you doing to create that ocean?

    It looks great
     
  47. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Thanks! I made it using Shader Forge initially but rewrote it to optimize it. So its both Shader Forge + hand editing. It uses the Gerster Wave Formula and tessellates and displaces the vertices using DX11 Tessellation.
     
    ftejada and GMax like this.
  48. ethancm

    ethancm

    Joined:
    Mar 9, 2016
    Posts:
    2
    I use both Azure[Sky] and DeepSky Haze together and it works great. I disable Azure[Sky]'s fog so that it only handles the skybox and time of day; DeepSky Haze handles the volumetric haze and fog. DeepSky allows you to choose which effects (Air, Haze, Fog and Fog Lighting) get applied to Azure's skybox to help blend the two together and get the look you want. I also use Azure's output curve function to sync the time of day with DeepSky's timeline so it transitions through the variant settings properly. Hope that's helpful information.
     
    PiranLBB and ftejada like this.
  49. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    526
    Thanks.
     
  50. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    906
    Can you use DeepSky Haze and have it not render in certain zones, say a building for example?