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:
    561
    Yes, yes. There is a typo. Go to FogVolumeFragment.cginc line 200. Replace the k with n, like this:

    Code (CSharp):
    1. if (_PrimitiveActionType(n) > 1.0f)
    And voila

    2019-03-21_10-36-54.jpg
     
  2. dimitris_baud

    dimitris_baud

    Joined:
    Jan 15, 2018
    Posts:
    10
    I am afraid 'n' is undefined so the shader doesn't compile and everything turns magenta. Also in my version of FogVolumeFrament.cginc that is line 199 and not 200.

    I am looking at the wrong one? I am just downloading and importing from the Asset Store.

    Thanks
     
  3. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    561
    Weird. Anyways, I will update it today. It will be available in less than 2 days.
     
    ftejada, wetcircuit and dimitris_baud like this.
  4. diamondian

    diamondian

    Joined:
    Nov 12, 2018
    Posts:
    3
    Hopefully, the new version resolves the cloud not showing up in the build problem, this issue has been bugging me for months already, it shows up in the build every now and then, and it seems depend on luck....bTW, the "save material" option only gives the pink sky.
     
  5. Morseliot

    Morseliot

    Joined:
    Jan 10, 2015
    Posts:
    46
    Hi, do those automatically generated physic layers are necessary or they might be removed?
     
  6. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    running into errors with HDRP
    Is HDRP not supported?
     
  7. MonkeyPuzzle

    MonkeyPuzzle

    Joined:
    Jan 17, 2016
    Posts:
    70
  8. Sun-Tzu

    Sun-Tzu

    Joined:
    Apr 4, 2015
    Posts:
    1
    I am running into an issue with Fog Volume 3 having alpha blocks with my skybox. Does anyone know how to fix this? The black you see is what the skybox looks like, but when I use Fog Volume 3 I get these cutout rectangles that come and go as your avatar turns around. It shows in the boxes what is the skybox while putting a blue skybox like thing over the top of the rest. Here is an example with the fog on
    upload_2019-4-22_11-46-59.png

    And Here is the scene with Fog Volume 3 turned off and just a cloud particle system
    upload_2019-4-22_11-50-1.png
     
  9. Image3d

    Image3d

    Joined:
    Jun 20, 2008
    Posts:
    100
    Can I make White Water using fog-volume 3?
     
    dsilverthorn likes this.
  10. Calum

    Calum

    Joined:
    Mar 14, 2015
    Posts:
    11
    Hi there,

    Are there any good tutorials for using this with Enviro Sky. I don't seem to get much effect.

    Thanks in advance
     
  11. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    381
    hi
    is there a way to remove box collider from fog?
     
  12. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    301
    Hi, I have a problem of overlap with UI.
    As from photos:


    My canvas UI Render Mode is "World Space" type and I can't put it in front of the fog.
    How can I do?
     
  13. sekever-n00b

    sekever-n00b

    Joined:
    Nov 4, 2017
    Posts:
    56
    Hi, I need a suggestion on the size of X&Z 99999 of the fog volume 3. It works except when youre near in the range of the camera. thx
     
  14. schenkh

    schenkh

    Joined:
    Jun 6, 2019
    Posts:
    1
    Hi David!

    I'm not sure if you've done any testing in AR, but I'm looking for some tips for better optimization so that it might run more smoothly in AR. So far it looks really nice, but lags too much to be functional.
     
  15. cyphyr

    cyphyr

    Joined:
    Aug 17, 2018
    Posts:
    2
    Hi
    Is Fog Volume compatible with Octane for Unity?
    Thanks
     
  16. carlotta89

    carlotta89

    Joined:
    Dec 19, 2017
    Posts:
    4

    Hi P_Jong, Could you tell me which asset you are refering to here? Thank you
     
  17. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    85
    upload_2019-8-10_18-20-46.png
    There any way to make my ship invisible inside or behind fog volume?
     
  18. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    49
    FogVolumeLightProblem_Spot.png

    Hi every one i think the picture describes
    the problem
    This is fog volume spot light and i dont know what is the problem about it that makes it appear like this (multi layered sort of light!)
    Any help will appreciated
     
  19. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    325
    @DavidMiranda

    hello,
    does it working with OpenGL ES 3.1 and Vulkan on Android 5.1 and above?
     
  20. rmon222

    rmon222

    Joined:
    Oct 24, 2018
    Posts:
    39
    Hi, I bought this asset but the 40+ global shader keywords when Unity has a 256 keyword limit is preventing me from using it. Is there a procedure to decrease the number of keywords to as few as possible?

    Also, about the 4 physics layers, if we are not using physics collisions with the fog, can we delete them?

    Thanks,
     
    Gabriel_SG likes this.
  21. Skotrap7

    Skotrap7

    Joined:
    May 24, 2018
    Posts:
    7
    Not sure what happened exactly, but I can no longer see the fog volume in the scene editor. It just shows the pilot and nothing else. Renders fine when in the player, just hard to work like this. Any ideas?
     
  22. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,134
    turn on scene collision in Fog Volume
     
    Last edited: Nov 27, 2019
    DavidMiranda likes this.
  23. jfml

    jfml

    Joined:
    Mar 8, 2018
    Posts:
    3
    Hi, I'm just getting started with FogVolume. I managed to make a Directional Light shine through a window (like in the Interior Primitives example scene) but it does not seem to work for Spotlights (and Point lights) or am I mistaken? Thanks in advance.
     
  24. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    585
    Hi, I am new to fog volume and unity in general and have an issue rendering the fog.

    In the images below you can see the Scene View renders ok and the Game View doesn't render properly.

    Any ideas how to fix this?

    The fog volume was added automatically by Gaia and I just changed the color.

    I also tried creating a volume from scratch and that had the same issue (which is why I tried the gaia route)

    Any ideas solve this much appreciated.

    Scene View

    f1.PNG

    Game View

    f2.PNG

    ADDITION: Sorted it, it was the clipping planes of the camera.
     
    Last edited: Nov 26, 2019
  25. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    561
    Volumetric shadows are allowed only for one directional light.
     
  26. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    561
    Yes, common harmless issue :)
     
  27. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    561
    Maybe the fog volume layer is disabled in the scene view?
     
  28. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    561
    No, it is not compatible with SRP
     
  29. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,134
    hey @DavidMiranda what's the complete change log for fog volume?
     
  30. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    585
    Hi, I have loads of errors since installing fog volume 3. They are:

    Maximum number (256) of shader global keywords exceeded... etc.

    Searching the net seems everyone says that restarting the project sorts it out but that isnt the case here.

    Searching hasnt shown me a solution so far.

    Any help appreciated.

    Thanks.

    Oh, whilst I am here, also is it absolutely necessary to have 4 layers for fog. Even if just using uniform fog types?

    Thanks
     
  31. bnogalc

    bnogalc

    Joined:
    Apr 27, 2017
    Posts:
    8
    Sorry if this is already answered, but search in thread is not working for some reason (i know the reason is called proxy)

    I am using fog volume in a project that uses custom matrix cameras.
    If i activate downscale, depth is wrong as it is not using the custom matrix, i know you use TAA and it may require some additional work... but, is there a solution for this problem?

    Thanks/Gracias


    I answer myself:
    i added , to "void CameraUpdateSharedProperties()" in FogVolumeRenderer.cs
    _FogVolumeCamera.projectionMatrix = ThisCamera.projectionMatrix;



    Seems working now, but i don't like to work on a modified version as it can produce side effects... i would like to know your opinion if this is safe.
     
    Last edited: Dec 2, 2019
  32. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    585
    Bump!
     
  33. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    585
    It doesn't look like the Fog Volume Developer cares so does anyone have any idea how to solve this compiler error?

    It first appeared after installing fog volume and now appears and disappears when I add or remove fog volume.

    Its annoying to say the least. Thanks

    Maximum number (256) of shader global keywords exceeded, keyword SAMPLING_METHOD_ViewAligned will be ignored.
    You will have to delete some shaders or make them use less keywords.
    Keywords used in project now: AFS_TOUCHBENDING APPLY_FORWARD_FOG AT_CAMERA_MATERIAL AT_CAMERA_SHADER AT_HUE_VARIATION_OFF AT_HUE_VARIATION_ON AUTO_EXPOSURE BEVEL_ON BILLBOARD_FACE_CAMERA_POS BLOOM BLOOM_LOW CHROMATIC_ABERRATION CHROMATIC_ABERRATION_LOW COLOR_GRADING_HDR COLOR_GRADING_HDR_2D COLOR_GRADING_HDR_3D COLOR_GRADING_LDR_2D ColorAdjust DCON DEBUG_DISPLAY DECALS_3RT DECALS_4RT DECALS_OFF DIRECTIONAL DIRECTIONAL_COOKIE DIRLIGHTMAP_COMBINED DIRLIGHTMAP_OFF DIRLIGHTMAP_SEPARATE DISTORT DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON EDITOR_VISUALIZATION EFFECT_BUMP EFFECT_HUE_VARIATION ENVIROVOLUMELIGHT ENVIRO_CURLNOISE ENVIRO_DEPTHBLENDING ENVIRO_HALTONOFFSET ENVIRO_SIMPLE_FOG ETC1_EXTERNAL_ALPHA FAR_CULL_ON FAST_SIN_ON FINALPASS FOGON FOG_EXP FOG_EXP2 FOG_LINEAR FXAA FXAA_KEEP_ALPHA FXAA_LOW GEOM_TYPE_BRANCH GEOM_TYPE_BRANCH_DETAIL GEOM_TYPE_FROND GEOM_TYPE_LEAF GEOM_TYPE_MESH GLOW_ON GPU_FRUSTUM_ON GRAIN HEIGHT_FOG HEIGHT_GRAD HYDRO_DEEP_FOAM HYDRO_OPPOSING_WAVESETS HYDRO_PLANAR_REFELCT HYDRO_REFRACTION HYDRO_SHOREFX HYDRO_SPECULAR HYDRO_SSR HYDRO_SSS HYDRO_SSS_VIEW_LIMIT HYDRO_UNDERWATER INSTANCING_ON JITTER LIGHTMAP_OFF LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING LIGHTPROBE_SH LIGHT_ATTACHED LIGHT_LAYERS LOCAL_SPACE LOD_FADE_CROSSFADE LOD_FADE_PERCENTAGE LUXWATER_DEFERREDFOG NOISE OUTLINE_ON POINT POINT_COOKIE PROCEDURAL_INSTANCING_ON RightEye SHADOWS_CUBE SHADOWS_DEPTH SHADOWS_SCREEN SHADOWS_SHADOWMASK SHADOWS_SINGLE_CASCADE SHADOWS_SOFT SHADOWS_SPLIT_SPHERES SHADOW_HIGH SHADOW_LOW SHADOW_MEDIUM SHADOW_VERY_HIGH SHORE_ON SOFTPARTICLES_ON SOURCE_GBUFFER SPOT STEREO_CUBEMAP_RENDER_ON STEREO_DOUBLEWIDE_TARGET STEREO_INSTANCING_ENABLED STEREO_INSTANCING_ON STEREO_MULTIVIEW_ON TONEMAPPING_ACES TONEMAPPING_CUSTOM TONEMAPPING_NEUTRAL TOUCH_BEND_ON UI_COLOR_ADD UI_COLOR_SET UI_COLOR_SUB UNDERLAY_INNER UNDERLAY_ON UNITY2017_2_SP UNITY_COLORSPACE_GAMMA UNITY_HDR_ON UNITY_PASS_SHADOWCASTER UNITY_SINGLE_PASS_STEREO UNITY_UI_ALPHACLIP UNITY_UI_CLIP_RECT UNJITTER_REPROJECTION USE_CLUSTERED_LIGHTLIST USE_FPTL_LIGHTLIST USE_HDWIND USE_OPTIMIZATIONS USE_SNOW USE_YCOCG UseFlowMapping VERTEXLIGHT_ON VIGNETTE VOLUME_FOG WATER_REFLECTIVE WATER_REFRACTIVE WATER_SIMPLE WIND_DISTANCE_CULL_ON WORLD_SPACE _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHATEST_ON _BACKFACEMIRRORNORMAL_ON _BENDINGCONTROLS_UV4_AND_VERTEX_COLORS _BENDINGCONTROLS_VERTEX_COLORS _COLORDIRECTIONALMODE_ON _COLORTINTDIRECTIONALMODE_ON _DETAIL_MAP _DETAIL_MAP_PEEL _DETAIL_MULX2 _DETALUSEUV3_ON _DIRECTIONALCOLORMODE_OFF _DISABLE_DBUFFER _DISABLE_DECALS _DISPLACEMENT_LOCK_TILING_SCALE _DOUBLESIDED_ON _EMISSION _EMISSIONMAP _ENABLEBEACHFOAM1_ON _ENABLECOLORMASK_ON _ENABLEFOAM_ON _ENABLELIGHTINGMODE_NONE _ENABLEPROBERELFECTIONS_ON _ENABLEREALTIMEREFLECTIONS_ON _ENABLEREFLECTIONPROBE_ON _ENABLEREFLECTIONS_ON _ENABLEREFLECTION_OFF _ENABLEREFLECTION_ON _ENABLESHADOWMAP_ON _ENABLESPECULAROCCLUSION _ENABLEWAVES_ON _ENABLEWINDDISTANCE_ON _ENABLEWINDVEGETATION_ON _ENABLEWINDVERTICALMASK_ON _ENABLE_VC_ON _FADEDIRECTION_IN _FADEOUTWIND_ON _FAKELIGHTDIR_ON _FOGDIRECTIONALMODE_ON _FOG_GRADIENT _FOG_LOWRES_RENDERER _FOG_VOLUME_NOISE _GLOSSYREFLECTIONS_OFF _HEATMAP _HEIGHTMAP _HEIGHTMAP1 _HEIGHT_BASED_BLEND _HIGHLIGHTDIRECTION1_N1A _IGNOREVERTEXCOLOR_ON _INSCATTERING _INVERTSNOWMASK_ON _INVERTVCOLORMASKSECONDROAD_ON _KEYWORD0_ON _LAYER_MAPPING_TRIPLANAR1 _LIGHTINGMODE_NONE _LIGHTINGWORLDSPACE_ON _LIGHTMAPPING_BAKED _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME _LIGHTMAPPING_STATIC_LIGHTMAPS _MASKMAP _MASKMAP0 _MASKMAP1 _MATERIAL_FEATURE_CLEAR_COAT _MATERIAL_FEATURE_SUBSURFACE_SCATTERING _MATERIAL_FEATURE_TRANSMISSION _METALLICGLOSSMAP _NORMALMAP _NORMALMAP0 _NORMALMAP1 _NORMALMAP_TANGENT_SPACE _NORMALMAP_TANGENT_SPACE0 _NORMALMAP_TANGENT_SPACE1 _NORMALMAP_TANGENT_SPACE2 _NORMALMAP_TANGENT_SPACE3 _OCCLUSIONMAP _OPACITYIGNOREVERTEXCOLOR_ON _PARALLAXMAP _PWSFGLOBALCONTROLLERWAVESPEED_ON _REFLECTIONFADEDIRECTION_IN _REFLECTIONFADEDISTANCEMODE_FADEIN _REQUIRE_UV3 _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A _SNOWUSEUV3_ON _SPECGLOSSMAP _SPECULARHIGHLIGHTS_OFF _SPLATMAP_PREVIEW _SUNDISK_HIGH_QUALITY _SUNDISK_NONE _SUNDISK_SIMPLE _SWAP_UVS _TERRAIN_BLEND_HEIGHT _TERRAIN_INSTANCED_PERPIXEL_NORMAL _TERRAIN_NORMAL_MAP _TESSELLATION_DISPLACEMENT _TESSELLATION_PHONG _THICKNESSMAP _TOUCHREACTACTIVE_ON _USECURVES_ON _USEDYNAMICSNOWTSTATICMASKF_ON _USEFLOWMAPPING_ON _USEREFLECTIONS_ON _USESECONDROADALPHA_ON _USESNOW_ON _USE_AO_ON _USE_AO_TEXTURE_ON _UVPRIM_UV1 _UVSEC_UV1 _VERTEX_DISPLACEMENT_LOCK_OBJECT_SCALE _VERTEX_WIND _VOLUME_FOG_INSCATTERING _WETLENSDISTORTIONSWITCH_ON _WINDVERTEXCOLORMAINRNOISEB_ON _WINDVERTEXCOLORMAINR_ON _WIND_VERTEXCOLORR_ON
     
  34. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    585
    Looks like the developer neither knows nor carers about supporting his asset that is pretty much useless to me with all these errors. Looks like a bad review here.
     
  35. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    585
    forget the candy, provide the basics first. Fog Volume = DELETED.
     
  36. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    415
    Hey David. Would be really cool there would be an compatibillity or collaboration with Overcloud.
    Both togeter would be killer.
    Overcloud has all the physical based dynamic day and fogvolume could bring some more variation and compression to the clouds.
     
  37. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    561
    Humm, weird, since it was already done in void RenderDepth(). But yes, it is safe. I will add it too so you won't have to fix it again in the next update.
     
  38. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    561
    In the header of FogVolume.cs you can find a log
     
  39. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    561
    @Hawk0077 One option is to comment the features that you don't need. Go to FogVolume.shader and comment those that you won't use. For example, if you don't need stereo, comment this one: #pragma multi_compile _ FOG_VOLUME_STEREO_ON and so on.

    Code (CSharp):
    1. Like this
    2. //#pragma multi_compile _ FOG_VOLUME_STEREO_ON
     
  40. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    561
    They are required to hide and unhide the objects for each render stage.
     
  41. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,134
    can someone who has fog volume dump the header in this forum?
     
  42. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    585
    Im not a coder, what you said has absolutely no meaning to me whatsoever.

    How would I know what is not being used?
     
    dsilverthorn likes this.
  43. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    98
    Hi, i`m trying to use 2 fog volumes that occupy the same space but are visible to 2 different cameras that render to textures. i can get the 2 different cameras to appear in the assigned camera in the info panels of the 2 fog volumes, but they are both visible in both camera. changing render layers always revert to the vogvolume layer