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

Tasharen Water (water from Windward)

Discussion in 'Assets and Asset Store' started by ArenMook, Aug 6, 2012.

  1. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902


    By popular demand, the water used in Windward has been submitted to the Asset Store.



    >>> View the Demo <<<

    Does it work in Unity Free / iPad / iPhone / Android?
    Yes, but it won't look as good: http://www.tasharen.com/windward/water/free.jpg

    Features
    • Affected by any number lights properly
    • Has proper reflections and object shadows underneath
    • Has configurable deep and shallow water colors
    • Makes it possible to hide terrain edges
    • Works in the editor scene view properly
    • Faster than Unity's water

    Material Properties
    • Normal Map has the normal map's XYZ in RGB channels and the foam texture in the alpha channel.
    • Reflection texture is created automatically, and is used in medium quality water and higher.
    • Skybox is used to "fake" reflection, and is used in low quality water.
    • Shallow Color controls the color of the water considered to be "shallow".
    • Deep Color controls the color of the water where the water is as deep as it can get.
    • Specular color controls the strength of the specular highlights.
    • Shininess controls how shiny your water is going to be.
    • Tiling controls the tiling of the normal map's texture.
    • Reflection Tint controls how bright the reflection is going to be.
    • Inverse Alpha, Depth and Color ranges control the foam and depth of the water.

    Script Properties
    • Quality controls the quality of the water. The lower the quality, the higher the performance.
    • High Reflection Mask controls what will be reflected at High and Uber quality levels.
    • Medium Reflection Mask controls what will be reflected at the Medium quality level.
    • Keep Under Camera option will keep the water underneath the camera at all times. This is useful if you don't want to place the water manually. It will always travel with the main camera (and thus -- the player), remaining at the height of 0.
     
    Last edited: Aug 8, 2012
  2. UnlimitedEdition

    UnlimitedEdition

    Joined:
    Feb 27, 2012
    Posts:
    287
    Most of the features are pro only I assume. It looks nice though, infact it looks spectacular, maybe one of the best I've seen in Unity.
     
  3. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    That is absolutely gorgeous, pretty much guaranteeing it requires Pro (not a problem here, if I ever need water)? Also how does it look from a 3rd/1st person perspective?
     
  4. ImogenPoot

    ImogenPoot

    Joined:
    Jul 2, 2012
    Posts:
    214
    I think only the high quality settings with reflection and reflection will require PRO, with the LOW settings he was showing in a youtube video also, I can't see why PRO is needed. And it still looks reasonably good, if you remember that water simply is all about reflection and refraction...
     
  5. UnlimitedEdition

    UnlimitedEdition

    Joined:
    Feb 27, 2012
    Posts:
    287
    Thanks, will be used if I ever get around to making my large scale, fps game.
     
  6. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Looks really good, color changing feature is really great solution and fading seems to be done really good. What is the price on it and is there any chance for realtime "player" demo, where you could fly, or walk above water? Also can you control the size of waves of normal map?
     
  7. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Cool! I needed some water in unity that actually works!

    Edit: Now that I saw the demo I believe that the foam needs more love. How easy would it be to use some animated textures for the foam?
     
    Last edited: Aug 6, 2012
  8. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Then, is it faster than the Unity's water 4 (both with reflections and foam) ?
     
  9. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    733
    really amazing water!
     
  10. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Very nice.
    +1
     
  11. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    I originally wrote the description of the package as "requires Unity Pro", but now that I think about it... low quality should work fine in Unity Indie. I'll have to test it later. I submitted it priced at $45. The amount of foam is configurable, just like everything else. You can tweak the shader to make the foam texture animated if you want. Currently it scrolls in one direction, which looks decent.

    Seems some have missed the demo link: http://www.tasharen.com/windward/water/
     
  12. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Very nice!

    Does it use shader model 2 or 3?
    How is the performance on iPad 2 and 3?
     
  13. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    This does look very nice. I may be interested to see how it would look on Unity free, if it works with it. :)
     
  14. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Now live!
     
  15. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Ah Sorry I have to read better :)

    Great to see it's live!


     
  16. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    What's the average allocation per frame? Would you mind pasting a profiler screenshot?
     
  17. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    That demo scene clocks at around 1000 FPS for me at 1280x720 at the water's highest setting, and at 1500 FPS at the lowest setting.

    Highest Quality:



    Lowest Quality:

     
  18. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Oh yeah, and this is what the water looks like at the lowest quality setting:

     
  19. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
  20. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    When i add your water component it renders fine in the editor but nothing renders in the game interface
    Even if i do something as simple as new project => drag drop your water => create a plane elsewhere => point the main camera so it sees both
    - Renders fine in the editor
    - Renders fine in the camera preview
    - The water doesn't appear when in "run game" mode, the plane still shows.
    Any idea what i could be doing wrong? It has to be some kind of setup issue as if i use your demo scene and run it this works just fine.
     
  21. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Is your game camera orthographic, perchance? What are your quality settings?
     
  22. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Everything is at the default, the camera is a regular new camera (perspective). Setting the quality to fantastic doesn't remove the issue.
    If you're available over skype now i'd be glad to share screen if that's easier for you to debug.
     
  23. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Of course -- You can add me -- arenmook.
     
  24. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Actually this is odd, i did new project again but this time only added water (no plane no lights no terrain) and the water works, i'll see if i can figure out what breaks it adding things one at a time.
     
  25. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Note to anyone who runs into this issue again: "Keep Under Camera" checkbox will always keep the water plane underneath the camera, at the height of 0. It's useful if you want the water to move with the player, but you should turn it off otherwise.
     
  26. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Actually thinking throught it a bit more, wouldn't it be better to change "keep under camera" to "keep to camera" and simply move it in 2 of the 3 axis? Sounds like the best of both worlds placing it at the desired height and still having it moved so that it isn't a huge plane no?
     
  27. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Already ahead of you there ;)
     
  28. helioxfilm

    helioxfilm

    Joined:
    Apr 23, 2008
    Posts:
    259
    Still looks very fine. I was also looking for mobile water.
     
  29. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
  30. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    The texture is projected straight down, which is why it looks like that. You'd need tri-planar projection to make it work properly at steep angles. Rivers generally don't have such steep slopes. What games usually do for steep inclines is create waterfalls there, which are made from particles rather than the water texture.
     
  31. ImogenPoot

    ImogenPoot

    Joined:
    Jul 2, 2012
    Posts:
    214
    It would be nice if triplanar mapping was a solution for steep angles... What about reflections? You practically lose the water's most important property as soon as you start bending the surface. Realtime-local-reflections might be an option, but it doesn't come close to the quality of camera based reflections.
     
  32. zappapa

    zappapa

    Joined:
    Dec 12, 2010
    Posts:
    57
    I'd like to see a closeup of the coastline. I wonder how the foam looks like. In the demo you smartly avoid a close look at the foam so I suspect it it doesn't look very good...
     
  33. ImogenPoot

    ImogenPoot

    Joined:
    Jul 2, 2012
    Posts:
    214
    I would also prefer a Demo where you can tweek parameters and walk around in a WASD style camera.
    What bothers me most is the "fence" pattern on the water. Maybe using two normalmaps, one with high frequency, the other with low, blended together with a proper normal map mixing scheme, would do the trick to avoid this pattern, because it kinda ruins the visual appearance, which otherwise seems quite good. Maybe it would also possible without too much trouble to generate the normal map on the fly via some FFT implementation.
     
  34. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    I've seen this. The water is absolutely gorgeous, but mostly from a distance. From closeup (like a fps view) personally, I'm torn. But this might be solved by using different normal maps.

    By using different normal maps with Unity's water, I can get some very nice waves. And, I like all of the options you get with Unity's water. You can specify the directions of the two "flows" of the normal maps, you can't with Tasharen(er at least not out of the box.)

    What I like most about Tasharen water is the way it handles depth, and the shore. It's very nice.

    I didn't have a chance last night to see how to use "convert" regular normal maps to the Tasharen format. In the short time I got to play with it, you can increase or decrease the tiling, but making the waves "bigger" by lowering the tiling didn't look as nice as I had hoped (they were somewhat flat). I also had a hard time getting good reflection 'shimmer' on the waves from ground view. I think using a different normal map, and changing the default directions of the water flow might be more to my liking. I used a standard normal map just to see what it looks like, and it doesn't work. You get mostly black water :D

    Also...the water comes in a circular plane, instead of a rectangular plane like Unity's. This has special considerations for my project. Again...I didn't have much time to look at the source, it maybe easy to change, maybe not.

    ArenMook...any thoughts or suggestions on these?
     
  35. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    You can apply the Tasharen Water material on any plane you like. I used a circular plane as when it follows the camera the distance to the farthest edge is the same on all sides, which is something I wanted. You can actually mix it with Unity's deformable water square if you're so inclined.

    The water normal maps contain the normal map in RGB channels, and the alpha channel contains the foam. I've done it this way in order to cut down on the number of texture samples. You can grab any normal map and just copy/paste the Tasharen water's alpha channel into it and use it. Just keep in mind that the texture should not be marked as a "normal map" as far as Unity is concerned, as that kills the alpha (and thus the foam).
     
  36. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Awesome, thanks. I'll see what I can come up with tonight.
     
  37. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    I assume you've tried playing with the inverse alpha, depth and color range properties btw, right? I can expose more functionality, but I have to do it carefully. Unity's water shader has everything configurable, but there is a clusterf@#^ of properties -- far too many. Feel free to suggest what to expose. You mentioned the flow direction (and technically there is no flow direction right now, it moves in opposite directions).
     
  38. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Personally i don't mind "too many properties", i'd like everything exposable exposed even if it takes more time to configure (the default looks nice anyway for those not willing to take the time). Water isn't something you do 200 times for a game so it's worth taking the time to tweak!
     
  39. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    http://www.tasharen.com/windward/water/close.jpg
     
  40. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    As a small thank you to Aren for his time yesterday, I'm attaching some screenshots from Folk Tale featuring various shots of Tasharen Water and a short review. I've included an up-close FPS style image as I too had this concern.

    We were previously using Unity Pro Water4, but have been on the lookout for a better solution for a while now, especially for low-quality settings. Tasharen Water was extremely easy to integrate into Folk Tale which features dynamic ambient zones. All I had to do was modify the Ambience Manager to directly update the material properties and tweak a few colours. Done and dusted in a few hours.

    #1


    #2


    #3


    #4


    As ever, the support was exceptional via Skype as we've come to expect. You might be glad to hear that Aren has kept things equally simple with his water too, while achieving a superb look. Fear not though, it's very flexible and fits most situations, so you won't find yourself missing all those Water4 parameters. We have however encountered several issues. Firstly with occlusion culling which we were already experiencing with Water4. Secondly the reflection tint can cause some unwanted hues in your water but they can be tweaked and eradicated with a little playing. The final issue I have removed as it now works under both forward and deferred rendering.

    I dug a little deeper into the shader code, finding it well commented with appropriately named variables. I wanted to modify some blending based on camera height, and thanks to an unused w param in a Vector4 ( thanks for the suggestion Aren! ) I was able to pass this from the script. I have basic shader programming experience, but feel comfortable enough that I would be able to tweak this to achieve any custom looks I required.

    Overall, a superb asset, and recommended if you use forward rendering ( which we don't ). Now if only it would work with deferred rendering.
     
    Last edited: Aug 15, 2012
  41. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Is this faster than the Unity Water 4, both in the same level of quality?
     
  42. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    461
    Is there built in functionality if a character goes underwater?
     
  43. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Wow, looks amazing! But 133 drawcalls. That's way too much for mobile.
    Unless the mobile version has lower drawcalls - can you post a screenshot of the stats for the mobile version? Also what it looks like and expected performance on iOS?
     
  44. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Tasharen water performs better than Unity Water 4, yes.
    Sorry, no.
    In the demo I linked, the draw calls hover around 28-30 most of the time when on Unity Free / iOS / Android quality. I have not tried it on iOS as I have no way of trying it there. It will look like this: http://www.tasharen.com/windward/water/free.jpg (minus the tree shadows)

    Just to clarify: the water itself on Unity Free / iOS / Android would be 1 draw call.
     
    Last edited: Aug 9, 2012
  45. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Woow. How many fps on mobile with minimum quality+foam?

    JP
     
  46. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    There is no foam on free / mobile as there is no depth texture to check against.
     
  47. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Thx for the reply. ;)
     
  48. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Thanks for the reply Aren!


    I am just looking at the screenshots, comparing the mobile version to low quality setting verison :


    "Low Quality"



    "iOS/Android"


    It looks very good, although the specular effect is a little less on the mobile version, but the most noticeable difference is the lack of transparency on mobile version. I am just wondering if its due to performance issue that transparency is disabled? Also, can you increase the specular effect on the mobile version so it will be as visible as the low quality version?

    This is definitely on the to-buy list! :D
     
  49. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    There is transparency in the mobile version. You wouldn't be able to see the ship's outline or shadow without it. The main difference is the lack of soft edges and depth-based colors caused by the lack of a depth buffer to sample against, which is still present in the low quality version. Thinking about it, you could actually turn off transparency to get better performance.

    Yes, specular component is tweakable. You see less of it in the Unity Basic screenshot because it's hidden by the terrain.
     
  50. ImogenPoot

    ImogenPoot

    Joined:
    Jul 2, 2012
    Posts:
    214
    Well it has some transparency as you can see when looking at the ship. But as Aren pointed out earlier, there seems to be no way of accessing depth values in a GrabPass on mobile. You need depth values to determine, well, how deep the water is since that is the measure for transparency.