Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Volumetric Fog & Mist - AAA realistic and animated fog, dust, low clouds and mist

Discussion in 'Assets and Asset Store' started by Thrawn75, Dec 1, 2015.

  1. turboscalpeur

    turboscalpeur

    Joined:
    Nov 29, 2015
    Posts:
    286
    Some new Screenshots using the "Sand Storm" this time :)











    To know all the Assets i have used, you can refer on each Screens from my Gallery everything is linked^^
     
    Last edited: Apr 28, 2016
    Teila likes this.
  2. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Amazing! Please add Compass Navigator Pro and make it walkable in a demo. Would love to explore those areas and run over that grass :)
     
    turboscalpeur likes this.
  3. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    btw, try enabling Light Scattering option - just to see how those Sun rays cross the landscape..
     
    turboscalpeur likes this.
  4. turboscalpeur

    turboscalpeur

    Joined:
    Nov 29, 2015
    Posts:
    286
    Thanks for the Input, will try it soon!
     
  5. turboscalpeur

    turboscalpeur

    Joined:
    Nov 29, 2015
    Posts:
    286
    Thanks again, going to have some good starts to make a demo as well :)
     
  6. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Volumetric Fog & Mist v4.2 beta1 is now available with exciting improvements.

    Check out the new Dynamic Cloud Layer in this video:
     
    radimoto and Shawn67 like this.
  7. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Fog Areas are improved in 4.2 as well. Now you can add enclosed fog on a certain position in world space, with radius, falloff, and other effects. Check out the video below for a demo of clouds over the top of a mountain:

     
  8. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    2,196
    Heheh.. I'm going to have to work on getting this off my wishlist and into my toolbox. Sounds like it might be a good solution to adding mist to my wetlands screens for the wetlands stamps pack I'm working on for Gaia. Keep up the awesome work!
     
    Thrawn75 likes this.
  9. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    859
    Nice!

    Is it normal the clouds look like they're 1 sided? I mean, you can't see them until you're actually inside or above them?
    Would a "Double sided" option be possible, so that you can see the clouds while approaching them, inside them and from above?
     
  10. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    My fault. Captions are missing in that video which shows how to activate a cloud layer when the player crosses a collider. Of course clouds are volumetric, they are not single-sided.
     
    Shawn67 likes this.
  11. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Well, fixed those video captions in the mountain climbing demo.
     
  12. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Good news!

    For those looking for a performance boost (who doesn't?), latest beta includes a new edge improvement option which is very useful when using high downsampling multiplier.

    In general, using a downsampling x2 brings performance boost with little artifacts/halos around geometry. However a downsampling of x3 or even x4 is probably unusable except when using the fog as clouds, where there's less contrast between the fog and the sky and fog bleeding doesn't occur.

    Now, an edge improve option has been added, so it will apply a nearest depth algorithm over the edges to reduce the pixelization/fog bleeding.

    Check out the video below for a demo:

     
    radimoto and jimmikaelkael like this.
  13. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    513
    I acquired Volumetric Fog & Mist recently and I must say it's the best fog/mist asset! I tried to reproduce a misty morning and the result is quite convincing, I let you judge by yourself:






    Assets used:

    Thank you so much Ramiro for this wonderful asset!
     
  14. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    V4.3 beta2 is now available!

    This update introduces a more accurate inverted void area for both spherical and box shapes.

    You now have more control over the boundaries of the fog and can achieve effects like this one:
     
    Last edited: Apr 23, 2016
    jimmikaelkael and Shawn67 like this.
  15. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    I have a question... bought your asset yesterday and I am trying to integrate it into my project, but I get weird artefacts like this:

    volumetric fog problem.png

    Any idea what is going wrong here?


    Its is using forward renderer, linear color space. I tried changing to deferred, still same arefacts.
    The artefacts are appearing above ALL shaders, terrain shaders are from the RTP system, but the rocks are standart shaders and also affected.
    Is it because the camera has a rather high point of view (pseudo isometric)? Is you fog system only applicable for firstperson view?
     
  16. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Hi!

    Volumetric Fog & Mist works from any view. The banding effect occurs because the number of samples is too low to create a smooth transition. This can be reduced increasing stepping parameter or when banding occur near the camera, you should reduce the Stepping Near parameter instead.

    However increasing stepping too much will make the rendering slower.

    To help reduce these artifacts even more we have added a new "Dithering" option in latest update. Check these screenshots for an example. Notice how banding near the corners of the fog area are reduced:

    Without dithering:


    With dithering:


    We'll submit this update very soon but you can grab the beta today from our forum on kronnect.com.
     
    one_one likes this.
  17. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    These screenshots were shared over reddit. Nice and creative use of the asset:





     
  18. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    513
    Never thought it could be used for polar lights, awesome!
     
  19. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    I cranked stepping up to the max, still the banding appears.... with more bands visible, makes not much of a difference though. It doesn't look at all as in the screenshots you put up. What is the difference between my setup and yours? What is the banding dependant on? Viewrange? Shadow range? Renderer? Lighting?

    Problem is not just appearing close to the camera, but over the full viewrange.

    Any ETA on when dithering will be available on the unity store?
     
  20. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Hi!
    The update was submitted yesterday.

    Dithering is a new option that reduces banding - it works better when bands are narrow. It would be possible for you to send me a repro case with the camera, terrain and the fog script attached as you showed in that screenshot?
     
  21. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    I will try to update to the new version as soon as it is available on the store, and see if dithering does anything to reduce the problem.
    If I still get banding, I will prepare a test project and send it to you.


    Thanks for the quick response!

    Gian-Reto
     
    Thrawn75 likes this.
  22. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    V5.0 is now available on the Asset Store:

    This new release includes:
    - New "Edge Improve" option to reduce fog bleeding/pixelization over geometry edges when downsampling is increased.
    - New “Dithering” option to reduce banding artifacts.
    - Inverted areas (spherical and boxed) are now accurate and works from any view angle.
    - Dynamic Fog & Mist (included in package) updated to V1.7
     
  23. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Okay, newest version is available in the Asset Store. I downloaded it, and played around with it.

    Sadly dithering does not make my problem go away, but I found something else that might help to find the root cause:

    My camera can be zoomed in and out. Zooming is done by moving the camera, no changing the FoV. Its about 8x zoom from the closest to the fartest setting. Playing around with the zoom I found that as I reach about 4x-3x zoom, I somehow enter a zone where the problem disappears! The volumetric fog looks like I think it should look, no weird banding issues, set up correctly looks quite spectacular.

    Zooming in to the closest setting, looks like the volumetric fog disappears altogether. Distance and Distance falloff is set to 0, so I don't think this should happen. Of course, as the camera is pointing down at an angle, viewdistance is quite limited at this point.
    Because no fog is visible any longer, at this point the light scattering looks really weird... first thought it was a visual artefact but it seems just to be the light scattering.

    Any idea why the fog seems to work in a narrow band between 10% and about 35% of the full zoom range?


    If you need it, I can try to reproduce the problem in a new project.


    Regards

    Gian-Reto
     
  24. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Please send us the repro project to contact (at) kronnect.me

    We'll try to have this fixed/improved asap for v5.1.
     
  25. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Alright, thanks to a repro case we've received, a working beta 5.1 is now available with important improvements on this area.

    The banding issue happened for low fog thickness and density. The new update handles this much better. Take a look:

    Before the update:


    After the update (no changes in configuration):


    We'll submit the update soon - in the meanwhile you can grab it from kronnect.com.
     
    montyfi likes this.
  26. StonePaleAle

    StonePaleAle

    Joined:
    Aug 20, 2012
    Posts:
    26
    Here are a few screenshots on a Gaia terrain. These are just quick tweaks to some of the presets provided.
    On the last couple, I have the Far Clip Plane set just beyond where the fog starts to thin. Works great!
    Really loving this asset so far!





     
    turboscalpeur, Shawn67 and Thrawn75 like this.
  27. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Hello there,

    Some users have reached us asking for a fix or suggestions to speed up build time on Windows platform. This post tries to explain why Unity can take so much time compiling some complex shaders like Volumetric Fog & Mist, and a workaround to speed up this process.

    Firstly we recommend you to sign up on this forum if you have not done before to grab latest update which will always include some nice improvements.

    The reason a Windows build takes so much time (indeed it seems to hang but it will finish if you give it enough time...) is that Volumetric Fog shader uses lot of keywords to ensure the best performance. During the build process, Unity compiles a version of the shader for each platform (dx9, dx11, gles, …) and each keyword combination.
    In the end, this can take a even some hours to complete, but once you build it once, it will be lot faster next time as Unity caches the build output of the shaders.

    Now, there’s a workaround to speed this build process.

    You need to edit VolumetricFog.shader file and locate the lines starting with "#pragma multi_compile xxxxx” where xxxxx are the keywords. Each keyword refer to a shader feature, for example, Fog of War, Point Lights or Light Scattering (read the documentation for a description of each keyword purpose).

    Delete any of those keywords (or even the pragma multi_compile completely) that you don’t use .

    As you decrease the number of multi_compile directives, the build process will speed up. But as commented before, just be patient the first time you launch the build.

    This is a know issue with Unity – it seems that they’re improving it in 5.4 and on Mac the build process take 5-10 minutes as much since it only compiles for OpenGL platforms.

    Ok, you may be asking, why does this happen with this shader and not others? Well, because we want the best performance for your game and because any extra instruction or code in the shader means less FPS for your game. We could have omitted the multi_compile directives and instead use classic “if” sentences, but that will affect shader performance anyway, since most of the time the GPU process in parallel blocks of code and ultimately can discard branch results that are not useful – but that means extra work for the GPU and can add lag to the main execution of the shader.

    Hope this info helps – if you have any question or need help editing the shader, let me know.

    Thanks.
     
    StonePaleAle likes this.
  28. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Hi everyone,

    Version 5.1 is now live. Here's a summary of what's new in 5.1 from older versions:

    - Reduced banding artifacts: on some cases, and due to the nature of the ray-marching fog, some banding can occur. Version 5.1 modulates the final step so it takes into account the fraction of the ray, instead of a full step, decreasing the banding effect that happened in previous versions. Note that this banding artifacts only occurs when the fog crosses a geometry near the camera and it has a low density. With version 5.1, this effect is largely diminished.

    - "Edge Improve" option: this option can be enabled when using downsampling. When using downsampling x2, x3 or x4, the fog is rendered to a off screen buffer and then composited with the scene applying bilinear upscaling. This has the side effect of adding artifacts around some edges (the degree varies depending on the contrast of the front and back geometry around the edge). With the new Edge Improve option, the shader uses a nearest depth algorithm around geometry edges, thus picking the fog intensity more appropriate from the surrounding pixels. Note that when using the fog as a cloud layer, this option is not necessary as the artifacts are mostly invisible over the sky (no crossing geometry)

    Thanks to this option, downsampling x3 or x4 can be used now without so much pixelization, which is important since applying downsampling will boost performance significantly. You can have this option among your quality settings in your game.

    - Dithering: another option that helps reducing banding. Dithering is better used when you limit the fog around a zone. In this case, the fog will show a clear cut around the borders (or the sides, if you choose a boxed area) where banding can occur. Dithering will jitter the ray start so the bands will mostly disappear.

    - Dynamic Fog 1.7 update: this fast fog shader can be combined with Volumetric Fog to create nice effects. Check out the high clouds demo scene where both assets are used, dynamic fog for a ground fog and volumetric fog to create floating clouds around the peak of a mountain. The latest update includes some performance improvements as well as a secondary color which allows you to create a gradient fog.
     
  29. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    320
    Hi,

    Volumetric Fog and Mist looks fantastic.

    I'm currently working on a game with a sophisticated wind simulation, driven by Megaflow. To visually represent the wind, I have a series of large particles that float around the scene, driven by the vector field; these of course are quite performance heavy, and suffer from clipping issues etc.

    Volumetric Mist would look infinitly better, and I could probably closely approximate the wind direction using manual placement and setting of volumes. However, I just wondered if it would be remotely possible to drive the motion of the Volumetric effect from the vector field directly? This would allow for more sophisticated wind, vorticies etc within the mist.

    Cheers
     
  30. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Thank you. Yes, Volumetric Fog looks fantastic and adds lot of ambiance to the scene. However it's important to note that Volumetric Fog accepts a single vector for the wind direction and a scalar for the speed. The fog entirely moves along this vector. Unfortunately It's not possible to define complex flow like you need currently with Volumetric Fog & Mist (vortices, different flows inside the fog, etc).

    Regards.
     
    Karearea likes this.
  31. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Hi... I also was able to reproduce the problem in a different project, but it seems that is moot now.
    How can I get access to the newer version at kronnect.com?

    Also, another question: is there a way to make the mist react to shadows? Like baked or realtime shadows?
    I guess that would be too much to ask, still, maybe there is a way.


    Regards

    Gian-Reto
     
  32. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    The usual way to get latest updates is to sign up on kronnect.com and send a pm to Kronnect with your order number. After a quick validation you get access to the private beta board where you can download latest, full version.
     
  33. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    320
    Hi,

    Regarding the feature list, I see you can add a void area and have it track the player, to blank out close-in fog. You also mention a void can be inverted, so presumably you could have a small volume of fog always tracking the player. If you run with this setup, would the fog in the void around the player move with the player, or would it relate to world space. ie If you run forward with an inverted void area attached to the camera, would it appear that you're running through fog, or would it appear that the fog is travelling along with you?
     
  34. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    @Karearea with latest beta you can have both, either a:

    - Static Fog Area, like shown in this video. You can set the position, height and radius (and rest of parameters like wind animation and direction, .....) but position is specified manually.


    - Following Fog Areas, whose position can be linked to any game object (for example your character). You may shift up or downward the fog area using baseline property as well, so you can position the following cloud below or above the character. Video:


    We had to tweak a little bit the inverted area so it could follow characters in this mode - this new feature is available now on kronnect.com and soon on the Asset Store.
     
    Shawn67, Karearea and ephemeral-life like this.
  35. ephemeral-life

    ephemeral-life

    Joined:
    Sep 12, 2015
    Posts:
    488
    That inverted void area looks amazing in motion.
     
    Thrawn75 likes this.
  36. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    320
    Thanks! That's exactly what I was hoping for- I'll buy a copy in the next week or so.

    Cheers
     
  37. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    2,196
    heheh.. This makes me think of Pigpen from Peanuts... heheh
     
    Thrawn75 likes this.
  38. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,073
    Couple of test scenes that use Volumetric Fog & Mist…. The top one is the End of the World preset, the second is Sandstorm 1… a few tweaks but mostly out of the box. Thanks for a great asset! Very easy to use and the new dithering looks really good (video compression created the banding in the videos).



     
  39. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Cool! First sequence reminds my of City of Bespin. :)

    Thanks for sharing.
     
    wetcircuit likes this.
  40. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Great shots from @turboscalpeur gallery using Volumetric Fog & Mist, HQ Photographic Grass and others.





     
  41. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    V5.2 is now available with requests from community!

    Improvements:
    - New dithering algorithm that applies to sky haze which contributes to extra banding reduction
    - Fog of War: new params to control delay and duration of automatic fog restore after setting alpha
    - Improved included alternate sprites shaders (unlit & diffuse) to accept vertex colors.
    - Ability to follow a character when using fog inverted mode.

    Fixes:
    - Fog would shift height under some circumstances
     
    turboscalpeur likes this.
  42. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    214
    Has this been tested in VR?
     
  43. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
  44. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Thanks to X-Frame FPS Accelerator now it's possible to use Volumetric Fog & Mist on mobile. If anyone is interested in trying out, there's a free demo on the asset store page.

    Cheers!
     
    wetcircuit likes this.
  45. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    367
    Hello there,

    I'm wondering if your fog works:

    1. On deffered
    2. Using a 360 camera

    I use a plugin called VR Panorama that basically takes 360 screenshot and then it makes those screenshots into 360 videos. The main problem is that a lot of camera effects don't work. For example the unity fog does not work.

    I also use Unistorm and set up the scene weather to "Tunderstorm" which uses Unity fog to create a pretty cool effect. It's foggy and dark... you can really see the "thudnerstorm" :p I'm thinking to take this plugin and replace the Unistorm's default fog with this one.

    Thanks
     
  46. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    It works on deferred, but can't speak for the VR Panorama plugin. I'll send you a demo so you can try it.
     
    2dgame likes this.
  47. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    489
    Can this asset be used to replace clouds in Time of Day? I'm looking to have volumetric clouds that players can fly through.
     
  48. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Given other assets like Sunshine support decent mobile and vr performance, what would you recommend regarding this asset?
     
  49. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    You can have some cloud-like accumulation over an area which you can cross, for instance around the peak of a mountain. Also you can have an elevated, continuous cloud-like layer over your head but it's NOT intended to work as a real cloud system where you can have different isolated cloud formations of different styles (nimbus, cirrus, ...) combined to create a whole sky.
    The asset includes several demo scenes where you can play with different possible setups including a few that looks like clouds. But remember this asset is focused of fog/mist effects.
    Take the demo and see for yourself:
    http://kronnect.me/unity/vfm/VolumetricFogDemo.unitypackage
     
    Last edited: Jul 14, 2016
  50. Thrawn75

    Thrawn75

    Joined:
    Nov 16, 2014
    Posts:
    2,233
    Sunshine is a different effect. AFAIK it creates light volumes from shadows. Volumetric Fog projects animated mist over the scene or defined area and gives you different options like void areas or fog of war. Take the demo from previous reply and give it a try.