Search Unity

Fog Volume 3

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

  1. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Well, these names are more or less descriptive, matching the inspector names. DF corresponds to primitives, that one was not descriptive. I don't like either having such big amount of variants, but that was the only way to make the plugin flexible, with many options. I wish there was a better way.
    But the idea is simple, if you are not going to activate volumetric shadows, comment this line:
    #pragma multi_compile _ VOLUME_SHADOWS
    If you don't need lights, comment this out
    #pragma multi_compile _ ATTEN_METHOD_1 ATTEN_METHOD_2 ATTEN_METHOD_3

    And so on. Hopefully you will only need to remove a few.

    Sorry for the inconveniences. I understand and share the nuisance.
     
    dsilverthorn likes this.
  2. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Humm, yes. It was designed like that for good reasons. But it is possible to hack this. Find this function: void MoveToLayer() And comment out the layer assignation.
    FogVolumeGameObject.layer = LayerMask.NameToLayer("FogVolume");

    Note that some functionalities may not work such as shadows (received from another fog volume) or lowres rendering.
     
    dsilverthorn likes this.
  3. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Didn't it? It always worked fine with reflection probes
     
  4. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Humm, weird. I just loaded a fresh project and created one, and it is fine. even the lowres script in the camera works correctly. Console is clear 2020-02-24 19_38_10-Clipboard.jpg
     
  5. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Mobile is very problematic. In principle there is nothing special to do, but only Uniform Fog Volume (default setup) will work with certain guarantees. Is your volume uniform? (without noise or gradients enabled)
    The type is shown at the bottom of the FV inspector
    2020-02-24 19_51_29-Clipboard.jpg
     
  6. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    One package that I can recommend to solve the issue of too many keywords being used is: Shader Control by Kronnect. What this does is basically give you an UI to manage shader keywords by commenting them in/out.

    @DavidMiranda Have you looked into using local shader keywords? They have introduced that kind of recently (not sure if in 2018 or 2019). See also: https://docs.unity3d.com/Manual/SL-MultipleProgramVariants.html (section "Local keywords").
     
    dsilverthorn and Hawk0077 like this.
  7. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,327
    No it didn't show up in reflection probes.
     
  8. tarrabass

    tarrabass

    Joined:
    Jun 4, 2015
    Posts:
    26
    Hello
    i have a issue on Unity 2018.3.0f2
    cloud work perfectly on editor but doesn't work on built
    do you have any idea ?
     
  9. ericthelander

    ericthelander

    Joined:
    Jan 15, 2018
    Posts:
    2
    I had the same issue. The workaround I came up with was that you need to have the game window active when building. My workstation has two monitors and I have the editor window on one monitor and the game window on the other. This resulted in a faulty build. Restore the window layout with the editor and game tabbed and have the game window active.

    Best of luck!
     
    laurentlavigne likes this.
  10. jfml

    jfml

    Joined:
    Mar 8, 2018
    Posts:
    5
    Hi, sorry if this has been answered before but I guess it's not possible to have primitives with different colors? I'm blanking on how to achieve this (accept for maybe with lights?). Thanks a lot in advance!
     
    Last edited: Mar 31, 2020
  11. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    It works

    Do the following:
    1. make the FV you want to be reflected to be visible by the probe 2020-04-09 12_01_02-Clipboard.jpg

    2. Make the surrogate layer invisible for the probe
    2020-04-09 12_01_25-Clipboard.jpg

    Done
    2020-04-09 12_03_25-Clipboard.jpg
     
    dsilverthorn, Seneral and wetcircuit like this.
  12. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    I found the issue. Go to FogVolumeRenderer.cs and comment out lines 784 and 787
    2020-04-09 12_17_03-Clipboard.jpg
     
  13. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,327
  14. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,327
    Nebula 3 Volumes rotate and translate with w and e.
    scale doesn't do a thing.
    If I parent the cubes defining the volume then scale them, the 3D pattern doesn't follow the scaling
    how do you scale such volume?
     
  15. marcoSquad

    marcoSquad

    Joined:
    Jan 23, 2020
    Posts:
    2
    I'm having trouble getting the sphere primitives to work. After a lot of struggle I managed to get the desired result, I have one fog volume using a single sphere primitive and another using the max amount of 20. They are both looking fine in the editor now, but in an actual standalone build they both look like cubes, exactly the way they look in the editor if I turn off the use primitives setting. I logged the amount of primitives used with GetTotalPrimitiveCount and GetVisiblePrimitiveCount and I'm getting 1 and 20 as expected. Do you have any other idea what might be the problem?
     
  16. marcoSquad

    marcoSquad

    Joined:
    Jan 23, 2020
    Posts:
    2
    I've found that this behavior only happens when you instantiate a prefab fog volume. If you have it in the scene already, it works fine.

     
    dsilverthorn likes this.
  17. jfml

    jfml

    Joined:
    Mar 8, 2018
    Posts:
    5
    Hi, is there a way to not optimize (I guess that what's going on?) FogVolume-primitives when you zoom out:

    upload_2020-5-1_8-41-21.png

    I'm trying to do an astronomy related simulation with nebulas and it would be cool if there was a way to make them look more detailed from far away. Is there a way to achieve this?
     
  18. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    Hey everyone Whats the name of this method??
    The transition i mean
     
    Last edited: May 6, 2020
    wetcircuit likes this.
  19. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    cgcgunity_044 likes this.
  20. XANTOMEN

    XANTOMEN

    Joined:
    Dec 18, 2012
    Posts:
    41
    I subscribe to that. I'd definitely buy this asset if it worked on URP and kept the primitive boundaries feature functional :D
     
    look001 likes this.
  21. invictus24

    invictus24

    Joined:
    Sep 17, 2017
    Posts:
    2
    Hey, can I use this volume fog in HDRP?
     
    Skotrap7 likes this.
  22. Skotrap7

    Skotrap7

    Joined:
    May 24, 2018
    Posts:
    125
    Would love to know this too. Bought this asset a long while ago, and would love to continue using it on HDRP.
     
  23. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    The scale is modified in FV inspector. Unity's transform scale didn't work well
    2020-06-30 10_20_27-Clipboard.jpg
     
    laurentlavigne likes this.
  24. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Yes, that's the detail layer draw distance
    2020-06-30 10_25_59-Clipboard.jpg
     
    wetcircuit likes this.
  25. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    @XANTOMEN @invictus24 @Skotrap7
    At the moment I don't plan to put my hands on URP. I have spent some days studying it, but it is a giant wall. It is like starting to learn graphics again from scratch. That doesn't make anyone happy or motivated.
     
    wetcircuit and XANTOMEN like this.
  26. Clavus

    Clavus

    Joined:
    Jun 6, 2014
    Posts:
    62
    Ah that's too bad. I bought this asset a while ago but all my projects nowadays are in URP.
     
    cgcgunity_044 likes this.
  27. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    375
    Hello.
    The asset works fine in the editor but not in the build. :(
    Unity 2019.3.05f and Volume Fog 3.2
    The effect is not displayed in the build. How to solve?
     
  28. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Hello. 3.2 is an old version and that problem was solved already. You can download the latest version in Unity 2019.4
     
    julianr likes this.
  29. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi @DavidMiranda !!! Do you plan to create Fog Volume for HDRP short / medium time?

    Regards
     
  30. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    humm, not for now
     
    wetcircuit likes this.
  31. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,327
    the new pipeline has problems?
    and URP?
     
  32. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    URP is a problem itself. Graphics programming is completely different now, extremely difficult and anything studied and learned before is useless now.
     
  33. look001

    look001

    Joined:
    Mar 23, 2017
    Posts:
    111
    Is this possible with the recent version? And is it available for the cheap version? I would like to make a cloud shaped like a teddy
     
  34. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Hello. Yes, it is possible since long ago :) https://twitter.com/BetaVersionOfMe/status/938008564723015682
    Only textured volume, because uniform doesn't use raymarch.
    DQR5zojXUAEjlrx.jpg
     
  35. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    Just finished my latest project, a classical music video called "By the Brook" using Fog Volume 3 for effects.

    Thought I'd share it with everyone.
    This was developed throughout the pandemic as a form of relaxation.
    The music and scene were both begun in February when everything was getting shut down. The music (composed by my wife) was finalized in late September and the scene was finally completed this week.

    The goal was for the viewer to take a few minutes and relax and let all of the world's trouble pass you by and just have a few minutes of peace before you have to get back to reality.

    I hope you enjoy the escape.
     
    wetcircuit likes this.
  36. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Thanks for posting. It makes me remember my project "The Waterfall", done in UDK 400 years ago :D River stream, animals, butterflies, vegetation and music.
     
    dsilverthorn likes this.
  37. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    I’d love to see it.
    Glad to bring you a good memory. :)
     
  38. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
     
  39. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    Beautiful!
    I love it, great work!
     
  40. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
  41. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    wetcircuit likes this.
  42. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    wetcircuit likes this.
  43. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
  44. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
  45. Deleted User

    Deleted User

    Guest

    Hi there,

    We have issue with the fog volume game object. In our project we have camera prefab.
    After each run, new fog volume game object is being added to our prefab, while the initially one game object with required camera is exists (see attachment).

    Thank you.
     

    Attached Files:

  46. look001

    look001

    Joined:
    Mar 23, 2017
    Posts:
    111
    I agree, would be nice to use fog volume for Urp
     
  47. MonkeyPuzzle

    MonkeyPuzzle

    Joined:
    Jan 17, 2016
    Posts:
    119
  48. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    thank you…

    this is all one big cloud, and I play with the noise settings of course…. a lot.

    I think the secret to these pics is when you add a Fog Volume Light, it actually adds 2 lights. Giving them different colors, brightness, and falloff creates more interesting color gradients in the clouds. Also repositioning the lights so they sit in a 'hole' in the cloud makes a dramatic focus, and offsetting the 2nd light so the shadows are different from each other makes the clouds have more 'depth'.

    I am capturing to hdr cubemap to use as a skybox, so pushing the noise settings to the max is no problem.
     
    Mark_01 likes this.
  49. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    Our latest video. Hope you enjoy it.
     
    Flurgle likes this.
  50. MonkeyPuzzle

    MonkeyPuzzle

    Joined:
    Jan 17, 2016
    Posts:
    119
    Great stuff. Thanks, I will give this a go.
     
    wetcircuit likes this.