Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Wet Shaders

Discussion in 'Assets and Asset Store' started by Grespon, May 28, 2013.

  1. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Last edited: Jul 9, 2014
  2. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Hmm... any information on how customizable it is? Other screenshots?
     
  3. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    A new WebDemo is up and running.

    It's now possible to change the parameters and test some of the shader aspects. Press left CTRL to release the mouse.
     
    Last edited: Jun 6, 2013
  4. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Some more screenshots:
    $m4ez.jpg
    $bblo.jpg
     
  5. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Looks really good!
     
  6. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Looks pretty nice. So how fast is this on mobile? How many drawcalls?
     
  7. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    I didn't test on mobile yet. I'm fixing a problem with the reflecion orientation first.
     
  8. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    im also interested in if it works for mobile, there was a similiar product on the asset store, but youve got a great price worth buying if it does work on mobile.
     
  9. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    As soon as I fix the reflection issue, I'll be testing with some android phones and iPhone 4S.
     
  10. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    There's a limitation with Wet Shades. I'm still trying to figure out how to make a solution for this:
    Cubemap reflections work fine if you don't rotate the object (Y must be = 0). This is caused because shaders have limited 'internal parameters'. Cubemap reflections need object's position and this is too much data if we also want puddle's distortion effects.

    The best solution I can imagine so far is to create the cubemaps following the object's rotation.

    Resuming:

    For now objects must have rotation.y = 0 or the cubemaps must be made considering the object's rotation.
    If you want it the simple way, with no puddle distortion, and free ground rotation with coerent reflection, I'll put this shader in a next version.
     
  11. Sashimi_2

    Sashimi_2

    Joined:
    Jun 26, 2013
    Posts:
    30
    I would happily purchase it for 5 bucks, but the web demo is not working, can you check your link etc please?
     
  12. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Ok. Fixed the demo now.
     
  13. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,816
    How do you set this up?
    I'm trying this on Unity 4 and I dragged the WetGround prefab into my scene.Yet the plane is just black. It has no water/wet effect whatsoever.

    Can you please point me to a tutorial on how to set it up correctly?
    I have my project setup as DX11 for PC Standalone build.

    Thanks
     
    Last edited: Jul 3, 2013
  14. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi Meltdown,
    You're right. I'm sorry. I've just tested with DX11 and it's really not working. I'll try to fix it and release an update, ok?

    EDIT: Meltdown, I think I fixed. PM me with your email if you want me to send it to u before I release the update(it can take some days).
     
    Last edited: Jul 3, 2013
  15. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    288
    Hi Grespon, love the demo! I also am not sure how I set this up. Do you think you could include the demo scene in the next update?
     
  16. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi Eyehawk,
    Ok, I'll make some demo scene to the next update.
     
  17. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    288
    Great thanks Grespon:p
     
  18. DesertRaven

    DesertRaven

    Joined:
    Jul 15, 2012
    Posts:
    137
    this looks like a good and cheap asset, may come in handy. I use a virtual sky model (UniStorm) and was wondering if it is possible to script your asset to work with this great asset?
     
  19. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    I know nothing about UniStorm, but Wet Shaders can be used in any mesh, so I think it's gonna be ok. Just keep in mind you need a CubeMap for reflections.
     
    Last edited: Aug 13, 2013
  20. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    195
    Hello.

    I purchased the asset a while ago. I would like to know if the dx11 update is included in the current version. If not can you send me the fix that was mentioned in an earlier post? Thanks
     
  21. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi SuperNewbee,
    I thought it was included. Isn't it working?

    I'll check today when I get back home, and send you the fix, ok?
     
    Last edited: Aug 23, 2013
  22. Hotsun

    Hotsun

    Joined:
    Aug 11, 2010
    Posts:
    122
    Hi,
    Did you update the DX11 version?
    Or I should buy the DX9 version first and ask for DX11 by Email?
     
  23. BuildABurgerBurg

    BuildABurgerBurg

    Joined:
    Nov 5, 2012
    Posts:
    566
    Purchased and Pleased
     
  24. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi,
    Sorry. I'm completely rewriting all the shaders. That's why I still didn't update.
    I can send DX11 version by email.
     
  25. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Thanks! :)
     
  26. DallasOnFire

    DallasOnFire

    Joined:
    Oct 22, 2013
    Posts:
    23
    Hello!


    Sorry, but how do I do the setup?
    Help, please!
     
  27. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi, Firulains,
    I still haven't time to make a tutorial, but I think it's quite easy. You just need :
    - a texture for your object,
    - a bumpmap,
    - a texture for the wetmap (where the brighter, the wetter).
    - a DistortionMap (The brighter, more distorted)
    - a cubemap for the reflection slot.

    After that you apply Animate.js to animate the distortion, and adjust Specular and Gloss.

    If you still need help, call me back.
     
    Arkade likes this.
  28. DallasOnFire

    DallasOnFire

    Joined:
    Oct 22, 2013
    Posts:
    23
    Hello!
    Sorry, I'm new in this, but can you telm me how is the procedure?
    Thank you!
     
  29. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Well,
    I forgot to tell: Put some Directional light (or any light set to 'important') in the scene or you're not gonna see any lighting effect.

    since your new, try first dragging the WetGround.prefab to the scene and try to understand how it's set.

    Basically it's a plane with a material on it. When you have a material, you can apply a shader, which will be the "painting process". Each shader has different inputs. You can see it in the inspector.
     
  30. WGermany

    WGermany

    Joined:
    Jun 27, 2013
    Posts:
    78
    I dont think its working on DX11 yet I just get black shaded on the object. I followed all the steps above still no luck.

    EDIT: Also, only if you don't mind could you make it open source? The main reason I bought it was to learn from it but I understand if you can't.
     
    Last edited: Oct 23, 2013
  31. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi,
    I'm really sorry. I still didn't update it. The next version will support DX11 and wil probably be open source. If you need Dx11 by now, PM me with your email and I send it to you. But I'm completely rewriting the shaders. Current version has some limitations, for example, if you rotate the object, the reflection rotates along with it. I couldn't be easily fixed due to a kind of calc limitations of shader language.

    It can take a while untill the next version, because I'm not having much time to work with Unity, and I also have Easy Water to give support.
     
  32. WGermany

    WGermany

    Joined:
    Jun 27, 2013
    Posts:
    78

    Oh no its fine, take your time. This is all just one huge learning experience for me. I am not developing a game just doing research on graphics in Unity.
     
  33. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    327
    any updates about mobile? maybe a mobile version?
     
  34. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Yeah.. I have plans, plenty of ideas.. mobile is always a must. What I'm lacking is some free time to work on it... I hope I can do it this year yet.
     
  35. Hotsun

    Hotsun

    Joined:
    Aug 11, 2010
    Posts:
    122
    I was working on a shader for one of my games (called Predecessors) which includes a rainy scene and required both wet shader and displacement tessellation shader combined together with realtime reflection,actually I did it but there is still lack of some features,for example all of my material become wet and just some places are more wet.
    Here is a screenshot:
    $Predecessors_Advanced_Reflective_Tessellation_shader_1.jpg

    As you are more experienced at wet shaders I think you can do it better than me,So I am really waiting for a Tessellated wet shader even if you I have to wait another month and even if you raise the value I think it does worth.
     
  36. ronaldosilva

    ronaldosilva

    Joined:
    Feb 9, 2012
    Posts:
    6
    Hi! I 've just purchased the package, but I can't make it work. I have a Unity Pro License, and I tried to setup a scene with the shaders and it just don't work. The surface is all dark and nothing happens. Can you help me? Thanks!
     
  37. ronaldosilva

    ronaldosilva

    Joined:
    Feb 9, 2012
    Posts:
    6
    Nah. It turned out to be the Direct X 11 Setup. =/
     
  38. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    For all of you having troubles with DirectX 11, I already uploaded a new version with sources. This will let Unity compile to DirectX 11 and other platforms like PS3, Xbox, etc..

    I'm also finally fixing the reflection-rotating-with-the-object issue. That was the main obstacle for me to improve the asset. Now I can work on it to add more options and features!

    I apologize for all this time without updating the asset, I'm just a hobbyist with a day time job and 3 assets to take care in the free time...

    Thanks !
     
  39. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi Hotsun, I never study tesselation yet.. I have no idea how much time I will spend doing this.. But its a nice idea.. I just can't promise anything..
     
  40. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    New version now includes sources.
    I also sent a new one with more features, including colored puddles :)

    $Captura de Tela 2014-01-07 às 23.13.55.png
     
  41. Hotsun

    Hotsun

    Joined:
    Aug 11, 2010
    Posts:
    122
    Hi,
    I really wanted to send my shader to you,unfortunately I can't because I don't have the permission from the studio I am working in but you just included the source which can help us a lot,I think we can now complete our shader with your features.

    Thanks a lot.
     
  42. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi people,
    Unfortunatly, I forgot to add a script in the last version. I already submitted a correction at January 7th. Please allow some time to the new version (1.12) to be approved. Sorry !

    Version 1.12 comes with more features btw !

    And it's gonna be more expensive, so If you want to save 5 bucks you better get version 1.1 :)
     
    Last edited: Jan 9, 2014
  43. olivier-etienne

    olivier-etienne

    Joined:
    Feb 15, 2013
    Posts:
    13
    Hello, just purchased your asset yesterday, and I think the result is very convincing.
    Thanks for making that available specially with the source.
    Would you mind including the example scene provided in the demo?
     
  44. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi, Oliver, Thank you!

    The demo scene contains some Unity PRO features, like the gloom effects, so I'm not going to include it. But I'll be making another demo scene which I can can include in the near future.
     
  45. olivier-etienne

    olivier-etienne

    Joined:
    Feb 15, 2013
    Posts:
    13
    Hello and thank you for your reply, I don't think the Pro effect encounter for the overall success of the demo, your shader do as
    it really spice up the environment.
    Just include some objects with reflection, sky and the running script they all contribute nicely to the scene.
    Thanks again for considering my request.
     
  46. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    I uploaded a new version, with a simple demo scene and a small guide. I hope it helps. When I have more time I can make a better documentation.
     
    Last edited: Feb 21, 2014
  47. adsantos

    adsantos

    Joined:
    May 9, 2013
    Posts:
    2
    How I apply it on Unity terrain? I'm trying to simulate a wet floor during a storm.

    By the way beautiful work, congratulations.
     
  48. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Thanks for supporting!
    Unity's terrain use its own shaders. I'm not sure if it's possible to apply a different shader to it. However there's an article that may help you with that:
    http://alastaira.wordpress.com/2013/12/07/custom-unity-terrain-material-shaders/

    If it's not possible, you'll have to use a different game object to apply the wet shader..
     
  49. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,816
    How do I make the rest of the texture transparent? I only want the wet parts to show.
     
    Last edited: Jun 15, 2014
  50. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    I tried to make a transparent option but I couldn't. The lighting effect that makes the wet look needs an opaque border. I'll try again anyway.