Search Unity

Graphics Water system based on baked fluid simulation

Discussion in 'Tools In Progress' started by NHydro, Nov 13, 2017.

  1. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    173
    Have roadmap? this great assets,must have.@NHydro
     
    blitzvb likes this.
  2. Yuki-Taiyo

    Yuki-Taiyo

    Joined:
    Jun 7, 2016
    Posts:
    72
    This is the best water foam simulation I ever seen in any game engine. Truly remarcable.
     
    Last edited: Feb 12, 2018
    sjm-tech and Flurgle like this.
  3. Xoduz

    Xoduz

    Joined:
    Apr 6, 2013
    Posts:
    135
    @NHydro would be interesting to see how your waves behave when breaking against a wavebreaker placed at a 45 degree angle to the path of the waves :)
     
    ftejada and Flurgle like this.
  4. tranceemerson

    tranceemerson

    Joined:
    Apr 10, 2017
    Posts:
    5
    haha, he already did that :)
     
  5. Xoduz

    Xoduz

    Joined:
    Apr 6, 2013
    Posts:
    135
    Ah? I seem to have missed it, all the videos I've seen so far show the waves hitting the wavebreakers straight on. Anyway, not super important :)
     
  6. tranceemerson

    tranceemerson

    Joined:
    Apr 10, 2017
    Posts:
    5
    Oh I see, haha you want to see if it's baked physics. I would love to find out too!
     
  7. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    any updates? the project looked awesome and seems a bit slow now
     
  8. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    In my opinion actually making this stuff work in peoples scenes poses additional challenges, some of which may be at least as great a challenge as the main simulation part. eg practical setup of shoreline & colliders without the operation being too tedious or the results too impactful on memory. These challenges were acknowledged by the author but I've not seen anything that indicates an elegant solution is in sight, eg I'm not really sure how practical it is to reuse sections of shoreline in the way suggested and there are few clues as to the actual process in editor.

    I dont mean to be negative and I want this project to succeed but I have my doubts about the practicality.
     
  9. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    A couple of other general thoughts following on from that.

    When it comes to simulations in game engines, its not unusual to find dilemmas about what to try to compute in realtime, and what to bake. Many forms of simulation are heavy enough that baking seems highly desirable, but depending on the sim and the scenario the amount of data the bake generates may have its own performance concerns.

    Personally I'm hoping things improve on this front over time. Unity has given us a great cross-platform compute shader facility and over time we can make assumptions that a bit more power is available in machines for such tasks. So compute could be used to run the sim in realtime. Then its a question of how data, such as collision data, is made available to the sim at runtime. Although I am not fully appraised of the limitations and drawbacks, part of me hopes that signed distance fields may get more use in this regards going forwards.
     
  10. NHydro

    NHydro

    Joined:
    Nov 12, 2017
    Posts:
    16
    Yes, indeed, creating a setup for fluid simulation is a complex task and therefore the degree of freedom for changing the scene or settings are planned to be limited.

    Judging by the comments on memory consumption, this approach can be used only in a limited number of applications. Currently, work is underway on a different approach (less demanding on memory). In the current version each particle is rendered as a separate quad, now we are trying to use particle grouping to reduce memory consumption.

    To demonstrate the use of segments of the coastline, a small demo project based on the current approach will be released early next month.
     
    IsDon, ftejada, Virtuadreamer and 5 others like this.
  11. THE2FUN

    THE2FUN

    Joined:
    Aug 25, 2015
    Posts:
    63
    It is really really amazing and world need this i think .
     
  12. NHydro

    NHydro

    Joined:
    Nov 12, 2017
    Posts:
    16
    Here is a link to the executable (x86_64) and project on Unity 2017.3.1 [link temporarily deleted]

    I want to note that the goal of this demo is to show the use of segments of shoreline. The project is not optimized, does not contain the necessary features for use in games.
     
    Last edited: Jun 18, 2018
  13. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Hi NHydro,
    i see a shader issues on water.

    Windows 10
    nVidia GTX 770 (driver 391.35)

    BlackWater.jpg
     
    Last edited: Apr 10, 2018
    ftejada likes this.
  14. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    I tried the demo on my notebook with a GTX1080 and Win10. The look of the water and the movement of the water looks amazing! Also the shorline effect looks great. I hope to see this as a finished plugin for Unity. ;)
     
  15. Xoduz

    Xoduz

    Joined:
    Apr 6, 2013
    Posts:
    135
    Looks fantastic! If I should nitpick on anything, it may be that the waves are a bit too "uniform" in size. If you go to a beach anywhere in the world, the waves that come in will have some randomness to their size. Anyhow, it looks (and runs, on my 970 GTX) great :)
     
  16. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    The same happens to me
     
  17. NHydro

    NHydro

    Joined:
    Nov 12, 2017
    Posts:
    16
    Yes, the compute shader doesn’t work on older cards. I’ll try to fix it this week.
     
    ftejada and sjm-tech like this.
  18. MBrown42

    MBrown42

    Joined:
    Jan 23, 2018
    Posts:
    86
    Wow, like wow, looks beautiful. I almost imagined I was on the beach and couldn't hear the kids screaming at 7am.
    Even though i read your specs on memory and disk space required, dare I ask if you plan on creating a "lite" version of this for mobile in the future? Keep it up, looks amazing!!
     
  19. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    So, how many prices has you won!!!?? This is breath taking NHydro! Do you see this becoming available any time soon? This is almost unreal. What an amazing look, This most be one if not the most realistic realtime simulation of a shoreline I have ever seen!. I just hope you are able to work out a way to make practical to use in games. This would make Unity the best engine for games that take place in islands or by the ocean. I really hope you have a practical asset I can use in my Xbox One game, which is in a small island surrounded by beaches.

    Regards,
    Carlos
     
  20. looki666

    looki666

    Joined:
    Sep 5, 2013
    Posts:
    79
    Same error .
    Windows 7 , Gtx 1070 .latest drivers .

    Unity 2017.4.1 - Hard locks my computer .
    Unity 2018b12 - OK.
     
  21. NHydro

    NHydro

    Joined:
    Nov 12, 2017
    Posts:
    16
    Thank you for your feedback, here is an updated link
    The compute shader was slightly changed
     
    ftejada likes this.
  22. Milanis

    Milanis

    Joined:
    Apr 6, 2018
    Posts:
    55
    Could you try something? Lower the particle count by half "and" scale the particles up by 3-4 to test how bigger "foam pieces" may look like. I love the simulation, but your particles are too small and within the whole thing looks "too thin". Good work!
     
  23. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Great, now is working.
    Awesome water shore.
     
  24. Ttravi

    Ttravi

    Joined:
    Jan 22, 2018
    Posts:
    32
    The best looking ocean simulation for Unity to date, it is.
    There is a way to generate those maps runtime? A ship sailing through these waters would need to have it's bow calculated everyframe to produce the dynamic effects shown on the rock and the pier.
     
  25. swapnilpadlekar18

    swapnilpadlekar18

    Joined:
    Mar 14, 2018
    Posts:
    1
    Hi NHydro,
    I am making a island VR game. I wanted to ask if I am allowed to use your water system in that game. It looks great in VR.
     
  26. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @NHydro is it possible to add splat mapping with packed textures such as the asset Megasplat? Also "streamed dynamic Occlusion Culling" for meshes - only particles/water seen by the camera will be visible/loaded might help if you're not already using that technique. Also some assets like GPU based "PA Particle field" recycles particles to improve performance .. the particles are moved to back to the beginning.
     
    ftejada likes this.
  27. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi @NHydro

    Here is a video with some information that may help you, if you go deeper into it.



    regards
     
    Flurgle, Ralij, Xoduz and 3 others like this.
  28. THE2FUN

    THE2FUN

    Joined:
    Aug 25, 2015
    Posts:
    63
    Amazing job... When can we download in Assetstore?
     
  29. ALTernative-MS

    ALTernative-MS

    Joined:
    Jul 10, 2013
    Posts:
    6
    Hi @NHydro , can you re-upload your files, all links are dead for now. Thanks a lot for your awesome work!
     
  30. 4sascha

    4sascha

    Joined:
    Mar 9, 2017
    Posts:
    51
  31. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    173
    @NHydro When can we buy in Assetstore? thanks
     
  32. sayginkarahan

    sayginkarahan

    Joined:
    Jan 23, 2015
    Posts:
    49
    @NHydro, is there any update? We're waiting to hear your new amazing progress news :)
     
  33. Yuki-Taiyo

    Yuki-Taiyo

    Joined:
    Jun 7, 2016
    Posts:
    72
    Lesnikus5 likes this.
  34. FloBeber

    FloBeber

    Joined:
    Jun 9, 2015
    Posts:
    166
    Any update?
     
  35. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    173
    Any update?
     
  36. BrokenVector

    BrokenVector

    Joined:
    Feb 2, 2017
    Posts:
    40
    ftejada likes this.
  37. originalemanuel2

    originalemanuel2

    Joined:
    Mar 4, 2015
    Posts:
    21
    looks amazing! the link you posted to the demo is not available anymore. can you share another one?
     
    BrokenVector likes this.
  38. julien-conan

    julien-conan

    Joined:
    Jun 20, 2015
    Posts:
    8
    New link also requested here, many thanks best I have ever seen to.
     
    BrokenVector likes this.
  39. NHydro

    NHydro

    Joined:
    Nov 12, 2017
    Posts:
    16
    Hi Howard-Day,

    It seems now we have found a way to reduce memory consumption to some extent, but it still needs some work to be done. Now, work is underway on user interface for coastline design.

    In the first version a coastline may be built from pre-prepared blocks with the ability to change the appearance and slight deformation.
    The coastline design sequence will be similar to that of the road network:
    1. drawing the spline,
    2. setting the type of coast along the spline (sand, stones, etc.),
    3. adjusting the Terrain object to the shoreline height.
     
  40. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Nice! That definitely looks practical for game development scenarios. How much memory does it take to store three types of coast in the quality shown in the video?
     
  41. BrokenVector

    BrokenVector

    Joined:
    Feb 2, 2017
    Posts:
    40
    Take my money!
     
    Don-Gray likes this.
  42. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    Great, this looks really amazing. Can't wait to see this hit's the Asset Store.
     
  43. Howard-Day

    Howard-Day

    Joined:
    Oct 25, 2013
    Posts:
    137
    Yep, I'm completely happy with that response, it looks like incredible work, and a fantastic editor. Cannot wait to see further tuning and options!
     
  44. IsDon

    IsDon

    Joined:
    Feb 27, 2015
    Posts:
    35
    This looks amazing, I just want to ask whether you're going to come back to an earlier comment about wakes - I imagine a similar approach of pre-baked foam coming from behind a boat with an additive height that interacted with the short could be amazing, but is it something you're working towards, or a bit of a pipe dream?

    Don
    have a great day
     
  45. victor1427

    victor1427

    Joined:
    Feb 11, 2019
    Posts:
    2
    will it sell?
     
  46. victor1427

    victor1427

    Joined:
    Feb 11, 2019
    Posts:
    2
    time to market?
     
  47. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    wow very nice, great work
     
  48. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    396
    Just release a beta already!!
     
  49. GuitarBro

    GuitarBro

    Joined:
    Oct 9, 2014
    Posts:
    180
    Count me interested as well.
     
  50. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hi,

    Nice progress. Max relaxation when i look at the waves.
    Would it be possible to bake out own simulations with e.g Blenders FlipFluid?

    best,

    Sascha