Search Unity

PlayWay Water - high quality water system

Discussion in 'Assets and Asset Store' started by zuzzu, Oct 9, 2015.

  1. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Thank you :) Yes, most of the work is already done for shorelines and forces directly affecting waves. I consider delaying 1.1 release a bit and add these features to it as a beta.

    Yes, it works fine on OpenGL. Some bugs may be present though. Possibly the same you see on Mac.
     
    ThunderTruck likes this.
  2. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Great to hear that the shorelines is already done! When could we expect to get the update with this feature? I can't wait to buy you ocean man!

    Regards,
    Carlos
     
  3. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Soon ;) I had a big deadline of my other project yesterday and now I have a plenty of time for the water asset.
     
    Seith, John-G, GXMark and 1 other person like this.
  4. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Just an update of my progress so far before I go to sleep:

    - Asset is now fully compatible with 5.3.
    - I've abandoned Unity shader keywords and implemented my own system. Memory usage of main shader is now negligible.
    - Proper shaders should now always be included in builds without any additional steps on all platforms.
     
    Last edited: Dec 14, 2015
    John-G likes this.
  5. Plutoman

    Plutoman

    Joined:
    May 24, 2013
    Posts:
    257
    Did you just run if statements, basically?

    That would make sense - should be negligible performance difference as long as the result isn't different inside pixel blocks. Uniform across a whole shader, should not do anything.
     
  6. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    That wouldn't do it in my case. Afaik you can't run tex2D inside if blocks and everything there still count into resource limits.

    Right now, I generate necessary shader variants by scripting and save them in the PW Water folder. Each shader variant contains necessary #define lines which control its further compilation. On each project save all unused shader variants are removed to save space.

    It's probably pretty much the same thing that Unity does internally when keywords are used, but without memory bug and global keyword limits.
     
    Last edited: Dec 14, 2015
    Plutoman, Rycons and montyfi like this.
  7. VirtualisDev

    VirtualisDev

    Joined:
    Jul 21, 2015
    Posts:
    30
    Hello,

    I have a couple of questions :

    • About the buoyancy system, does it make the object follows the waves heights ?
    • Is it possible to precisely generate waves with frequency and amplitude parameters ? I mean, is it possible to have one main wave with a specific frequency and amplitude ?
    • How is performance, considering VR use ?
     
    Last edited: Dec 15, 2015
  8. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Hello,

    Yes.

    Not at the moment, sorry.

    I haven't tested this myself, but @jashan has reported that it works pretty fine performance-wise. There are some issues with VR builds on 5.3 though atm.
     
  9. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Shorelines? When? I can't wait man!

    Regards,
    Carlos
     
  10. VirtualisDev

    VirtualisDev

    Joined:
    Jul 21, 2015
    Posts:
    30
    Arf, so bad !!!! It's actually one of the more important thing we need. In the sea you have specific frequency that makes people sick. We need to reproduce that frequency and have for example a wave every 5 seconds.

    Can you do something which would simulate that ? It's actually possible with Dynamic Water System but the shader is horrible.
     
  11. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Not a wise idea to make your players sick, are you working for navy? :)
     
  12. VirtualisDev

    VirtualisDev

    Joined:
    Jul 21, 2015
    Posts:
    30
    It's an exemple ;-) The sea is often made of a main wave, the parameter wind and wave speed does the job, i need to know if it simulates a reliable frequency (for exemple one wave each "x" seconds) or if it generates hazardous waves.
     
  13. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    I still can't add new features because of the Unity keywords issue that I've mentioned. I have solved the RAM use, but my fix has caused extremely long build times. I hope to make an ultimate fix today and resume my work on other stuff..

    What you describe are distant storm waves, as far as I know. I will add them for you as soon as I will fix the keywords issue.
     
  14. VirtualisDev

    VirtualisDev

    Joined:
    Jul 21, 2015
    Posts:
    30
    The current waves with some tweek with wind and wave speed parameters generates hazardous waves or repeated waves ?
     
  15. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Check out the Weather Demo.

    You may set high directionality in profile to make a clear, repeatable pattern, but that doesn't look right on open sea. Such directionality is more common near shores.
     
  16. VirtualisDev

    VirtualisDev

    Joined:
    Jul 21, 2015
    Posts:
    30
    O.K

    So let me know about the distant storm waves, we are very very interested in it and the quality of your water.
     
  17. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    All right. I believe I've fixed a long build time issue and put a definite end to the high keyword count problems. I will test this thoroughly now as I really don't want to get back to this anymore. That was really frustrating.

    I will send a fixed build today or tomorrow to everyone interested after I will be done with testing.
     
    Last edited: Dec 16, 2015
  18. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    The thing with performance in general is that it depends very much on the hardware, and what other things you want to do. My approach is to make it awesome on high-end hardware (980 Ti and above) and find solutions to still hit the framerate target (90 FPS without framedrops) on lower-end hardware. PlayWay Water has some pretty decent settings for performance, so you can tune quality down to tune performance up.

    I'll be doing a performance iteration next week, and if all goes well, PlayWay Water will already be included in that. Then I can report some more ;-)
     
  19. patch24

    patch24

    Joined:
    Mar 29, 2009
    Posts:
    120
    I'm seeing a few "Associated script cannot be loaded" missing script errors on cameras in the demo scenes. Is this for a separate 3rd party library I don't have? This is after bringing playway water into a brand new project. I've seen this on mac and windows both. Using Unity 5.2.3p3.
     
  20. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    These are for Scion: Filmic Post Processing from the Asset Store. It is optional and left there to let you get the same look as in web players.
     
  21. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    I will submit an update for Unity 5.3 to the Asset Store at the end of this week. I will keep it for a few days to ensure that there are no issues on major platforms.

    It will be a major upgrade improving this asset in many ways and finally providing a full AMD and Mac compatibility. Everybody who needs it now may contact me as always to get the latest development version. Most recent one is 1.1 RC6.

    Shorelines will not be included in this release, but will appear shortly in development releases.
     
  22. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Hello zuzzu,

    Any timeline for shorelines? if the timeline is close enough I could get the asset now to be working on setting it while waiting for the shorelines if the timeline is not too far from now.

    Regards,
    Carlos
     
  23. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Hi Carlos,

    I hope to complete a first functional version of shorelines by Sunday, but I may hit some wall. I would recommend you to wait a few days, just to be sure.
     
  24. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Thanks zuzzu for the advice. I will wait then.
     
  25. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    Hi zuzzu, I have question and can't find the answer on your video. Will your ocean system work in Editor mode (without push the "Play" button)?
     
    Seith likes this.
  26. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Hi. It is deformed only in play-mode. I've disabled this on purpose to save memory etc.

    I guess I may add a toggle to let you decide.
     
  27. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    That would be awesome, yes please!
     
  28. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hi,

    Can I have a product comparison between this and ceto? both look good but I'm wondering why I would use playway vs ceto? In particular I look for the best performance and lowest/zero gc alloc.

    Also: - ps4 support, great culling of unneeded tiles (not rendered under terrain) etc would be great. I tried some of the demo scenes on my test box with a 460 GTX and they chugged sometimes. Also probably if we're using SSR from Unity, would this work normally on the ocean?

    Rivers? sorry so many questions.
     
  29. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    I'm working on it, but I'm pretty busy with other stuff right now, so it may be there in a week or month. It's hard to say, as I'm still not sure what problems are on the way there.

    If you want it for a lake or some background sea that doesn't need to be endless then you may use a custom mesh and it should get culled by Unity. It's not possible for endless seas though as these are rendered with radial grid.

    I've used tiles to render oceans a while back ago, but I've removed it. Now when you tell about culling I think I will add it back.

    It doesn't slow on terrain as much though. Pixel shader is not executed there and vertex shader may be optimized by setting lower tesselation through a script when you are on a high ground.

    It is easy to adjust it for pretty much any desktop/console hardware. I've asked a few people to answer you and they told it is faster than ceto with similar settings.

    As a side note, all demos are pretty old and I hope to update them soon. Rendering is performed in a completely different way now. The Weather Demo is not as ancient as the others though.

    Is it out? :confused: I'm waiting for this for months. I thought it was delayed.

    Still no rivers. I'm going to work on this as soon as I will complete the shorelines. You may make straight ones just fine though. I've seen some AAA titles without flow maps on rivers.
     
    S_Darkwell likes this.
  30. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
  31. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
  32. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Thanks for the replies. The mesh ones are nice, do they support angles? or will always be flat?
     
  33. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    As long as your meshes are not blobs etc. it should work fine. It is optimized for common water surfaces like rivers, puddles, lakes etc.
     
  34. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    374
    @zuzzu could you explain a little more about the network sync feature you mentioned in the original post? I couldn't find it in any of the documentation and I haven't yet bought the product.

    Additionally, are there any ways of checking or being told when an object enters/leaves/intersects with the water volume?

    Thanks and make sure you leave time for Christmas over the next few days. ;)
     
  35. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Yeah, that AA is unstable as hell.
     
  36. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    It's a tiny script. It synchronizes Time property on main water component that is used by everything else to resolve sea state.

    You may sample water height at a point so you may determine that on your own. I hope to add simple events for this some day ;)

    Good point :)

    Yeah, I'm pretty disappointed with it too. We have extremely big problems with aliasing in one of our projects and I really hoped that it will solve them.
     

    Attached Files:

    strich likes this.
  37. privilegue

    privilegue

    Joined:
    Jan 19, 2013
    Posts:
    8
    So after purchasing I quite like this package. However something I can't seem to figure out is how to build properly. (I followed the tutorial on settings etc.) But when I say build against Windows using say the stress test scene, the water shader does not show up on built version, its fine in editor however.

    I have saved the asset via editor button. Confused now. So if anyone could explain this I'd appreciate it. Cheers. (Note using Unity 5.3)
     
  38. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    They are rewriting it at the moment, so I would not judge the future possibilities of Unity AA by the alpha version thats in the current release.
     
    Last edited: Dec 21, 2015
    hopeful likes this.
  39. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Hi. It's an incompatibility with Unity 5.3. It is fixed in the recent updates. May you send me your Invoice No? I will send you the most recent one.

    You are right. It has lots of potential and is just perfect when camera is standing still. I've became too hyped about it after hearing that UT guys work on it few months ago, that's all :)
     
  40. privilegue

    privilegue

    Joined:
    Jan 19, 2013
    Posts:
    8
    Done thank you
     
  41. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    1.1 RC7 is finally available ;) I will send it in few hours to everyone. It introduces new height evaluation method that dynamically chooses best algorithm for each water map to sample from. It greatly improves physics precision during stormy weather or stress.

    You may accelerate physics with SIMD from now on. Just enable it in "Edit/Project Settings/Water" and follow on screen instructions (I will automate it for the next release). Beware though that SIMD in Mono is currently available only on desktop platforms and probably new generation consoles.

    Physics does less work in the background from now on, so CPU usage will drop and it will give more processing time for Unity's skinning and other background computations. I will improve performance further later by implementing more SIMD and unsafe code optimizations.

    Besides that it should fix most or even all Mac, XBox One and PS4 issues.


    Wishing you all a Merry Christmas and a Happy New Year :) I'll have a Christmas break for few days so I may respond a bit slower than normal.

    PS I will work on shorelines after the break. I had to finish physics work first.
     
  42. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Excellent, I have lots of time over the Christmas break to use your system and the latest version sounds very interesting, looking forward to it :)

    Happy Christmas :)
     
  43. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    374
    I've never heard of this before. What is SIMD exactly?
     
  44. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    It's an instruction set in modern x86 CPUs designed for 16-bit vector operations. You may often get a 4x performance boost in vector math by using them.
     
  45. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    374
    Interesting! I'm almost tempted to buy this plugin only to see what you've done there haha.

    What are your thoughts on Compute Shaders? I'd have thought moving all the compute to the GPU would be the most efficient means of performance.
     
  46. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    GPU wins hands down, but transferring data from it is very costly. In this case it's probably better to keep it on CPU on a second thread.
     
  47. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    I have a gizmo tool and an object under the water which I don't want affected by the refraction/distortion effects. How would I set that up?
     
    zuzzu likes this.
  48. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    Also I'm using the amazing wireframe shader on a sphere but would like that to show under the water as well. Any ideas with the water shader that could be setup?
     
  49. bartm4n

    bartm4n

    Joined:
    Jun 20, 2013
    Posts:
    57
    If it's not too late, I'd be highly interested in getting my hands on an early patch release with the AMD GPU fixes. Thanks! :)
     
  50. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    You may set its material render queue to 2995 or higher in debug inspector. Possibly you may do the same for wireframe material.

    Sure. Send me your Invoice No via PM.