Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Fog Volume 3

Discussion in 'Assets and Asset Store' started by DavidMiranda, Jan 30, 2014.

  1. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    All depends on the stuff you activate. FV can be as costly as you want.
    Can you make fog walls?
    You are totally right. That was fixed days ago. Can't wait to update :)

    Yes, I was not filtering light types and it tried to use pointlights if any was found ^_^ But ye, its working fine now.
    Copy the function:
    Code (CSharp):
    1.   void FindDirectionalLight()
    2.     {
    3.         //pick a light
    4.         Light[] SceneLights = FindObjectsOfType<Light>();
    5.         //first, try to get it from light settings
    6.         if (!Sun)
    7.             Sun = RenderSettings.sun;
    8.  
    9.         //not yet?
    10.         if (!Sun)
    11.             foreach (Light TempLight in SceneLights)
    12.             {
    13.  
    14.                 if (TempLight.type == LightType.Directional)
    15.                 {
    16.                     Sun = TempLight;
    17.                     break;
    18.                 }
    19.             }
    20.  
    21.         if (Sun == null)
    22.         {
    23.             Debug.LogError("Fog Volume: No valid light found\nDirectional light is required. Light component can be disabled.");
    24.             return;
    25.         }
    26.         else
    27.         {
    28.  
    29.             //remove fog layers from light 3.1.8. Light must not affect the volume we want to use as density for the screen effect
    30.             Sun.cullingMask &= ~(1 << LayerMask.NameToLayer("FogVolumeUniform"));
    31.             Sun.cullingMask &= ~(1 << LayerMask.NameToLayer("FogVolume"));
    32.         }
    33.     }
     
    mkgame and ajaxlex like this.
  2. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Yes, that sounds good to me. A fog wall would be a good solution.
    Good answer ;)
     
  3. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    You mentioned not to expect volumetric lighting yet. Is it possible now to create a similar effect that's not as cloudy? I have an interior building scene and would like a volumetric lighting effect coming through the windows from the primary directional light and a light mist on the ground. Is this possible with Fog Volume 3, or would it be better to use this plugin in combination with another to achieve the effect?
     
  4. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Yes Sir! It is implemented now. Check the scene "Interior primitives"

     
  5. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Im not proud of this but I had to do it :)
    How to enable and use Volumetric Shadows:
     
    Weblox, John-G and blitzvb like this.
  6. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    If at all possible, I'd like to request tutorials (PDF and/or video) for your scenes. Fog Volume 3 is amazing, but extremely complex. I've spent hours with it already and am still very confused. I'm working through the Interior Primitives scene, but feel completely lost.
     
    floatpt and Malcolm_TTART like this.
  7. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
  8. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Just wondering what Terrain system you are using because the terrain also looks pretty nice?
     
  9. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
  10. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    worldmachine

    @wetcircuit is back! Thanks for sharing. It looks pretty cool
     
    wetcircuit likes this.
  11. Polemus

    Polemus

    Joined:
    Nov 14, 2016
    Posts:
    28
    All i saw was ... DAMN... nice unity window layout!!!!!
     
    blitzvb likes this.
  12. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Some updates:
    3.2 is released. Highlights: GI support from proxy volumes
    And first official tutorial (beginner level). We'll go step by step
    Enjoy the beauty! We will make our best to provide better docs and videos!
     
    rrahim, Vondox, Seneral and 5 others like this.
  13. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    Hi David just so you know I think there is a bug in the latest version of fog volume that you have released on the asset store. It works fine in the editor but if you try and compile it it gets errors trying to compile the shaders for directx 9. If you go into the settings and remove directx 9 as a compile option it works fine in directx 11 though and will build.
     
  14. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Hello Ian,
    Yes, Im aware of that. There are too many variables for dx9. As you said, modify the shader to avoid dx9. I do the same here :)
    But it works in dx9 even with those errors. To solve this I have to rewrite some portions of the pointlights and primitives, to avoid such big amount of arrays.
     
  15. rolanddischain

    rolanddischain

    Joined:
    Jul 20, 2017
    Posts:
    1
    [SOLVED]
    solution provided below by the author

    Hello,
    I have recently purchased FogVolume 3.0, imported it in the clean project with Unity's own Post Process package.
    When I run any scene I get following error :
    ForError.PNG
     
    Last edited: Jul 20, 2017
  16. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Do this
     
    rolanddischain likes this.
  17. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    573
    does this unity asset render to webgl and can you upload a demo please
     
  18. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    That's a good thing to do. I had a successful test months ago, but I have to check again.

    Thanks for the idea
     
  19. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    Thanks for the tutorial. Definitely looking forward to more extensive tutorials for all the associated demos we can checkout! Thank you.
     
  20. kerrmedia

    kerrmedia

    Joined:
    Nov 4, 2015
    Posts:
    250
    Just purchased based on Gaia integration. Tried the demo scene in latest Unity, saw a lot of pixelation?
    Just wondering if there is a setting somewhere to make it better? pixelated_clouds.JPG
     
  21. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    The downscale slider in the flog volume renderer component thats attached to the camera is probably the first thing to experiment with - smaller numbers give higher quality. But as usual with these sorts of things its a tradeoff between performance and visual quality.
     
    DavidMiranda likes this.
  22. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Second tutorial! In this one we do this in 10 minutes:
    21-07-2017 06.12.07 x1.jpg

    We learn about gradient textures, in-scattering, ambient color, volumetric shadows, low-res and edge-aware upscale. It is easy and it doesn't take too much time!


    The required content is in Demo content package . We start with a version of the scene "Static Volumetric shadows" without any FV on it.
    The finished scene is this: https://goo.gl/YzdrZJ
     
    Last edited: Jul 23, 2017
    Mauri, Lex4art, jabevan and 2 others like this.
  23. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    573
    is there a especific camera settings that is required, or it works just out of the box, i am asking since i wish to use it for a webgl first person shooter demo
     
  24. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    The name of that scene is "Fast Clouds". Quality is usually linked to render time :)

    humm, nope. Anything special is required in the camera
     
    Last edited: Jul 23, 2017
  25. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Thanks for the acknowledgement. It was good to wait until we had a more solid and definitive version before starting with the tutorials.
    This second video will keep you guys busy for a few days :)
     
    Seneral, wetcircuit and jabevan like this.
  26. kerrmedia

    kerrmedia

    Joined:
    Nov 4, 2015
    Posts:
    250
    Looks great, can't wait for Gaia integration as well.
     
  27. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    Hi David, I wanted to upgrade and I get this... not sure what is the benefit here.

    upload_2017-7-25_9-6-23.png
     
  28. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Humm, the benefit is that you save what you paid when you bought the old version.
     
  29. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I think the confusion/complaint is because the asset is on sale at the moment, and the sale price is currently the same as the upgrade price.
     
  30. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    The standard sale price is higher. This is what I see
    2017-07-25_12-23-27.jpg
     
  31. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    It might just be that unity store is showing upgrade stuff in a confusing way - If I look at asset store without being logged in then it does not show fog volume 3 as being on sale. If I look at it when logged in then I see the same as the screenshot jimburn took above (I own v2 on store) and it also has the orange 'on sale' box round it in lists. So I guess the store is showing special upgrade price as being a sale price, and the asset as being on sale, which is a bit confusing.
     
  32. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    It looks correct to me. It shows the corresponding discount when you own of the old version
     
  33. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I dont mean it is wrong, I mean it can be confusing for users the way unity shows this - ie if they see it they may think there is a special sale price for fog volume in general at the moment, not realising it is a special upgrade price only, that the sale is only for people who own a previous version. eg maybe jimburn thought that everyone can get 36% off fog volume 3 at the moment, as opposed to this being the discount for him & others that own the previous version.
     
  34. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    humm, yeah. Seen from that point of view, it can be confusing indeed.

    Regards
     
  35. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    I think that you didn't look at the picture carefully. The upgrade cost the same than the promotional price, so being a customer from version 1 is just a waste. The latest version seems awesome, but total I will have spent a lot cumulatively from the 1st version. Feeling like a milked cow at the moment.
     
    Last edited: Jul 25, 2017
  36. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,674
    @elbows has this right. Lately the asset store is presenting product upgrades as "sales." This is an error on their part, and hopefully they fix it soon.
     
  37. Polemus

    Polemus

    Joined:
    Nov 14, 2016
    Posts:
    28
    I feel your pain. asset creators are milking us dry for a product that we already purchased.... Greedy buggers
     
  38. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    These moaning posts make me very sad - of all the places where a discussion about unfair upgrade prices could be had, this asset is not a good candidate at all for such complaints. Version 3 of the asset is massively different from the previous ones, its really like a brand new system in terms of what it offers, and the upgrade price is very fair in my opinion. In fact its a complete bargain.

    And the original complaint was based on a misconception that the asset was also on sale for the same price as the upgrade price, which is just not the case.
     
    wetcircuit, tapawafo, hopeful and 3 others like this.
  39. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    And believe me, I do understand the complaint in general, just not with this asset. I have upgraded at least 2 other assets that did not turn out to be a good value upgrade by any stretch of the imagination, but fog volume 3 is brilliant and I could never have that complaint about it, its obvious how much work has been put into this version.
     
  40. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I mean seriously, not only was fog volume 3 a huge leap from previous versions, but quite a lot of new functionality has been added after the initial release of v3. Sorry for moaning so much about the complaints, but I'm hard pressed to think of an asset that has given me as much value for money as this one so it is hard not to rant about the injustice of seeing such complaints directed at this asset.
     
  41. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    309
    I'm diving back into Fog Volume, as the virtual world I'm building for has not only gotten it whitelisted but also gotten things updated for the current version. I'm having a really hard time of things. The documentation (once you get past all the showcase slides) is difficult to follow, and almost immediately looks very different from what I'm seeing in the editor when I try to load the 'fast clouds' scene and follow along (I'm in Unity 5.6.2p4 on macOS, running FV 3.2).

    What I am trying to create is rolling dust clouds at ground level in a desert scene. Something like Scotland might be perfect, all I'd need to do is resize to 12km x 12km and then adjust the color on the ground level stuff to give it the right look and feel. Unfortunately I am unable to find anywhere I can adjust the size - I've looked through the videos and the slideshow docs, but where the video shows fields to make changes... I don't see it.

    For example, in the tutorial 1 video, at 1:29 it shows the Fog Volume Script panel looking like this:
    FVtutorial1_129.png

    But what I see in Unity 5.6.2p4 is this:
    FVtutorial1_tbd.png

    Did I miss something in my setup, or do I have some Unity preference set up the wrong way?

    Creating a new empty scene (with just the default directional light and camera), then create -> other -> fog volume gives me an editor window that looks like this, note that there are no other panels in the Fog Volume script section.
    FVnewscene_uniform.png
     
  42. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    humm, I downloaded that version and FV from the store and it worked for me.
    2017-07-28_22-42-23.jpg
    My only guess is that it could be a problem with mac, but still, it's very strange.
    @elbows must know, he runs FV on mac
     
  43. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I've never seen anything like that problem, though I will test with those exact versions some time on Saturday and let you know.
     
  44. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    309
    I just tried on a MacBook Pro with an Intel Iris Pro 6100 integrated GPU running Unity 5.6.2p4 on a clean project, and I'm seeing more options.

    FV32_intelmac.png

    I'm hoping that maybe it's an issue with my project file on the desktop machine (Mac Pro with dual AMD FirePro D700's), I'll try rebuilding as well as testing that machine with a clean project when I get a chance.
     
  45. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I'm glad you are onto something because I tested it out today and that combination of versions works on my mac, so I'm not much use.
     
  46. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    309
    Back onto the Mac Pro, I found that it was still not working, and re-DLing/re-importing on its own still wasn't getting me any different results. Next step was to manually remove the FV folder, and then rebuild the project and download/install a fresh copy from the asset store. Woohoo, finally working! Hopefully I'll have rolling clouds of dust in the Black Rock Desert in no time.
     
    wetcircuit likes this.
  47. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    126
    Hi there,

    Does this asset work well if I have several fog volumes at once?
    I am thinking of a battlefield field where there is a lot of smoke from gunpower but only in a number of areas while other areas of the battlefiled oare clearer.
    Thanks
     
  48. kerrmedia

    kerrmedia

    Joined:
    Nov 4, 2015
    Posts:
    250
    Quick start guide? The documentation link is useless, its just a slide show? Bought the package, imported, now, how to add to my scene?
     
  49. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    309
    Yeah, the slideshow doc is maddening, but keep going past the promotional material stuff and there's some instructional stuff in there. Also, there are a couple tutorial videos up. Here's the first one.



    I still consider myself to be a novice with FV, but what I'd recommend is that you click the link to download the FV Demo Content and then add that custom package. It gives you demo scenes for everything in the promotional material part, which you can pick apart and play with to learn more about how each type works.
     
  50. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    humm, its hard to navigate, right? Maybe because there are too much content?
    What format would you prefer?
    Humm, they are transparent shaders, so they don't mix well when overlapping. The only thing we can do is to sort them manually.

    In the next video I add clouds to the scene used in the tutorial 2. Its a 20 minutes video where we introduce only a few new concepts: noise, height gradients and primitives. Clouds are the most complex, so 90% of the video is fine-tuning.
    This was the result:
    2017-07-31_12-21-54.jpg
    Previously, with no hurries, I made this one. Technically, it is exactly the same, but invested more time. Top clouds are FV too.

    2017-07-27_16-10-53.jpg

    Both scenes are attached here, if someone wants to play with them.
     

    Attached Files:

    Seneral likes this.