Search Unity

Graphics [Released] Rainy - Rain Collision and Screen Space Wetness System

Discussion in 'Tools In Progress' started by MaxWitsch, Jan 19, 2023.

  1. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    [Released]
    You can get the Asset from here

    Hello everyone.

    Today i uploaded my first asset to the Asset Store.
    Initially, it was not my intention to sell the asset. However, I was asked by many developers if it is available.
    So... here we are, and it will be available soon.

    About Rainy
    Rainy is a high-quality, rain simulation for HDRP that can be easily added to your Unity projects. It uses a custom Renderer to accurately simulate the collision of raindrops, creating a highly immersive and believable rain effect.

    Rainy consists of 3 modules.
    One part is to render collisions, one part for the particles and one part for the smoothness and normal GBbuffer override.

    For customizability, the Asset is built as Native to HDRP as possible, giving you the possibility to customize most of the system directly in the Shadergraph or the VFX Graph, fine-tune the look and feel of the rain to suit your project.
    Additionally, the asset includes a pre-built rain prefab, making it easy to quickly add rain to your scenes.
    Overall, this asset is a great choice for anyone looking to add a high-quality, rain effect to their Unity projects.



    Hope you like it.
    Max :)
     
    Last edited: May 16, 2023
  2. riba78

    riba78

    Joined:
    Feb 16, 2018
    Posts:
    33
    seems really great.
    Just to know, will it be free or paid asset?
     
    jackangel915 likes this.
  3. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,762
    Any chance you will do a version for Built In?
     
    DragonCoder likes this.
  4. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    436
    That's awesome! If it really doesn't require changes in object shaders and is as simple as dragging one prefab to the scene I will be the first one to buy it :D
     
    MaxWitsch likes this.
  5. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    I'm afraid not.
    The differences between the render pipelines are too big.
     
  6. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    436
    Any ETA when Rainy will be available in the asset store?
    Will you update the first post with the links when the time comes?
     
  7. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    I'm really sorry, but i can not tell right now.
    Asset curation times are extremely long at the moment.
    Submitted the asset last week. But it is still no.2012 in the queue.
    I apologize a thousand times
     
  8. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    436
    don't worry and thanks for the update! The Asset Store team should be sorry instead ^^
     
  9. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,487
    That is a pity :(
     
  10. alfainsomnia

    alfainsomnia

    Joined:
    Jan 20, 2019
    Posts:
    1
    Hello! Are there any updates about queue?
     
  11. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    Currently the Asset is #665 in the curation queue.
    I really hope it comes out this week.
     
  12. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    436
    Those asset store guys are exceptionally lazy these days :) Any updates?
     
  13. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    Currently we're at #295 in queue.
    So it's a matter of days :)
     
  14. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    436
    I said I will be your first customer :) It is live guys.
     
    MaxWitsch likes this.
  15. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    436
    After a tiny bit of testing:
    - i think that asmdefs aren't configured and code is written in such a way that it might be difficult to adopt them without rewriting parts of code.
    - I don't think that there is an undo support for rainy inspector
    - Demo scene has misconfigured prefab (it lacks custom pass plugged in inside Rain Surface Modifier). After plugging it manually everything works as expected. Maybe this is caused that I've imported Rainy to my main project and something interferes with it (I doubt it) or maybe it caused by the asmdef issue that I've had at start. I'll test that later on an empty project.
     
    jackangel915 likes this.
  16. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    Hi @nehvaleem
    Thanks for the notice, and your feedback!
    -
    Sorry I haven't configured AsseblyDefenition. I didn't know this was a thing, but now I know.

    - Adding a Undo support should be easy to implement too.

    - Regarding the demoscene,you could be right, maby the lack of the asmdefs causes this.

    I'll take a look at these things and try to fix them in the next update.
     
  17. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    436
    Some projects use them and some don't. Right now the bigger issue is that the editor & runtime code is all tangled up together.
     
  18. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,487
    Nice, just that little hurdle to overcome of migrating a large project to HDRP..
     
  19. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    332
    Are you on built-in? Use Wet Stuff instead.
     
    khos likes this.
  20. DragonTein

    DragonTein

    Joined:
    Jul 1, 2018
    Posts:
    15
    Hi! Are you planing to open discord server for support?
    Asked my boss to buy the asset and I predicting that fast support will be handy
     
  21. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    Sure! Good Idea :)

    https://discord.gg/k7zrcgr2
     
  22. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,487
    Ok cool, does that need to have me change all the materials to use a different shader?
     
  23. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    332
    No clue, never used it. I just know BiRP users have always been happy with it.
    We should also stop this discussion at once, since this is a Rainy thread. Feel free to DM me in case of further questions.
     
    MaxWitsch likes this.
  24. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    Hi,
    I have noticed that Unity 2023.1b includes a new layer render pass.
    We can use that to exclude/mask layers from the effect.

    For now I can't recommend the Beta build of Unity while it's in beta,
    so please stay at your current Version if you not already switched.
     
  25. DragonTein

    DragonTein

    Joined:
    Jul 1, 2018
    Posts:
    15
    Sorry, invite invalid.
    a bummer, cause ive got some questions. Is there some engine-deep limitation why it works only in opague injection point?
    Im willing to dig deep, but im new to custom passes. It works for DrawRenderersCustomPass, but DrawRenderersCustomPass uses CoreUtils.DrawRendererList, and your script uses CoreUtils.DrawFullScreen.
     
    Last edited: Mar 7, 2023
  26. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
  27. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    I used the DrawFullScreen method because the performance is much better than if we use DrawRendererList.
    Otherwise we would have to render all renders in the scene again.
    The way it's implemented now, it's just an image effect that modifies the GBuffer, with very little cost.

    But i'm working on an extra pass that renders only transparent objects to fill the gap.
     
  28. DragonTein

    DragonTein

    Joined:
    Jul 1, 2018
    Posts:
    15
    Can i help somehow with this?
    We are working on car game and having rain on the windows is the must

    Hmmm... ive researched some more and HDRP manual states that opaque injection point is the only place where you can write to normal and roughness... Seems like huge problem, what is your plan?
     
    MaxWitsch likes this.
  29. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    Hello,
    I have received feedback from many of you.
    I'm already working on the next update, which will contain the following things:

    DrawRendererMode for Surface effect
    Will render a coat layer on top of already rendered objects.
    • Supports layers - exclude layers from the effect
    • Can be color tinted
    • Support object space coordinates - moves the effect with the object
    • Supports transparent objects
    • More performance costly - since its not just manipulating the Gbuffer but renders a pass for each object.

     
    Last edited: Mar 13, 2023
  30. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    You can also still use the Gbuffer method, and only render transparent objects with DrawRendererMode
     
  31. riba78

    riba78

    Joined:
    Feb 16, 2018
    Posts:
    33
    Is this new mode affecting all the scene?

    A mixed mode is possible?
    I mean something mixed just to have the rain effect on transparent objects (materials) using the last DrawRendererMode and the Gbuffer manipulation for opaque ones? In this way could be possible, if doable, to reduce the performance cost?
     
  32. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    You can select which Layers of the scene should be affected.
    Also opaque, transparent or all meshes

    This is exactly the plan :)
    You can use:
    only Gbuffer, for opaque objects,
    only DrawRendererMode, for opaque and transparent objects,
    Or use a mixture of Gbuffer for opaque and DrawRendererMode for transparent objects.
     
  33. riba78

    riba78

    Joined:
    Feb 16, 2018
    Posts:
    33
    Great!.
    Nice to have this kind of flexibility.
     
  34. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    The first update is almost ready.
    I will upload it in the next days. And hopefully the curation times aren't as long as they were when I uploaded the first version.
     
  35. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    I just submitted v2.0 to the Assetstore.

    New features
    • Wetness support for transparent surfaces. (Forward pass)
    • Select what layers are affected by wetness via Layermask. Forward only
    • Select Material types that are affected by wetness. (transparent, opaque, all, ...) Forward only
    • Selection between world, object or object with rotation space wetness mapping. Forward only
    • Undo/Redo feature for the Rainy component
    Fixes
    • Updated setup documentation.
    • Updated documentation for Forward rendering.
    • Some minor bug fixes.
    It will take ~3 workdays until it is available on the Assetstore.
     
  36. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    2.0 is available now on the Assetstore.
    Quicker than i thought
     
    Last edited: Apr 4, 2023
  37. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    Any ideas what to come next?
     
  38. Joao_Valentini

    Joao_Valentini

    Joined:
    Nov 22, 2018
    Posts:
    5
    Is it possible to use this asset to create other effects as well? like snow or ashes falling
     
  39. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    Sure, the VFX graph and shader are really easy to tweak.
    I created a custom node for VFX and Shadergraph.
    And if this is too difficult for you, you can always contact me so that I can help you with it :)
     
    Joao_Valentini likes this.
  40. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    I'm currently working on a snow effect for rainy, do you have any suggestions?
     
    nehvaleem likes this.
  41. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    436
    will it be possible to give snow actual volume?
     
  42. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    That is the plan, since the system is already rendering collisions for rain, we can use the same method for the snow displacement, and of course the snowfall.
    One thing i still have to think about is how the snow gets rendered best.
    For real volumetric snow (displaced) the best solution that comes into my mind is rendering the surfaces with tessellation.
     
    nehvaleem likes this.
  43. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    436
    How it's going? Any updates?
     
  44. Genebris

    Genebris

    Joined:
    Mar 18, 2013
    Posts:
    144
    EDIT: ok, I managed to decouple VFX from collision renderer which is now static and covers the whole scene. Easy performance save. If you are looking to do the same, you just need to make couple adjustments in VFX graph to start comparing raindrop position and collision data in world space instead of just local space of the whole prefab.
     
    Last edited: Nov 4, 2023
    MaxWitsch likes this.
  45. Genebris

    Genebris

    Joined:
    Mar 18, 2013
    Posts:
    144
    If anybody is looking for MASSIVE optimization of the wetness pass - remove anisotropic filtering from 3 textures of rain drops used in this shader. The shader went from 6 ms to 1 ms for me on GTX 1060.

    Bonus: Max is using noise nodes in RainCollision subgraph. Replace this with basic perlin noise texture for an extra 0.5 ms optimization.
     
    MaxWitsch likes this.
  46. Genebris

    Genebris

    Joined:
    Mar 18, 2013
    Posts:
    144
  47. Evgeno

    Evgeno

    Joined:
    Sep 8, 2014
    Posts:
    57
    Hello. Will there be optimization for new versions of Unity 2023?
     
  48. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    Good call!
    Not yet tbh. It probably would be the best to write a custom shader just for the terrain.
    I will investigate further and maby I'll find a way. Thanks for telling me.
     
    Genebris likes this.
  49. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    Yes, as @Genebris kindly pointed out to me, I can still optimize a lot.
     
  50. Evgeno

    Evgeno

    Joined:
    Sep 8, 2014
    Posts:
    57
    Please update your asset.