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.

KWS Kripto Water System

Discussion in 'Assets and Asset Store' started by kripto289, Mar 6, 2021.

  1. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    437
    Hello everyone :)
    Sorry for my English!
    I will be very happy if you tell me where I make mistakes. I very very stupid in english learning,


    Soon I plan to add a new water system for assesstore. I just recorded a few demo.





    The current water version works only on standard unity rendering and PC(dx11).
    Available features:
    -GPU fft waves with multiple cascades (to avoid tiling)
    -Physical approximation of lighting (volumetric scattering and shadows, absorption, turbidity)
    -Physical approximation of reflection using world space reflection vector. (fast pixel-perfect screen space planar-projected reflections, camera planar reflections, baked and realtime reflection probes)
    -Physical approximation of refraction in screen space with dispersion
    -Physical approximation of caustic relative to water depth.
    -Underwater effect with volumetric light/shadows and volumetric caustic.
    -Shoreline editor (baked shoreline wave simulation with foam particles)
    -Flowmap painter
    -Infinite ocean, tessellation, depth write for correct postprocessing (DOF), offscreen projected rendering with scalable resolution.
    -Realtime water view in editor (with all features).

    In the near future I plan to add more features like storm foam / swimming objects / dynamic fluids for rivers/flow maps and a lot more. Next, I'll optimize and adapt all functionality (if possible) for mobile, URP, HDRP and VR rendering. And finally, I will proceed to create effects, because I'm vfx artist :)

    I will be happy to hear your feedback and wishes!

    Also, here is my roadmap for the water system (with english mistakes )
    https://trello.com/b/BUa7pLdp/water-system
    Discord channel https://discord.gg/GUUZ9D96Uq
     
    Last edited: May 12, 2022
    TerraUnity, zyzyx, sjm-tech and 9 others like this.
  2. kkkkkkkkkkkkks

    kkkkkkkkkkkkks

    Joined:
    Jul 22, 2020
    Posts:
    1
    It looks great!
    When will URP be supported
     
    Matthew_Hacker839 likes this.
  3. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    HI Kripto, how could I have missed this. This looks awesome. Beautiful.
    Keep up the good work. Let us know when it's ready :)

    Norby
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,568
  5. look001

    look001

    Joined:
    Mar 23, 2017
    Posts:
    102
    Yes it looks very good. Also look at the roadmap, the upcoming river foam looks fantastic! Unfortunately not supported on mobile or metal yet. Support for mobile would be wonderful:)
     
  6. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    110
    HDRP HDRP HDRP :D
     
    Gekigengar, one_one and jorikito like this.
  7. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    Just bought it :)
     
  8. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,230
    Let us know how it is
     
  9. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,236
    Is Mac/Metal support planned?
     
  10. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    437
    I can't test metal API because I don't have mac os, but I think I'll add it later.
     
  11. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    Hi Kripto, any time frame for Mac support would be appreciated. I work nearly 100% on Mac.
    Thanks
     
  12. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,613
    Looks wonderful, any time frame on Mac/Mobile support, would love to use this.
     
  13. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    437
    Hello, Finally I was able to test the water on MacOS and fixed all problems (instead of SSPR reflection, because metal doesn't have dx11 features and I need to find other ways to render it). These fixes will be added in the next assetstore update (after 1.0.1) or I can send them immediately by email "kripto289@gmail.com".
     
    Mark_01 and look001 like this.
  14. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    Hi Kripto
    Good to hear that you are working on it

    Thanks:)
     
  15. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    How often do you release? When is the HDRP version planned?
     
    Last edited: Jun 19, 2021
  16. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,568
    +1 for hdrp & vr

    *can easily be 3x this price for this quality and features
     
    one_one and Mark_01 like this.
  17. SorraTheOrc

    SorraTheOrc

    Joined:
    Jun 11, 2016
    Posts:
    155
    I'm looking for a water solution that allows me to have a small (1km x 1km minimum size) island upon which the waves all move towards the shoreline. All the assets I have tried so far do a reasonable job of making the waves lap the shore on one side, but when you walk to the opposite side the waves are going the wrong way.

    Can KWS do this?
     
  18. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    437
    No, alas.
    You can rotate wind direction in runtime, so maybe you can rotate wind when you walk around the island?
    Also you can set the chaotic wind and add shoreline foam/waves around the island.


    ezgif-6-9b3c6a1946c0.gif

    Now I plan to release implemented features (foam fluids/dynamic waves/buoyancy/finite meshes), and then will add support of HDRP / URP
     
  19. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    First all, this asset looks amazing. really love the method of shoreline waves. One of the things I've been looking for for ages! I found your trello board, and found this beautiful gif as well. Is this feature currently in the asset store version, or is there a possible ETA? :) I've tried so many different methods and workarounds to get some sort of churning river foam like this, and this looks absolutely incredible. I want to know more about how this works and play around with it myself!! The final request I'd have is being able to make small waterfall cascades or even larger waterfalls to have a completely unified water system with nice foam like this. I can dream :p
    (https://trello-attachments.s3.amazo...5bdb1808e7ea2a2ce172/ezgif-6-8792e610749b.gif)

     
    Last edited: Jul 1, 2021
  20. ethaneditsbusiness

    ethaneditsbusiness

    Joined:
    Feb 6, 2020
    Posts:
    29
    How can i fix these holes that I'm getting in the water? upload_2021-7-2_9-54-19.png
    Im using built in render pipeline, I have some post processing effects on my camera, not sure why this is happening...
     
  21. ethaneditsbusiness

    ethaneditsbusiness

    Joined:
    Feb 6, 2020
    Posts:
    29
    Also, how do I make the ocean infinite?
     
  22. PatataFrita

    PatataFrita

    Joined:
    Oct 17, 2014
    Posts:
    50
    Hi @kripto289 ! I'm very interested in shorelines. In your video you show a bit how to add those waves on the shore, is it possible to add them in runtime or is it only possible to add them in the editor?

    The same for flowmaps, would it be possible to add or create them in runtime?
     
  23. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    437
    Try to increase camera Far distance?
    It's infinite by default.

    Do you use procedural geometry? It's not possible right now.
    You can try to open the script "WaterSystemInspector" and look a code from the method "void AddShorelineMap()"
    and "void AddFlowMap()", but it will be slowly in runtime.
    For example pseudocode:
    Code (CSharp):
    1. var wavesData = await waterSystem.GetShorelineWavesData();
    2.  
    3. var newWave = KW_ShorelineWaves.ShorelineWaveInfo();
    4. newWave.ID += nextID;
    5. newWave.PositionX = ....
    6. newWave.PositionZ = ...
    7. newWave.TimeOffset = Random.Range(0, 1);
    8. newWave.ScaleX =....
    9. newWave.ScaleZ =....
    10. newWave.EulerRotation = [0-360]
    11.  
    12. wavesData.Add(newWave);
    13.  
    14. await waterSystem.BakeWavesToTexture();
    15. waterSystem.SaveShorelineToDataFolder();
    16. waterSystem.SaveShorelineDepth();
    17.  
    18.  
     
    Last edited: Jul 23, 2021
    PatataFrita and Mark_01 like this.
  24. montyjack

    montyjack

    Joined:
    Jan 10, 2014
    Posts:
    43
    Hey - do you support infinite oceans? Truly infinite ones, as in if I'm at 10,000 feet I won't see the corners of the ocean plane? Also, can you handle lights underwater?
     
  25. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    320
    Just purchase and found this thread.
    Why do I have these white squares repeating throughout the water? (Halfway to the horizon)

    EDIT 19/August/2021
    I don't anymore
    No More Glitches! New Version is tops. Removed my video.
     
    Last edited: Aug 19, 2021
  26. PatataFrita

    PatataFrita

    Joined:
    Oct 17, 2014
    Posts:
    50
    Thank you!

    Yes, I use procedural geometry. If I have understood your message correctly, it is not possible to add flowmap in runtime for now but shoreline yes, following the steps and pseudo-code that you told me but it is slow in runtime, right?
     
  27. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    437
    Hello,
    By default, I create a water mesh box with "MainCamera.FarDistance" parameter when water initialised. In case of If you have "far" distance 100500 km then water will have the same size.
    Note: By default main camera have far distance = 2km, but editor-view camera have dynamic far distance (when you press F button) and you can see water corners. (but only in the editor view).

    Hello,
    I use top-view ortho camera in editor mode, and it looks like that:

    upload_2021-8-8_8-12-45.png
    There you can see the reason you can't intersect waves, because UV will be broken. Also, it's possible you to change position/rotation/scale of this quad-waves.

    So later I can use this texture as mask for water animations (using animated sprites)

    upload_2021-8-8_8-14-15.png

    Also, I use top-view depth camera and use it for the correct foam/waves intersection with curved surfaces.

    upload_2021-8-8_8-15-5.png

    upload_2021-8-8_8-18-30.png

    There is the drawing area where I can bake this waves (it's screen with the latest local build, not from asset store version).
    Outside this area, all waves will be ignored.
    upload_2021-8-8_8-19-12.png

    Right now, I use two important parameters: shoreline area size (camera ortho size) and texture resolution for depth buffer.
    I hope it's helpfully. Anyway, you can ask me more in my discord Kripto#6346

    Write me to my email "kripto289@gmail.com" or to my discord. I can send the latest local build with 100500 fixes and new features.
     
  28. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    437
    It's just a bug and fixed in the current build.
    Here is the script for the new feature for the next update.
    https://trello-attachments.s3.amazo...d0d7a5565f3aa724ca57/ezgif-2-16dfc1afdfdf.gif

    I use relative to XZ scaling, you can't control it separately. Is there any reason why you need it?
    You can open the script "KW_ShorelineWaves" and change these parameters and re-save shoreline waves.

    Code (CSharp):
    1.         [SerializeField] public float ScaleY = 4.5f;
    2.         [SerializeField] public float DefaultScaleY = 4.5f;

    The current version doesn't include this feature. I plan to add this later.
    Anyway you can change this parameter in the water shader:
    Open "waterVertFrag.cginc" and change this variable

    upload_2021-8-8_8-55-5.png

    Added to the next update.

    https://trello-attachments.s3.amazo...d0d7a5565f3aa724ca57/ezgif-2-16dfc1afdfdf.gif


    I plan to add more helper videos for each parameter, like that
    upload_2021-8-8_9-3-11.png
    upload_2021-8-8_8-59-22.png
    And the hint's like that
    upload_2021-8-8_9-8-27.png

    My English is not good enough for a detailed PDF. Also, PDF anyway no one reads. It is much easier to read about each parameter separately.
     
    Mark_01 likes this.
  29. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    320
    Many thanks !! Will digest as best as possible! Great work.
     
  30. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    320
    The only way those glitches can be fixed is by raising the water level until the glitches disappear!
    What is the reason for this?
    Having to raise the water level after building a scene is annoying but works. However creating a scene after raising the level just gets those glitches back again! Very unusual!
    ,,,and just for clarity..many, many folk read PDF files..serious folk I mean. Don't be afraid to make one.

    EDIT...August 2021... as from new version all is fixed for me so far and this new version is the best effort I've seen. Very professional indeed and with SO MANY extras..Thanks!
    Congrats to all!!
     
    Last edited: Aug 19, 2021
  31. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    437
    This is just an old bug, write me to my email/discord and I'll send the latest version.
     
  32. PatataFrita

    PatataFrita

    Joined:
    Oct 17, 2014
    Posts:
    50
    Where is the link to the discord channel?
     
  33. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    437
    Also https://discord.gg/9n5VNtxD
     
    PatataFrita likes this.
  34. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    320
    I have sent an Email a couple of days ago to KWS at this address... kripto289@gmail.com ....for the update.
    You need to register and give up your first born to get into Discord! It's a real mess over there. Good luck!!
     
  35. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    320
    Received update! Many thanks.. KWS. Prompt reply appreciated.
     
  36. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    320
    August 19/ 2021.
    Just beginning with new version and finding it awesome.
    So many fixes and the included Scenes are tops.
    New scripts for this and that and many little things added and fixed.
    It's like Christmas again. Getting very excited at the possibilities.
    Well done and many thanks for this fine product!!
     
    Mark_01 and hopeful like this.
  37. lcaExtende

    lcaExtende

    Joined:
    Sep 2, 2019
    Posts:
    25
    Hi,

    Nice asset !!!
    Can objects float?
     
  38. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    320
    Yep. Float and bob about and leave a wake ! It's like a brand new version from the older one. Exciting to say the least.;
     
    Mark_01 and hopeful like this.
  39. PatataFrita

    PatataFrita

    Joined:
    Oct 17, 2014
    Posts:
    50
    Lars-Steenhoff likes this.
  40. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    437
    Mark_01 and PatataFrita like this.
  41. PatataFrita

    PatataFrita

    Joined:
    Oct 17, 2014
    Posts:
    50
  42. laurent-clave

    laurent-clave

    Joined:
    Jul 18, 2011
    Posts:
    280
    Hi,

    This asset is fantastic...Very good job !!!

    Two questions please:

    - How to hide the water inside the boat? With KW_DepthRendering ?

    - Is it possible to simulate the foam on the waves and behind the boat?
     
  43. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    437
    KW_DepthRendering it's native script for rendering water to depth buffer/mask buffer/ (which is required for underwater effects/volumetric lighting)
    I'll add this feature in the next updates, but you can add it right now.
    Just use new "KW_WaterHoleMask" shader for masking.


    upload_2021-8-31_11-53-51.png
    upload_2021-8-31_12-4-33.png

    I'll add this feature later.
     

    Attached Files:

    hopeful, Mark_01 and mgear like this.
  44. lcaExtende

    lcaExtende

    Joined:
    Sep 2, 2019
    Posts:
    25
    Thank you Kripto !
     
  45. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    475
  46. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    320
  47. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,568
    when logged into store, it seems to give extra discount to the price.
     
  48. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    437
    You can upgrade to urp/hdrp version for 25$.
    Rendering in URP and HDRP is very different from each other, so I have to support three different packages. Also, adaptation for URP and HDRP takes a lot of time, as the documentation for custom shaders does not exist. For example, I spent a few months on adaptation for URP. I think it costs a little bit.
    In any case, I can give you additional discounts if you have already bought one of the packages :)
     
    Mark_01 likes this.
  49. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,568
    IMO: put enough price for HDRP and even more for a VR support/upgrade too, pretty sure its lots of work.
    (Rather pay more than have quick cheap/buggy version that gets abandoned fast..)
     
    Mark_01 likes this.
  50. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    475
    That's is correct ;)
     
    Mark_01 likes this.