Search Unity

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

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

  1. crowmaster

    crowmaster

    Joined:
    Jul 6, 2012
    Posts:
    80
    Can i create underwater effect using this package?
     
  2. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Yes. For example, in URP, you can place a fog volume under the water level and customize the density and other settings to match the desired visuals.
     
  3. crowmaster

    crowmaster

    Joined:
    Jul 6, 2012
    Posts:
    80
    I am currently using builtin renderer, is it still possible?
     
  4. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Yes.
     
  5. Rustamovich

    Rustamovich

    Joined:
    Sep 5, 2014
    Posts:
    36
    Hey, @Kronnect
    I'm looking for Fog for my Oculus Quest VR game. All current solutions I've found use Depth Texture for URP, and they are not working together on Oculus Quest, Are any possible solutions for using fog in such restrictions?

    Thanks
     
  6. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Use Dynamic Fog & Mist 2. It works well with URP in Multi-Pass and Multi-View. It's free purchasing Volumetric Fog & Mist 2.
     
  7. Rustamovich

    Rustamovich

    Joined:
    Sep 5, 2014
    Posts:
    36
    But I've read in instructions that I need to enable depth texture, and this thing is broken for oculus now
     
  8. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Which Unity version? It looks fine to me in 2021 LTS.
     
  9. Rustamovich

    Rustamovich

    Joined:
    Sep 5, 2014
    Posts:
    36
    I use 2021.3.16f1
     
  10. Rustamovich

    Rustamovich

    Joined:
    Sep 5, 2014
    Posts:
    36
    @Kronnect do I need to use depth texture with you asset?
     
  11. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Yes.
     
  12. Francoimora

    Francoimora

    Joined:
    Aug 1, 2013
    Posts:
    68
    Hi Kronnect ! Last year, I posted about an issue when the fog follows the terrain and we update the position (see https://forum.unity.com/threads/vol...w-clouds-and-mist.371147/page-22#post-8357232).

    To repro this issue, you can add a script that randomize the position of the volumetric fog every frame :

    Code (CSharp):
    1. _currentVolumetricFog.transform.position = targetPosition + new Vector3(Random.Range(0, 10), 0, Random.Range(0, 10));
    Here is an example of what will happen :

    CleanShot 2023-02-17 at 23.42.36.gif

    I finally had some time to search for a solution and I found that it happens because the render of the surface cam is delayed, so it sometimes shows an old texture to a new position. The temp fix I found is to force cam to render instead of scheduling it. Here is how I modified the method in VolumetricFog.Terrain.cs :

    CleanShot 2023-02-17 at 23.09.57@2x.png

    Do you have the possibility to make something like this as part of the package ? Thanks !
     
    Kronnect likes this.
  13. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Confirmed, thank you!
     
  14. mchangxe

    mchangxe

    Joined:
    Jun 16, 2019
    Posts:
    69
    Hello Kronnect, great asset as always! Just a question, when built to android, the fog always appears infront of other objects, when in fact it should be behind a cube. Works fine in the editor in play mode. One observation is that when the editor is not in play mode, the fog glitches moving infront of and behind the cube back and forth. It seems like its a rendering order issue?
     
  15. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Hi! If you’re using URP, please make sure Depth Texture is enabled in the URP renderer. Check all URP assets assigned to each quality level defined in Project Settings/Quality.
     
  16. mchangxe

    mchangxe

    Joined:
    Jun 16, 2019
    Posts:
    69
    yes they are enabled indeed! But the sorting layer problem still exists
     
  17. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Are you using the Volumetric Fog Render Feature? There’s a render event parameter to specify the injection point.

    Also, try using deferred or changing the depth priming mode option in forward rendering path.

    Other than this, send me a pm with a simple repro of you wish.
     
  18. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    New v10 with Scattering option for URP!

     
    DylanF and ratking like this.
  19. VirtualDestructor

    VirtualDestructor

    Joined:
    May 3, 2014
    Posts:
    44
    I just started using the package. I am using it for low lying fog, and mist. It has been working well.

    Instead of having volumes absolutely everywhere, I'd like to have a traditional non-raymarched fog effect simultaneously. Is creating one volume with distance fog (density set to 0) the most efficient way to do this? Or can this package be combined with the Dynamic Fog & Mist 2 package?
     
  20. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Hi,
    Yes, you can combine both.
    If you use the URP version, Volumetric Fog has a Distant Fog option integrated which works similarly in addition to the raymarched effect.
     
  21. VirtualDestructor

    VirtualDestructor

    Joined:
    May 3, 2014
    Posts:
    44
    Thanks for the response. I am using URP, it's a VR game running on Windows. I am noticing banding when I try to use the distance fog option (I haven't tried dynamic fog & mist yet).
     
  22. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    I'll check that. You can also post that on the support forum - there you can also download latest beta versions.
     
  23. Spsama

    Spsama

    Joined:
    Dec 12, 2022
    Posts:
    1
    I use Dynamic fog in URP Vesion whith VR Mode,It will display normally on Quest 2 or Quest Pro,But it doesn't show normally on Vision Pro, it shows that the depth texture is displayed incorrectly, I tried adjusting various fog parameters,Seems to have failed to solve, please ask for any clues
     
    Last edited: Apr 10, 2024
  24. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Hi!
    Unfortunately we don't own a Vision Pro unit so we can't test with it although we're trying with the help of some users. It's related to foveated rendering. To some users it seems that if you enable ambient occlusion, some of these issues go away (because probably ambient occlusion is disabling foveated rendering).
    Regards.