Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

[RELEASED] Weatherade: Snow and Rain System

Discussion in 'Assets and Asset Store' started by NOT_Lonely, Feb 3, 2024.

  1. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    As i understand it - the original approach was that the entire pipeline would remain super flexible - but then they realized that each of the (3) example pipelines took on a life of their own, especially as asset store vendors had to find ways to normalize support. So they dropped LWRP in favor of Standard, and more or less consolidated URP and HDRP as their own standards. Does that match up with what you all think more or less?
     
  2. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Yes, something like that. As I know there are two isolated teams that work on SRPs. And they want to make them more close to each other now, so both SRPs will be more cross-compatible.
     
  3. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Hi everyone!

    I've just added the full-featured support of the Unity's terrain in URP.
    The tessellation works with the terrain instancing now, which drastically improves the performance and visual quality of the terrain. Later I will try to backport this to the BiRP as well.

    URP_traces.jpg
     
    alienorbit likes this.
  4. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    Awesome!
     
  5. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,698
    +1 on "backporting to BiRP."
     
    NOT_Lonely likes this.
  6. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Hi everyone!
    I just added the snow texture blending feature. This allows to blend up to 3 different snow textures with their own settings. Also I added the detail texture feature. Both are in URP version, but I think I will then port them to BiRP.

    You can see the difference on the GIF (1 and 3 textures).

    TexBlendAndDetails.gif
     
    alienorbit, miinoy and hopeful like this.
  7. miinoy

    miinoy

    Joined:
    May 27, 2019
    Posts:
    22
    This looks incredible!


    Curious if you think i will run into issues when this releases if i were to use it with Microverse terrain? Or rather "on top" of the shader that microsplat and microverse creates?
     
  8. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Thanks! As I know, Microverse uses its own shader system which is the core of the system. So I think my system is not compatible with it. I will look at it, but only after the URP version release.
     
    miinoy likes this.
  9. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Hi,
    I've polished the texture blending feature and added a new paint mode to Total Brush so it works smoothly and predictably.

    SRS_ThreeTexMode.gif
     
    DragonmoN and hopeful like this.
  10. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Hi guys!
    The URP version of the snow part has been finished (I hope :D).
    It's already tested in the demo scene and works very well.
    As a great bonus, URP allowed me to add lighting to my GPU particles, so now the snowfall receives not only ambient light, but also direct light with shadows from directional light source.

    And here's two shots from the demo scene:

    URP_demoScene2.jpg

    URP_demoScene.jpg
     
  11. miinoy

    miinoy

    Joined:
    May 27, 2019
    Posts:
    22
    Looks amazing!
     
  12. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    Amazing to see, and can't wait top have a play with it!
     
  13. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Thanks!
     
  14. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Hey guys!
    Rain now works in URP :)

    SRS_URP_Rain.gif

    Now I need to restore the shaders GUI, document some new features, and get ready to publish.
     
    alienorbit and NicknameTaken like this.
  15. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    I also wanted to let you know that it will be on sale on April 17th, so add it to your wishlists if you haven't purchased it yet.
     
    alienorbit likes this.
  16. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    Good luck in the sale - hope you pick up a BUNCH of new customers!
     
    NOT_Lonely likes this.
  17. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Hi all!
    I'm happy to announce that the Weatherade URP update is now available for download!

    I also want to remind everyone who hasn’t bought it yet, but wanted to - there will be a discount on it on April 17, so don’t miss out.

    08_URP_2.jpg
     
    alienorbit and miinoy like this.
  18. miinoy

    miinoy

    Joined:
    May 27, 2019
    Posts:
    22
    Congrats on the URP release! Hoping more people are able to find this plugin this coming week!
     
    NOT_Lonely likes this.
  19. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    AWESOME!!! Can't wait to play. Don't think I will have time to get serious about it for another couple of weeks, but I am very exicted. Congratulations!
     
  20. martire

    martire

    Joined:
    Feb 27, 2015
    Posts:
    36
    Hi! It works on mobile/VR too?
     
  21. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Hi,
    PC VR is supported, but mobile not tested yet.
     
  22. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Thanks! Hope you will like it!
     
  23. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Hey guys!
    The sale is going on right now. You can get Weatherade for 50% off.

    ▼Here's a video captured in the real time URP demo▼

     
    alienorbit likes this.
  24. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    FYI - I finally got a chance to load on MacOS, and there are a few shader errors with Metal in Unity 2022

    I will document more and see if i an spot an easy solution

    Code (CSharp):
    1. Shader error in 'Hidden/NOT_Lonely/Weatherade/Snow Coverage (Terrain Add Pass-Bake)': undeclared identifier 'UNITY_SAMPLE_TEX2DARRAY_GRAD' at SRS/Shaders/Includes/SRS_CoverageCommon.hlsl(288) (on metal)
    2.  
    3. Compiling Subshader: 0, Pass: TerrainAddLit, Vertex program with <no keywords>
    4. Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_NEEDS_RENDERPASS_FBFETCH_FALLBACK UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    5. Disabled keywords: INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _COVERAGE_ON _DISPLACEMENT_ON _NORMALMAP _PAINTABLE_COVERAGE_ON _STOCHASTIC_ON _TERRAIN_INSTANCED_PERPIXEL_NORMAL _THREE_TEX_MODE
    6.  
     
  25. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    Also, importing the demo content seems to have mucked up the shaders, even though I already imported URP.

    <EDIT> Ah - from the errors, it seems to be because the shader is "missing" since it wont complile on metal.

    eg
    Code (CSharp):
    1. SRS_SnowCoverageInstance (NOT_Lonely.Weatherade.SnowCoverage): GameObject 'pine_004_01_LOD0' has a material (trunk_snow) with a missing shader. This material will be ignored.
    2. UnityEngine.Debug:LogWarning (object)
    3. NOT_Lonely.Weatherade.CoverageBase:GetCoverageMaterials () (at Assets/NOT_Lonely/Weatherade SRS/Scripts/CoverageBase.cs:274)
    4. NOT_Lonely.Weatherade.CoverageBase:OnEnable () (at Assets/NOT_Lonely/Weatherade SRS/Scripts/CoverageBase.cs:141)
    5. NOT_Lonely.Weatherade.SnowCoverage:OnEnable () (at Assets/NOT_Lonely/Weatherade SRS/Scripts/SnowCoverage.cs:204)
     
    Last edited: Apr 21, 2024
  26. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Hi,
    It's a know stupid mistake, I already fixed it. I just forgot to add two compiler directives. I'm not at my pc right now, so I can only tell you how to fix it.
    Open the SRS_CoverageCommon.hlsl, somewhere at the top find a line with the UNITY_SAMPLE_TEX2DARRAY_GRAD declaration and add two extra things in the #if line: defined(SHADER_API_METAL) and defined(SHADER_API_VULKAN)
     
    alienorbit likes this.
  27. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58

    Bingo. All is good with world now.
     
  28. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    I spoke too soon, and stepped away for dinner - the shaders compile now, but now still aren't fully connecting. Will keep working at it...

    And found a new metal error:

    Code (CSharp):
    1. [Worker0] Metal: Error creating pipeline state (NOT_Lonely/Weatherade/Rain Coverage): Fragment input(s) `user(TEXCOORD3)` mismatching vertex shader output type(s) or not written by vertex shader
    2. (null)
     
  29. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    UPDATE:
    1. Closed Unity Editor
    2. Edited and saved SRS_CoverageCommon.hlsl per above in text editor
    3. Re-opened Unity project
    4. Fixed most problems - a few missing shaders still persist, working on figuring those out (see attached)
     
  30. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    material list
     

    Attached Files:

  31. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    Updated - just re-applied the shader in each material:

    NOT_Lonely > Weatherade > Snow_Coverage

    Still some issue with a couple font things - not sure if that matters at all
     

    Attached Files:

  32. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    Displacement seems to working (sort of), but it's in the wrong place. Couple of additional errors, in case it's helpful


    Code (CSharp):
    1. Metal: Error creating pipeline state (Hidden/NOT_Lonely/Weatherade/Snow Coverage (Terrain-Tessellation)): Fragment input(s) `user(TEXCOORD3),user(TEXCOORD4),user(TEXCOORD5)` mismatching vertex shader output type(s) or not written by vertex shader
    2. (null)

    Code (CSharp):
    1. Metal: Error creating pipeline state (Hidden/NOT_Lonely/Weatherade/Snow Coverage (Terrain-Tessellation)): Fragment input(s) `user(TEXCOORD3),user(TEXCOORD4),user(TEXCOORD5)` mismatching vertex shader output type(s) or not written by vertex shader
    2. (null)
     
  33. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Is it happens only on the terrain shader? And how the terrain looks?
    Try to switch off/on the Per-pixel normal checkbox on the terrain material.
     
    alienorbit likes this.
  34. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    yes these seems to the last errors, although I haven't loaded the rain demo scene yet. Will check this per-pixel param first. Terrain looks good generally, and does deform, but not "clearly" and not in the right place under the truck tires or footsteps
     
  35. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Show me how it looks, please.
     
  36. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    Throwing snowballs and walking makes tracks, wasn't well defined at first, then kicked in... Truck not making tracks.

    Getting these errors while throwing (and walking / driving?)

    Code (CSharp):
    1. A game object can only be in one layer. The layer needs to be in the range [0...31]
    2. UnityEngine.StackTraceUtility:ExtractStackTrace ()
    3. SRS_Tracer:SetupTracers () (at Assets/NOT_Lonely/Weatherade SRS/Scripts/SRS_Tracer.cs:50)
    4. SRS_Tracer:OnEnable () (at Assets/NOT_Lonely/Weatherade SRS/Scripts/SRS_Tracer.cs:16)
    5.  

    upload_2024-4-23_15-33-2.png

    upload_2024-4-23_15-36-15.png
     
  37. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    This error happens because the car has two SRS_Tracer components that relie on the particular layer defined in the Tracers Layer Name field. I can't provide the package with the layers and tags I use, as it can conflict with the layers you already have in your project and break your project. So the solution for this is simply add a layer named Tracers to your Layers at index 23. Or just use another one layer and type its name in the SRS_Tracer components.
     
    alienorbit likes this.
  38. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    In rain scene, several of these errors

    Code (CSharp):
    1. Metal: Error creating pipeline state (NOT_Lonely/Weatherade/Rain Coverage): Fragment input(s) `user(TEXCOORD3)` mismatching vertex shader output type(s) or not written by vertex shader
    2. (null)
    To be clear, this is all from the demo scenes - I always like to get those running correctly first so I have smoething to reference, before trying one of my own. Otherwise I can quickly get lost in the weeds...
     
  39. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    Ah ok - I thought it looked familiar from before, no worries on that then. :)
     
  40. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Does it work even while throwing this error?

    Yeah it's a good decision.
     
  41. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    I feel like the displacement of the terrain isn't as pronounced as I remember it, or as the snow scene is

    upload_2024-4-23_16-26-34.png
     
  42. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    I am going to do a test run at a setup from scratch this week (probably on windows first), so wil follow instructions more carefully
     
  43. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    But rain shaders don't have a displacement feature.
     
    alienorbit likes this.
  44. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    How does this integrate with Enviro 3? Otherwise, does this asset support clouds, volumetric clouds, thunder, lightning, sun and moon?
     
    alienorbit likes this.
  45. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    It's not tested with Enviro 3.
    My system is more about shaders. You can look at its documentation and download the demo to get more info.
     
    alienorbit and Duffer123 like this.
  46. alienorbit

    alienorbit

    Joined:
    May 1, 2013
    Posts:
    58
    Well, then neither of us are crazy! (I might be, a little bit, sometimes, late at night or before my coffee...)
     
  47. vplampinen

    vplampinen

    Joined:
    Sep 26, 2012
    Posts:
    17
    Looks great. Are you planning to add wind that deforms the snow ever so slightly in a wavy pattern?

    I'd like to transfer this or some other asset into a sand effect similar to the game called "Journey". Yours is one of the only ones that offer the glitter/sparkle effect AND deformation. Now I only need the wind effect, and then some sand textures.
     
  48. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    Thanks!

    Do you mean a realtime animated deformation?
     
  49. vplampinen

    vplampinen

    Joined:
    Sep 26, 2012
    Posts:
    17
    Like this:

    Recommended to watch at 4k resolution to see the deformation. Similar deformation from wind would happen on very fine powder snow IRL. I know your asset is about snow, but I'm saying it would be a good base to build a sand shader as well.
     
    Last edited: Apr 28, 2024
    alienorbit likes this.
  50. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    548
    It's a great idea. I think it can be implemented pretty easily. Added it to my list.
     
    alienorbit and hopeful like this.