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] Wet Stuff: Water Decals

Discussion in 'Assets and Asset Store' started by Aphid, May 24, 2018.

  1. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Nyarlathothep likes this.
  2. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    Hi @one_one, we have been keeping an eye on custom HDRP passes for a while. They didn't have the injection points we needed in the past, but we think they may now have the right ones! Obviously I can't promise anything, we might hit some other technical roadblock, but it's promising :D
     
  3. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Awesome! Looking forward to hearing some news on that end.
     
    Nyarlathothep likes this.
  4. JacobDSiler

    JacobDSiler

    Joined:
    Feb 10, 2018
    Posts:
    5
    That's exciting news. So, I'm guessing URP is not ever going to work with wet stuff? Anyway wet stuff looks so incredible otherwise. I am a bit crest fallen. But the upgrade to HDRP will definitely work for me if it does work out.
     
    Last edited: Jan 11, 2020
    Nyarlathothep likes this.
  5. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    As it is right now URP is fundamentally incompatible with Wet Stuff because it's a forward renderer. However Unity have mentioned (e.g. in this blog post) that a deferred renderer for the URP is "coming soon". Obviously I can't guarantee that we'll be able to support that, but it's definitely something we'll look into when more details are available.
     
  6. JacobDSiler

    JacobDSiler

    Joined:
    Feb 10, 2018
    Posts:
    5
    Sounds fair and understandable.
    I did wonder if the base decal system might be changed - for example to something like this:
    https://github.com/Kink3d/kDecals

    Now, I don't currently have Wet Stuff so it is impossible for me to guess how difficult this would be and I think I am going to change back to the standard shader anyway because other deal breaker assets are incompatible (like Vegetation Studio Pro currently though an SRP upgrade should be out once the LTS unity is done).
     
    Nyarlathothep likes this.
  7. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    I assume you want to use kDecals because it has superior placement/alignment tools? I think rather than trying to modify WS to use kDecals internally (which would be very complex) you'd be better of writing an editor script which automatically moves wet decals into the position of a kDecal, so you can use their tools without having to modify either system.
     
  8. JacobDSiler

    JacobDSiler

    Joined:
    Feb 10, 2018
    Posts:
    5
    I wonder about kDecals only because it is a forward rendering setup so it may be easier to shift to URP though I assume (based on your comment) that would be up to me. Haha. Maybe it will be a side project since I do like to contribute where I can.
     
    Nyarlathothep likes this.
  9. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    Oh I see, sorry I misunderstood. In that case unfortunately kDecals wouldn't help - the way in which Wet Stuff works fundamentally requires a deferred renderer, until URP has a deferred option Wet Stuff simply can't be ported to it.
     
    JacobDSiler likes this.
  10. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    rea like this ,waiting for urp version
     
  11. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    314
    @Nyarlathothep Hey there, i’m thinking some time now about getting wet stuff! I’m a dev of Mtree - Tree creation, and wondering how Wet Stuff would look like when having moving trees (vertex displacement)..

    Could you tell me something about?
     
    nirvanajie, one_one and Nyarlathothep like this.
  12. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    Hi @dan_wipf. WetStuff is a screen space effect, so simply applying a large wet decal to an area with a moving tree in it would look quite odd - the tree would move through the wetness effect.

    There are a couple of possible solutions to this, but they're not perfect - something like this is a fundamental weakness of screen space approaches!

    One option is to attach many smaller decals to moving parts, this way the decal moves with the part and the wetness looks correct. This can work well for an animated character, for example attach some wet decals to their feet and increase the saturation to make their boots look when when they walk through a puddle. However this probably won't work if your trees are deformed on the GPU because you know know where to place the decals.

    You could just encompass the entire tree in a dry decal, this drys out all the pixels within the volume so the tree simply doesn't get wet. That ensures you can continue decorating the scene (even with procedurally placed decals) and the tree won't be affected. You could then add a wetness pixel shader just to the tree material.
     
    Last edited: May 4, 2020
    nirvanajie, dan_wipf and one_one like this.
  13. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    For URP with Wet Stuff it's a bit complicated. At the moment URP is a forward renderer this is fundamentally incompatible with how Wet Stuff works and it's impossible for us to support - we need a deferred renderer. Unity have promised that in 2020 they will be adding a deferred renderer mode to the URP, which we might be able to support (this depends on the details of exactly how their renderer is implemented). TL;DR we might be able to support URP in deferred mode by the end of the year.

    For HDRP we think that they've added in the bits we need to support HDRP. I can't promise anything because it may turn out that there's a subtle incompatibility, but from a brief look it looks possible. We're planning to look into this in a couple of months (we're working flat out on another unreleased asset at the moment).
     
    one_one likes this.
  14. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Looking forward to you having a go at HDRP support!
     
    Nyarlathothep likes this.
  15. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,383
    I made a little showcase with your asset:



    (also put it into the asset store gems thread)

    Question: What's the performance impact on the scale of the Auto Puddle Prefab? I just made the scale as large as the valley. I guess that's not optimal, are rather multiple local prefabs the preferred solution? However I didn't notice that much of a performance drop compared to different scales.
     
    Lars-Steenhoff and Nyarlathothep like this.
  16. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    Oh wow, that's really cool. :D

    The performance of Wet Stuff basically scales with how many pixels on screen are affected by the effect and how many total puddles there are in the camera frustum. A single huge puddle is probably optimal for this situation.

    However unless you're creating thousands of puddles performance shouldn't be an issue (because they use instanced rendering). For example the particle splatter and drip line effects included in the package internally create a new little puddle for every single drip which performs just fine.

    If I was setting up a scene like this I'd probably set up a very large puddle over everything to simulate the individual ranindrops (with white noise in the wetness channel and a slowly increasing threshold). Then I'd hand place a few puddles on the floor to simulate the water gathering in low spots (e.g. the area just in front of the elephant). Finally I'd perhaps set up some drip lines along some overhanging rocks. Altogether that might end up with 50 puddles in the scene (mostly the drip line generated ones).
     
    Rowlan likes this.
  17. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    would this work on a flat shaded game? would it make a flat colour surface look wet? does the object texture require a normal/bump map etc?

    thanks
     
    Nyarlathothep likes this.
  18. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    The effect will work with flat shading (assuming you're using deferred rendering of course). However, I'm not sure how good it would look. Because wet surfaces are more reflective they tend to make the normal map of a surface much more obvious. e.g. in this example:

    WindridgeOff.png WindridgeOn.png

    You can see that the road surface (which looked fairly smooth before) now has much more obvious bumps in it (because of reflection and specular highlights). One of the primary ways that Wet Stuff makes surface look wetter at high levels of wetness is by smoothing the normals - giving the appearance of a flat surface on a shallow puddle. With a smooth shaded surface there are no normals to smooth and so you won't get that nice transition as the saturation increases - all of your puddles might look like maximum wetness (smooth mirror like surface).

    I just threw some flat objects into one of our demo scenes to show the effect:

    Unity_2020-08-21_17-53-56.jpg

    As you can see, the effect is changing the appearance of the flat objects but it doesn't look nearly as good as the puddle on the rest of the ground. Because it's so perfectly flat it doesn't really stand out as water to my eye.
     
  19. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    so what if i have a flat shaded object with a normal/bump map?
     
    Nyarlathothep likes this.
  20. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    I think that would look a lot better. The hard edges of polygons mught look a little odd because you could havea puddle with a sharp turn in it - that's the art style though so that's ok! Other than that I think it would look mostly as puddles normally do.
     
  21. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    would this work in unity 2018.1.6f1 as i am about 80% into production and do not really want to update unity mid project, can anyone possibly check this for me before i commit to purchase

    thank you
     
    Nyarlathothep likes this.
  22. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    We only just dropped Unity 2017.4 support in the very latest release of Wet Stuff (4.1.0). When I did the upgrade to 2018.4 there were no changes to the scripts so I think it should be relatively easy to get the version currently on the store working in 2018.4 - you may just have to fix some of the import settings on content included in the package since they'll be downgraded.
     
  23. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    only just got round to trying this in 2018.1.6f1, there is quite a few erros on import to fix so i will trawl through them, wierd thing is that i imported wet stuff to unity 2018.4.26f1 so that i could export the folders and the demos in that version run but there is no wetness on the models, the rain falls in the rain demo but still no wetness, could this be that i still have a gtx260 card in that pc ?. i do have a 1060 to put in but not got round to it yet, maybe it is something you could check for me

    cheers
     
  24. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    It could be that. A GTX260 is a pretty ancient card, I'm actually surprised Unity rus on it at all!

    What kind of errors? Script build errors or content import errors?
     
  25. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    dont think there were script errors, the errors were on import to 2018.1.6f1, think some links were missing so i will have to just check it against the other one to see what was missing, lol, i def need to get that 1060 in or that will be too old by the time i get round to it, bought it nearly 2 years ago and still not used it.

    cheers
     
  26. KingCeryn

    KingCeryn

    Joined:
    Feb 8, 2018
    Posts:
    158

    If find it a little hard to believe that you bought a 1060 two years ago, but are still using....a 260?
    I can't imagine you being able to even open Unity with a 260, so yeah.

    Thats a 12 year old card from 2008...Thats 3 years after Unity was ANNOUNCED.
    This some Collin the Energy Vampire S*** lol
     
    Nyarlathothep likes this.
  27. KingCeryn

    KingCeryn

    Joined:
    Feb 8, 2018
    Posts:
    158
    One question I had, does this only work with the Standard Shader? having some trouble getting it to appear over meshes that use other shaders
     
    Nyarlathothep likes this.
  28. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    It should work with anything that uses deferred rendering.

    We've got a section in the docs here which describes how to check if your item will be affected by the effect or not.
     
  29. KingCeryn

    KingCeryn

    Joined:
    Feb 8, 2018
    Posts:
    158

    I am using defferred, but a few different shaders. One of them a "toon" shader. Is there something I can include in the shader script to make it compatible?
     
  30. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    If you check the thing I linked above do toon shaded things appear there? It's possible to have individual items be forward renderered even when you set the render mode to deferred.
     
  31. KingCeryn

    KingCeryn

    Joined:
    Feb 8, 2018
    Posts:
    158

    Yeah theyre being rendered in the forward pass, i keep trying to add Deferred to the shader script, but no luck.
     
  32. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    As far as I understand it whether a shader renders in forward or deferred mode is determined by the render order (docs), for example transparent things will always render in Forward mode even if you've set the camera rendering mode to deferred.
     
  33. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Hello- is there any way to exclude a gameobject/layer/tag from being affected by Wet Stuff decals?

    Lets say I want the scene objects to appear wet but the player character to appear dry- right now Wet Stuff is making everything inside its gizmo look wet- is there anyway to control that? Thank you.
     
    Nyarlathothep likes this.
  34. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    There's no way to directly exclude an object like that (pixels in the GBuffer are not tagged with an object ID or anything like that). What you can do is set up decal volumes with "Mode: Dry" and attach them to your character, this will remove any wetness in the volume.
     
    imaginationrabbit likes this.
  35. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Thats a great solution- thank you!
     
    Nyarlathothep likes this.
  36. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Hello I have exactyl THe same question But I would like to Exclude My terrain to take Wet Decals Cause I use Here Color Map Ultra Shader Wetness that looks better and My question is if is there any option to exclude terrain from wetness, There is a lot of hills and up and downs, I cant create just dry area here, This is quite big limitation to the system If I would be unable to exclude terrain from Using Wet Decals.
     
    Nyarlathothep likes this.
  37. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    There are three options for making sure that something in the scene isn't affected by wet decals:

    1) Don't place wet decals where you don't want them! If you're hand placing the decals in the scene simply don't place them touching your terrain. If you're auto generating them (e.g. with a raycast to choose where to place them) filter the raycast to not detect the surfaces that you don't want affected. For a moving character (like mdotstrange was asking about) this isn't ideal because the character could move into a decal volume, but for static geometry like terrain this is the best option.

    2) Place dry decals. If you want a specific area or object to not get wet you can place a decal with "Mode: Dry" to reduce (or remove) wetness within the volume.

    3) Use forward rendering. WetStuff does not affect surfaces that are rendered with forward rendering, you can use this to your advantage by using a forward rendered material on objects that you don't want to be affected at all.
     
  38. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    511
    Can you add snow to this asset? That would be cool, Also is that possible to spawn this with vegetation studio?
     
    Nyarlathothep likes this.
  39. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    That would probably be possible, but it probably wouldn't look correct on a lot of surfaces. Wet Stuff can't change the shape of a surface, only the shading - we get away with puddles because they don't have any depth but snow does.

    One of the places where Wet Stuff struggles a bit is puddles on surfaces with very noisy normal maps (e.g. see this post, the road has about the worst normal map possible for puddles). The puddle surface should be flat (because the water fills in all the little bumps) and we work around this by smoothing out the normal map and that looks ok. For snow that wouldn't work as well.

    I'm not aware of any conflicts with vegetation studio :)
     
    Last edited: Apr 18, 2021
    dan_wipf and Crossway like this.
  40. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    511
    I need to use this with vegetation studio runtime spawner but I get flickering issue with this prefab when I move camera.
     
    Last edited: Jun 9, 2021
    Nyarlathothep likes this.
  41. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    • Does the flickering only affect puddles created by Wet Stuff, or other things as well?
    • Does the flckering only affect puddles which are on vegetation studio spawned objects, or all puddles?
    • Do you see the same flickering in any of the Frame Debugger stages? (Window > Analysis > Frame Debugger)
    Thanks :)
     
    Crossway likes this.
  42. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    511
    Yes only Wet Stuff puddles. I use a lot of other runtime prefabs like lights, particle,decals none of them have flickering issue.
    Yes only have flickering when I use with vegetation studio.
     
    Last edited: Jun 13, 2021
    Nyarlathothep likes this.
  43. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    Did you check the frame debugger? That will tell me where in the renderer the flickering is coming from.

    Also, you may want to check if the flickering is an editor only problem. I recently used another asset which interacts with the renderer in a similar way to wet stuff in one of my own projects and it flickers but only in editor! In player it's perfect.
     
  44. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,383
    Using Wet Stuff here to give the Crocodiles wetness :)

     
    Nyarlathothep, hopeful and TerraUnity like this.
  45. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,698
    Is it possible to get a wake from where the water is broken at the nose?
     
  46. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,383
    I only know about ripples created by normals. Not sure if a wake is possible. Maybe @larsbertram1 can give more info
     
  47. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,911
    @Rowlan crocodiles underwater should not receive any wetness :(
    smoothness (which will be tweaked mostly next to albedo) describes the air to conductor/insolator index of refraction. but if we are underwater we have water to ? surface?
     
    one_one likes this.
  48. MysleyMakers

    MysleyMakers

    Joined:
    Jul 27, 2021
    Posts:
    30
    Is this asset still being updated regularly? It seems it has no support for a year.
     
    Nyarlathothep likes this.
  49. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    399
    We don't have any plans for new features, but it's still supported and if you encounter any bugs we'll fix them promptly. It hasn't received any updates for a while simply because we haven't had any bugs reported to fix!
     
    MysleyMakers likes this.
  50. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    511
    Does it work on consoles like Xbox Series X or PS5?
     
    Nyarlathothep likes this.