Search Unity

Fog Volume 3

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

  1. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    309
    Both of those look pretty amazing!
     
  2. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    309
    I'm running into a weird horizon line issue in my desert dust storm scene. I set up a basic uniform fog and then added some noise and tinkered with the settings to get something that looks pretty close to what I want in the editor window.

    FV32_editor1.png

    However, when I go into preview mode to check it out in the camera, I'm getting this odd line...

    FV32_playmode1.png

    The ground is a giant plane (size 20480), and the scene uses a 6-sided cube skybox. Any ideas on how I can get rid of that horizon line issue?
     
  3. kerrmedia

    kerrmedia

    Joined:
    Nov 4, 2015
    Posts:
    250
    So when Fog Volume is enabled, the gun attached to my FPS Character controller fires bullets that are hitting something around the player. When Fog Volume is disabled, the bullets fire and go until they hit something in the scene. This is an atmospheric effect, why is this effecting physics?
     
  4. Atorcoppe

    Atorcoppe

    Joined:
    Feb 24, 2014
    Posts:
    11
    Hey all,

    Just received this as part of purchasing Unity Plus, but for some reason the fog shader just shows as pink and there are no errors or warnings in the console. Is this a known issue?

    Edit: After restarting Unity the shader has provided me with an error.
    Code (CSharp):
    1. Shader error in 'Hidden/FogVolume': failed to open source file: 'CommonInputs.cginc' at line 20 (on d3d11)
    2.  
    3. Compiling Vertex program with _COLLISION JITTER ABSORPTION
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME
    Edit #2: Seems I had it set to Linux build. Which isn't supported?
     
    Last edited: Aug 1, 2017
  5. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    @trilobyteme Increase your camera far clip or make the volume smaller
    @MrDonk Yes, go to FogVolume.shader and comment or remove this line #pragma only_renderers d3d11
    @kerrmedia humm... can you test what happens with a box collider that has "Is Trigger" enabled?
    FV is currently using a trigger volume with that option enabled. Maybe that is causing the problem
    2017-08-02_8-54-26.jpg

    So, make a box and enable "Is Trigger" and play inside of it to check if the behavior is the same
     
  6. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Hehe, so here is

    This one is more about fine-tuning. Clouds are not easy, and it takes some time to get a good result. Here is when we have to pass the human perception barrier of what is realistic and what not. So yes, it is difficult to cheat our brain :)

    Enjoy!
     
  7. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    309
    Excellent, thanks for the info and I look forward to checking out that tutorial.
     
  8. Morseliot

    Morseliot

    Joined:
    Jan 10, 2015
    Posts:
    70
    Hi David, just bought your asset, and couldn't run it. Opening any of your example scenes showing pink box only. Unity 5.5.4, what I'm doing wrong, or is there any additional setup is required?


    Update: Unity reload did solve the problem.
     
  9. Morseliot

    Morseliot

    Joined:
    Jan 10, 2015
    Posts:
    70
    Got this, 49 times

    Shader error in 'Hidden/FogVolume': maximum temp register index exceeded at Assets/FogVolume/Resources/FogVolumeFragment.cginc(705) (on d3d9)

    Compiling Fragment program with VOLUME_SHADOWS _INSCATTERING VOLUME_FOG _VOLUME_FOG_INSCATTERING _FOG_VOLUME_NOISE JITTER ColorAdjust ABSORPTION DF DIRECTIONAL_LIGHTING
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA
     
  10. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Yes, in dx9 we can't use pointlights yet. It should work fine in the other scenes without pointlights enabled.
     
  11. FPires

    FPires

    Joined:
    Jan 5, 2012
    Posts:
    151
    Is there any way for me to move the volume or the boxes while preserving the rendered volume, or do I necessarily have to move the camera to pan through the fog volume?
     
  12. kerrmedia

    kerrmedia

    Joined:
    Nov 4, 2015
    Posts:
    250
    I followed the instructions for lesson 2. Looked interesting in my test dev project. But some particle effects show square shapes when rendering, so just wondering, is this a case where I have to change something about the render orde volume_fog_and_explosion_pic.JPG r of Volume Fog so that the particle effect renders first?
     
    Last edited: Aug 6, 2017
  13. AndyUr

    AndyUr

    Joined:
    Aug 17, 2015
    Posts:
    19
    Hello, I got this asset recently and I love how it's looking so far!

    I haven't been able to figure out how to keep the same falloff behaviour when I turn on Gradient, as it was with the uniform fog.

    This is how it looks with the uniform fog. The fog is thicker the further away an object is.
    upload_2017-8-8_14-37-43.png

    This is how it looks with gradient. With this I can have the nice volumetric shadows, but I lose the falloff effect. upload_2017-8-8_14-36-48.png
     
  14. sugarbank

    sugarbank

    Joined:
    Aug 27, 2015
    Posts:
    6
    Examples/Sample scenes.
    Hi is it possible to get the examples in the sample scene demos eg.the landscape ones?
    Only Nebulas ship with the plugin.

    Cheers
     
  15. kerrmedia

    kerrmedia

    Joined:
    Nov 4, 2015
    Posts:
    250
    I just checked in the collider script to see if the hit item was tagged fog, and if it was just returned out of the function. That works.
     
  16. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    They are included - but you'll need to download the separately.
    See the file 'Demo Content.url', it leads you to the download:)
     
    DavidMiranda likes this.
  17. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Sorry for not replying. The forum kicks me out every 5 minutes and I never get email notifications (or almost never)
    Set the FV rendering order to -1 (other/rendering options)

    @FPires That would require a shader modification to use world-space coords.

    @AndyUr Increase the intensity in rendering/intensity

    @kerrmedia So everything is fine?

    @Seneral thanks for helping
     
    Last edited: Aug 13, 2017
  18. vivredraco

    vivredraco

    Joined:
    Jan 19, 2016
    Posts:
    22
    Hi @DavidMiranda, I was hoping you could answer a question for me. A recent review on the asset store from a user named @wetcircuit said, "If you render offline the quality can be extreme." I found this comment intriguing, as it implies Fog Volume 3 can be used to pre-render clouds outside of runtime, presumably so that the pre-rendered imagery can be used later in-game with a lower performance cost. However, I read through the documentation and could not find any reference whatsoever to pre-rendering or "offline rendering." Is this something supported by FV3?
     
  19. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    @vivredraco Yes, that means that you can use FV to render with very very high quality. Example
    That image takes around 20 seconds to render. Basically, you set a very large iteration count with small distance between samples.
     
    vivredraco likes this.
  20. vivredraco

    vivredraco

    Joined:
    Jan 19, 2016
    Posts:
    22
    Cool! Are there any restrictions on the usage/sale of images generated with FV, licensing-wise?
     
  21. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    humm, no
     
  22. SV_Architect

    SV_Architect

    Joined:
    Nov 27, 2016
    Posts:
    1
    Hi - I'm considering purchasing your asset pack as the demos look really stunning and it looks like you're getting excellent reviews and feedback.

    The following function would be make-or-break for me:
    Can I establish my volume fog by using a custom mesh object to create the volume?
    If the answer is "no", would there be any kind of function available that would let me essentially boolean-subtract one volume from another? Essentially, I would need my volume to be a box-volume that produces fog, but with a cylinder in the center of it that produces no fog.

    Also, developing for Vive so performance is a concern, though the total volume I need to cover with the volumetric is not huge - Something like 100M x 100M x30M.

    Thanks,
    SV
     
  23. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    @SV_Architect humm, nope, FV can't do what you need atm.
    In the next version we will add subtractive primitives (cubes and spheres), but it is only available for textured volumes (too expensive for vr).
    But this is a very interesting request. I will try to do this in the cheap version of the volume (uniform)

    Regards
     
    look001 and tapawafo like this.
  24. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    humm, the coverage control by texture was an interesting experiment... maybe I should continue with it. What do you think? ;)
    2017-07-04_13-38-32.jpg 2017-07-03_22-55-14.jpg 2017-07-03_20-54-00.jpg 2017-07-03_20-40-34.jpg 2017-07-03_20-14-13.jpg
     
    Ruchir, sashahush, Konst and 10 others like this.
  25. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    Yes I think having the option of using a texture or even a 3d texture option to control cloud coverage would be a good idea. You could then shape the occasional cloud exactly as you wanted. Looks like you are making a game of cloud noughts and crosses in one of those images. Another option might to shape clouds with a mesh. You could simple convert its shape to voxels and then generate it with your existing distance field controls as multiple cubes.
     
    DavidMiranda likes this.
  26. kerrmedia

    kerrmedia

    Joined:
    Nov 4, 2015
    Posts:
    250
    DavidMiranda likes this.
  27. NocSchecter

    NocSchecter

    Joined:
    Aug 19, 2015
    Posts:
    33
    Hey bro can i use this asset for render with VR PANORAMA Asset?
     
  28. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Yes. One user sent me a 360 video posted on youtube. He recorded the scene "Nebula" with that plugin. The result was quite impressive :)
     
  29. NocSchecter

    NocSchecter

    Joined:
    Aug 19, 2015
    Posts:
    33
    I am using VR Panorama 360 and when I capture pictures in the traditional way I have no problems, however when I want to capture a 360 picture I have this problem https://drive.google.com/file/d/0B9QJElrY2beKb1hnZHdMdGEzclE/view?usp=sharing
     
  30. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    Hello @DavidMiranda I am using Fog Volume 3 for a project, and I am running in a couple of strange issues.

    Working on Unity2017.1.0f3 on Windows.

    I have a scene where I am using the asset, and when I open the project, unless I first open one of the demo scenes, the clouds are not visible in my scene (not even when hitting play). Beside this, that is not a big deal (takes a few seconds to open the other scene then open mine), the problem comes in the build.

    When I build for Windows, 64 bit, even after doing the trick above so that the clouds are visible in the editor, they are completely absent from the build, no error message or anything.
    I am using it in a very default way, I setup a Fog Volume, shaped it up the way I needed it, and just let it run in a 3d scene, so beside the visual parameters I don't seem to have changed anything else.

    Any idea on what might be causing that?

    EDIT - As a test I tried building the Fast Clouds scene in the same project, and that one worked like a charm.

    Cheers,
    H
     
    Last edited: Aug 26, 2017
  31. kerrmedia

    kerrmedia

    Joined:
    Nov 4, 2015
    Posts:
    250
  32. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    @drHogan Yes, my programmer had an accident related with the visibility, hehe. I had a method to discard FV from updating when it is off-screen. He broke it so FV is always not visible for the code :) Fixed in 3.2.1p2. Hopefully, it will be published today. The update is already available from my site.
    @kerrmedia Easy shader made in shaderforge. Source is available in the demo content package
     
  33. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    @DavidMiranda Thanks man, I have a demo on friday with the client and I was going mad in figuring out what I was doing wrong ;) Cheers!
     
  34. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    ouch! If you want to get access to the version asap, just mail me so I can make a discount coupon for you. And if required, I can help with that demo to make it quickly.
     
    drHogan likes this.
  35. Morseliot

    Morseliot

    Joined:
    Jan 10, 2015
    Posts:
    70
    Hi David, is there any chance to extrude some space inside of the Fog Volume?
     
  36. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Not yet :/
     
  37. Morseliot

    Morseliot

    Joined:
    Jan 10, 2015
    Posts:
    70
    Sad, it would be very useful feature in some cases. Any plans for implementation?
     
  38. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Yes, I know. It has been requested more than once :)
    We will start with that next.
     
  39. cynex

    cynex

    Joined:
    May 5, 2015
    Posts:
    10
    Just purchased this asset and it works fine in unity standard view, however, I was really excited to try it out in VR, but sadly haven't been able to see it working in the demo scenes.
    I just turned on VR support [Oculus Rift] in the player settings from a blank project with this asset and I get the error:

    NullReferenceException: Object reference not set to an instance of an object
    FogVolumeCamera.Render () (at Assets/FogVolume/Scripts/FogVolumeCamera.cs:465)
    FogVolumeRenderer.OnPreRender () (at Assets/FogVolume/Scripts/FogVolumeRenderer.cs:235)

    referring to :
    Vector3 eyePos = SceneCamera.transform.parent.TransformPoint(InputTracking.GetLocalPosition(VRNode.LeftEye));

    I am using unity 5.6.3f1 / win 10 / oculus rift cv1

    EDIT : RTFM...made the camera a child of an empty gameObject and it worked ok.
     
    Last edited: Sep 1, 2017
  40. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    277
    Hi @DavidMiranda - I also just purchased the Asset and I am running into issues with each of the demo Scenes in Unity 5.6.1f1.

    - There is a Script missing on the main Camera and I am getting one Error Message over and over:

    FIXED: What can I do to quickly fix these ? Also how I would I setup my own Gameplay Camera with Fog Volume 3 Components?

    Thanks a lot :D
     
    Last edited: Sep 5, 2017
  41. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Aha, this is what we have to do with a standard camera to make it render in stereo

    humm.... did you import the post process stack? That's the only external component that may be missing.
    The exception... do you have a camera available in the scene and assigned to FogVolumeData.cs?
    About how to setup your own camera with FV3. Well, both FogVolumeRenderer and FogVolumeScreen are documented.
     
    Weblox likes this.
  42. DigitalNerds80

    DigitalNerds80

    Joined:
    Sep 1, 2017
    Posts:
    10
    Hello, just bough the fog volume 3 ( 3.2.1p2)

    Started a new clean project:
    when the platform is Windows/Mac the fog is visible in the editor

    when I switch to Android (or Ios), i Cannot see the fog in the editor (i can just see the gizmo),
    it works only in play mode

    EDIT:
    in play mode the effect is barely visible, and it not seems working :(

    it's a bug or there is something else I need to do?

    Unity version 2017.1.0f3
    Mac osx 10.12.5

    maybe is something related to Metal / OpenGl stuff?

    please help!

    thank you
     

    Attached Files:

    Last edited: Sep 1, 2017
  43. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    277
    Thanks a lot. Importing the Post Processing Stack fixed both issues and all Demos are running fine and beautiful. I did look at the Documentation, but I must have overlooked that step. Now I am trying to use FV3 Nebula Demo in a Project with Airplane Controllers and I would need the Nebula Size to be much bigger. :D

    Currently my airplane is filling up the entire nebula in size. Also it's travel speed is set to 70 what lets the airplane instantly travel through the entire nebula. I have also tested my Airplane with a Scale of 0.1 and a speed of 1 and it lets me fly around the nebula as expected. However, since I have weapon systems set up on the Airplane that will spawn Projectiles and Rockets, it would be a huge time saver if I could keep current scale to 1 and not need to do all setup again. :cool:

    I have tried to increase the "SIZE" Property in "Fog Volume" from 5000 to 20000, which increased the size of the Fog Volume Cube, but the Inner Core of the nebula (Stars/Pointlights,etc) doesn't seem to get affected. What would be the best way to scale up the nebulas in the demo scenes to make them fill up much more space? Do we have to manually place more "Stars" - Systems ? ;)

    Again, thanks for all your help and support.
     
    Last edited: Sep 2, 2017
  44. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    @DigitalNerds80 humm, try this: open FogVolume.shader and comment this line: #pragma exclude_renderers d3d9
    I keep it commented for faster compilation.
     
  45. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    @Weblox noise scale:
    2017-09-02_1-06-49.jpg
    Lights are not affected because they are objects
     
    Weblox likes this.
  46. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    277
    Awesome! Thanks again. :p

    So, that means we manually place more "Stars" - Systems inside the "Fog Volume" ?
     
  47. DigitalNerds80

    DigitalNerds80

    Joined:
    Sep 1, 2017
    Posts:
    10
    Hello @DavidMiranda , thanks for your reply,

    sadly it does not solved the issue :(

    I can only see and use the plugin in the Windows/Osx Desktop platform

    As I switch to the Android or iOs the plugin stop working, (neither in Editor or Play mode)

    What Can I do?
    Please i need for my Vr Mobile app project

    thank you!
     
  48. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Ok, this is something for my other programmer, he has a mac.
    Regards
     
  49. Morseliot

    Morseliot

    Joined:
    Jan 10, 2015
    Posts:
    70
    Hi David, after update to current version, noticed VR performance issue, lagging very badly VR.waitForGPU. How can downgrade to previous version? or is there any upcoming fix?
     
  50. CristianArrow

    CristianArrow

    Joined:
    Mar 13, 2017
    Posts:
    3
    Hi!, i wanna make fog out of my car, the problem is what the fog cast inside of it... how can i fixed this?
    ("Fog Volume GameObject" follows the player)
    Thnks!!