Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Water+ (for Unity Free and Mobile)

Discussion in 'Assets and Asset Store' started by ilya_ca, Feb 8, 2013.

  1. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    The "material properties" section of the readme file goes over all of the settings. What settings in particular are you having trouble with?
     
  2. dbryson

    dbryson

    Joined:
    Nov 9, 2009
    Posts:
    269
    Specifically, the "DUDV(RG) Foam(B)" , "Depth(R), Foam (G), Transparency(B), Refr strength(A)", "AnisoDir(RGB), AnisoLookup(A)", and "Caustics animation" image maps. Can you give me any info on those? Thanks.
     
  3. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    All of those maps are internal to Water+ and there's nothing else you need to do to make the system work. The DUDV-Foam and caustics animation maps are included in Water+ (the internal maps directory). The Depth-Foam-Transparency-Refr(water map) along with the aniso map are generated when you press the "bake water maps" button.
    You don't need to worry about any of those maps, Water+ handles them automatically.
     
  4. dbryson

    dbryson

    Joined:
    Nov 9, 2009
    Posts:
    269
    Except, that I don't have a terrain in my scene since it is generated at run time and I think the "bake water maps" button requires a terrain, so I am asking about how these maps work and how I can generate them for my dynamic scene. Thanks.
     
  5. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    Oh, now I understand what you mean. Unfortunately it's not possible to bake water maps at real time (and even if it was possible it would be impractical because of long baking process). However for your particular case I would recommend using the shader that doesn't make use of the water maps - WaterPlus\Desktop\Lite shader.
    Let me know whether or not this works for you.
     
  6. dbryson

    dbryson

    Joined:
    Nov 9, 2009
    Posts:
    269
    No the WaterPlus\Desktop\Lite shader doesn't work for me as it seems to have no transparency.
    I don't want to "bake" them at runtime, I just want to understand how those image maps work so I can create reasonable water maps, myself. I just want to know how each of the channels in each of the image maps are used by the shader.
     
  7. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    If you're targeting desktop, then you don't have to use an aniso map - it's used primarily for optimized lighting on mobile devices.
    As for the water map:
    1) Depth (R) channel is used for creating variance in color of the water surface (to have an illusion of depth underneath). You can simply put some sort of a noise in this channel.
    2) Foam (G) - places where you want to have foam on your water surface. Brighter color = more foam.
    3) Transparency (B) - how opaque the water surface is. 0 = completely transparent; 1 = completely opaque.
    4) Refr strength (A) - refractivity strength. 0 = no refractions at all; 1 = max refractivity;

    I hope this answers your questions.
     
  8. dbryson

    dbryson

    Joined:
    Nov 9, 2009
    Posts:
    269
    Yes, thank you, that is the info I was looking for. I really appreciate your help.
     
  9. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Is this package still using the "tiled sand texture" approach for refraction? Why not make a camera that faces downwards, takes in EVERYTHING in the scene, culls out anything above the water, then renders a refraction map? Sounds like a good tradeoff for realtime stuff.

    There's also the option of implementing this myself in my own shader, but for those Water+ users, this method may prove really effective! :) Obviously, there's the problem of having major aliasing, but the fix for that would be to tile water planes, and have a refraction texture for each plane.

    Just a thought that came to mind when I heard you use "sand texture" approach for "baked' refraction. :D
     
  10. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    How to do depth mask on it? Plz help me with it...I tried Unity wiki's depth mask but its not quite working as I needed
     
  11. aharnam

    aharnam

    Joined:
    Sep 25, 2014
    Posts:
    3
    Hello, thanks for this excellent plugin. I can't seem to get it to run correctly on the iPhone or iPad, it causes a lot of memory issues, is there a guide on how to make the water use less memory or optimized for mobile ?

    Thanks.
     
  12. vws0234

    vws0234

    Joined:
    Aug 20, 2013
    Posts:
    2
    Hi! I bought your plugin and I would like to use it on a dynamically generated terrain. Is there an API to update foams on shorelines after a dynamic terrain has been generated? Thanks.
     
  13. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    420
    Hello, how can I enable cubemapping in unity editor? It's only working on mobile phones after building. But in editor there is no reflections on water.
     
  14. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    Yeah, actually I even implemented this approach in an early version of Water+, but then decided to go with the tiled texture instead. Even when making the resolution of a "refraction map" 4096 it still looks extemely bad.

    I have plans to make a version of Water+ for Unity Pro that will have real-time refractions and reflections.
     
  15. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    Please follow instructions in the ReadMe file. The editor tool included automatically generates water maps, and puts a depth map into the red channel.
     
  16. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    It should look the same in the editor. Are you sure that you have a cubemap assigned to the water surface material?
     
  17. Saishy

    Saishy

    Joined:
    Jun 3, 2010
    Posts:
    79
    Everything is completely white in Unity 5.

     
  18. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    231
    Thanks !
     
  19. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Saishy: check if the shader compiled properly; it looks like the shader half-compiled, then threw an error, causing it not to render properly.

    On top of that, a "missing script" warning is in the console. Maybe something got broken on it's way to Unity 5? :D
     
  20. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    Just a thought, @ilya_ca ,

    if you solve problem on forum, the people who are facing similar problem will not need to email you again and you will not waste your time in repeating whole process to everyone with same problem.

    So I guess you should solve problems on forum, it will benefit more
     
  21. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    I'm having issues with notifications on new messages - I don't receive any notifications on replies to this topic.

    For support please contact me directly at goldenzebrasoftware@gmail.com
    This thread is now officially closed.
     
  22. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,238
    FYI, we opened up our project today and found the console was being spammed with mysterious XML errors. Took quite awhile to find out that Water+ was the culprit--apparently it was phoning home to check for updates, and the server was unavailable. So we wasted half the morning figuring this out. Very uncool.