Search Unity

Physics Dynamic Water Physics - Realistic. Fast. Universal.

Discussion in 'Tools In Progress' started by NWHCoding, Apr 21, 2017.

?

Which water asset do you use with DWP?

  1. Crest

    112 vote(s)
    54.9%
  2. AQUAS

    15 vote(s)
    7.4%
  3. RAM

    17 vote(s)
    8.3%
  4. Ocean Community Next Gen

    6 vote(s)
    2.9%
  5. Ceto

    4 vote(s)
    2.0%
  6. SUIMONO

    7 vote(s)
    3.4%
  7. Ultimate Water System

    6 vote(s)
    2.9%
  8. Other Flat Water Asset

    8 vote(s)
    3.9%
  9. Other Water Asset With Waves

    29 vote(s)
    14.2%
  1. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Oh, I was thinking about the water physics itself (including water effects). As you can see in DWP1 water physics was creating the garbage, while in DWP2 there is no garbage on the physics itself, only the boat.
    You are also comparing performance of different scripts in images 1 and 2.
    I will check what is causing this since there is no reason for ship controller to generate garbage either. Ship controller remained mostly the same from DWP1 as it was a physics update - sorry, did not even realize we are talking about the ship controller. Fix incoming.
     
    chrisk likes this.
  2. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Last edited: Aug 24, 2019
    dsilverthorn likes this.
  3. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Hello, I already replied to your question in DWP2 thread but here it is again:

    There is no such option at the moment but the idea is great and will be shipped with the DWP2 update that is coming out in the next few days.
    I would suggest checking WaterObjectManager and searching for the Water tag and renaming it to whatever you want.
    It does not matter what it is called.


    Same applies to the DWP1 but instead of WaterObjectManager you will have FloatingObject.cs script.
     
  4. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    178
    Hi,
    Before purchasing, Will package work with Hydroform?

    Thank you
     
  5. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    No, it is not supported. However I will contact the author and hopefully get a copy of the asset to test with.
    Adding support for other assets inside DWP2 is quite easy but I do need to have the asset in question.
     
  6. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    178
    There is anything in the doc about implementing new water asset ? Or it need shader modification ?
     
  7. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    Hi,

    I have some errors using Burst when I want to build and run.

    burst can't run.png


    I'm using Crest + Mirror + DWP2

    Do you know how I can get rid of them?
    Thanks !
     
  8. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Hello, as far as I know this is still a bug with Burst compiler. I have searched the forums and the unity issue tracker and a lot of people are getting those so I can assume that it is at least in part Unity bug that (sometimes on some platforms) appears. You can disable burst by using DWP_DISABLE_BURST scripting define symbol but I do know that is a workaround, not a fix.

    EDIT: Check the post below from @Lee_Hammerton
     
    Last edited: Sep 6, 2019
  9. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    118
    Could you click on the first error in that list and show me the response in the bottom pane? or alternatively send me the editor log, I`m not clear what the error is here and I`m wondering if its a setup issue or a genuine bug in burst. Please note there are requirements to build standalone players in burst listed here :
    https://docs.unity3d.com/Packages/com.unity.burst@1.1/manual/index.html#standalone-player-support

    specifically :

    https://docs.unity3d.com/Packages/com.unity.burst@1.1/manual/index.html#burst-aot-requirements
     
    NWHCoding likes this.
  10. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Make sure to check if you have all the requirements as @Lee_Hammerton said in the previous message. Namely the C++ support for visual studio which is not installed with Unity by default.
     

    Attached Files:

  11. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    The guide in question says that for building for Windows requires Visual Studio OR C++ Tools but in fact it requires both.
    upload_2019-9-6_13-31-57.png
     
    Lee_Hammerton likes this.
  12. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    Hi, sorry for my late response, I wasn't home recently.

    Here the error response :

    error.png

    I'm going straight to read the documentation you linked.

    Thanks for the support
     
  13. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    Thanks for your support.

    It seems my Visual Studio lacks some C++ workloads. I'm fixing this and come back to you to tell you if it works.

    EDIT : it's fixed and working ! "Build completed with a result of succeeded" Thank you again
     
    Last edited: Sep 10, 2019
    NWHCoding and Lee_Hammerton like this.
  14. HonKasumi

    HonKasumi

    Joined:
    Apr 25, 2018
    Posts:
    45
    Hi, does also the first dynamic water asset support these water assets or only this one thanks
     
  15. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    There are separate threads for DWP1, as well as separate asset store pages. This thread is for DWP1.
     
  16. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    Just wanted to let you know that the link on DWP2 store page is for this forum (https://forum.unity3d.com/threads/467291/) not the DWP2 forum.

    Might lead to some confusion, so thought you should know.
     
  17. lo-94

    lo-94

    Joined:
    Nov 1, 2013
    Posts:
    282
    Hey there, how easy would it be to utilize this asset to make a sailboat? I want to use Unity's wind system with this to drive it. I'm a programmer, just curious how well documented API is for something like that
     
    dsilverthorn likes this.
  18. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    I bought the asset and use it for a sailboat game. As long as your object buoyancy works, anything coming to move the object is external and doesn't mess up the physics of the DWP2.

    For exemple, I use the Unity's wind system in an indirect way. I apply an addforce to the boat to make it move, and then apply a speed value regarding the matching angle of the sail and the wind direction. Not the most sophisticated way but it works perfectly and with DWP2 the result is satisfying
     
    dsilverthorn likes this.
  19. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    182
    Does anyone have any idea how much of a performance gain I can expect using this compared to Crest's built-in buoyancy physics?
     
  20. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    It is not about performance at all. It is about usability. In fact, you are going to lose some performance because inbuilt system does one query and mine does >1 for most cases. And DWP is not only about buoyancy but also other forces - i.e. chucking a different shaped rock at the water will give a different result, same with angle, etc.
     
  21. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    182
    Thanks for the reply. When I was playing around with Crest I noticed having multiple objects all floating at the same time added up really quick in cost. I was hoping the use of Burst compiler and Jobs would alleviate some of that. I don't suppose you have a demo version of this asset for me to do a quick evaluation?
     
  22. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    If anyhow possible wait for about two days when the updated version lands. Crest developer and I did some work to improve water height queries so that one will be a lot faster.
     
    Bartolomeus755, taylank and 3dship like this.
  23. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    Hi, do you have any plan to make your asset compatible with the new Unity Physics system?
     
    Last edited: Jan 16, 2020
  24. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    292
    Hi i recently bought DWP2 and on import i had 2 errors, this

    Assets\DWP2\Dynamic Water Physics 2\Scripts\WaterObject\WaterTriangleJob.cs(14,6): error CS0246: The type or namespace name 'BurstCompileAttribute' could not be found (are you missing a using directive or an assembly reference?)


    and this

    Assets\DWP2\Dynamic Water Physics 2\Scripts\WaterObject\WaterTriangleJob.cs(14,6): error CS0246: The type or namespace name 'BurstCompile' could not be found (are you missing a using directive or an assembly reference?)

    I have sent you and email with my invoice number and screenshots of the console output
     
  25. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    292
    Nevermind, i found the solution on one of the reviews in the store
     
    dsilverthorn likes this.
  26. zeb33

    zeb33

    Joined:
    Nov 17, 2014
    Posts:
    95
    Hi
    Any ideas about this?

    Assets\DWP2\Dynamic Water Physics 2\Scripts\WaterObject\WaterDataProvider\CrestWaterDataProvider.cs(15,17): error CS0246: The type or namespace name 'SamplingData' could not be found (are you missing a using directive or an assembly reference?)
     
  27. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Hi,

    The newest version has issues with the Crest ocean, the angular forces seems off..the ship mainly moves up and down with to little angular force..
    Seems to only be floating around the ships main pivot..
    Downgraded the DWP2 to last version and then it works as expected again..
     
  28. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Hello,
    have you updated Crest to the latest version? The update was to support Crest version 10 and up due to their API-breaking update.
     
  29. Ruufer

    Ruufer

    Joined:
    Jul 28, 2016
    Posts:
    17
    Amazing asset. I also use NWH Vehicle controller.

    My only question:
    The Input controls seem very odd in regards to steering and throttle, as in: I push A or D and the rudder just moves to the left or right and stays there, which is very counter intuitive to how it would be expected to work, and it is also nearly impossible to straighten the rudder back out? Is this intentional or am I missing something?

    thanks for the great asset.
     
  30. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    332
    Hi, would it be possible to use this system for wind and air drag simulation?
    Thought about asking after watching this video :D
     
    Last edited: Mar 16, 2020
  31. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Hi, yes I tested with the new Crest 10 package.
     
  32. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    I already developed the wind/air asset for the now abandoned game but it will be released in the future:
     
    Gooren likes this.
  33. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    332
    Thanks for info!

    These are some jolly news, but I need it relatively soon. Would it be possible to have a try with some pre-pre-alpha version? Just to see how it would play with our game specific needs? I would pay even if the final thing is not sure to be released or released far in the future. I just need it :D And can fix/improve some things myself.
    You have no idea how incredibly helpful it would be!

    Cheers!
     
  34. sebdpizarro

    sebdpizarro

    Joined:
    Sep 8, 2019
    Posts:
    1
    What would be the best way to go about controlling the ship with a steering wheel?
     
  35. DeidreReay

    DeidreReay

    Joined:
    Oct 28, 2019
    Posts:
    50
    Has anyone tried or had any luck implementing Swimming of any sort?? Have been trying with Invectors Swimming addon and so far no dice..
     
  36. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    I looked into it but never got around to it. I only did some testing for the future as right now I’m working on a desert scene.
     
  37. Skeketor23

    Skeketor23

    Joined:
    Apr 6, 2019
    Posts:
    49
    Hi everybody,

    I'm using DWP2 and it's working great. For one project I'm using it with Lux Water and in combination it is really awesome.
    But for another project, I need a more lightweight solution to get it running on mobile platforms and even mobile VR.
    Do you have any suggestions for a water (with waves) asset which I could use in such a case?
    Lux Water is overkill for that approach, I was down to 1-3 fps ;).

    Thanks for any help.
     
  38. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    Crest is a very optimized solution for ocean render.
    It's open source so you can get it for free on their github.

    There is also an URP version for the ocean, but not free
     
  39. Skeketor23

    Skeketor23

    Joined:
    Apr 6, 2019
    Posts:
    49
    Crest looks nice, but as far as I can see, it can only simulate a whole ocean. I need it for a swimming pool.
    Or do I miss something?
     
  40. Skeketor23

    Skeketor23

    Joined:
    Apr 6, 2019
    Posts:
    49
    I also tried "Ocean Community Next Gen"....but for some reason, it does not work with DWP2.
    It seems that the position is always too low. I set "DWP_OCEAN_NEXT_GEN" and I see in the debugger, that the corresponding functions for getting the hight values are called. But the positions are wrong? Did I miss anything?

    Update: the position of the objects is not too low, it just does not get the right hight information. If waves come along, it does not react corretly on those.

    Without any waves it looks ok. But the waves are basically ignored.
     
    Last edited: Apr 15, 2020
  41. Skeketor23

    Skeketor23

    Joined:
    Apr 6, 2019
    Posts:
    49
    I tried Crest one more time, and I got the same issue as with Ocean Community Next Gen. The waves are ignored by the floating objects, although the CrestWaterDataProvider is called.
    This time the query always returns all water heights as 0.
    I'm pretty sure I miss something. But cannot find any additional information in the docu.
    The only one I got running so far was LUX-Water.
     
    zeb33 likes this.
  42. Skeketor23

    Skeketor23

    Joined:
    Apr 6, 2019
    Posts:
    49
    I also had this issue. But when I checked it, the query did not require that "SamplingData" object. Instead it is requiering a float.

    collProvider.Query(GetHashCode(), /*here ist just requires a float*/, worldPoints, waterHeights, null, null);


    Nevertheless, so far it did not work for me, and I'm wondering if it is related to this query?
     
  43. reedthegod

    reedthegod

    Joined:
    Apr 20, 2020
    Posts:
    3
    i tried this on DWP 2 and it seemed to not work, could you possibly send me the project file so i could see if it does work with DWP 2?
    thanks
    reed
     
  44. reedthegod

    reedthegod

    Joined:
    Apr 20, 2020
    Posts:
    3
    sorry i forgot my email. its: reedthegod91@gmail.com (stupid name i set when i was younger)
    please send me the finished project
    thanks
    reed
     
  45. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    I will be adding demo scenes in the shape of archives to the asset since there seems to be a lot of problems with setting up the Crest scene.
    I have verified with DWP2 (latest version, @Skeketor23 you are using old version of DWP2) and Crest 10 (very important) and it works.
     
  46. Theunforgiving

    Theunforgiving

    Joined:
    Jun 26, 2018
    Posts:
    2
    Hi NWHCoding, I am having a little issue with DW2 when I try using it with Crest HDRP. I followed the instruction where I set the 'CREST_DW', and then I get this in the console 'SamplingData' could not be found are you using the correct namespace. I checked the file and checked if the using was okay and it is. I could send you a screenshot if you need more information.
     
  47. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Hello,
    first of all it is "DWP_CREST" but since you are getting the sampling data message this is not the issue.
    What is the issue is that you are not using the newest version of Crest (v10). They changed the API a few times over the last few versions and since they do not have any way to track the version from code (i.e. no Crest.VERSION or similar const) I have no way of warning the customers about the wrong version or using one code for one version and different code for older versions.
    So just update Crest and you should be good to go.
     
  48. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    There will be a major update in about a weeks time.
    This update will include:
    • Crest demo scene.
    • Improved WaterObject behavior with more options. Boats now have less of a tendency to go through a wave rather than over it.
    • Moving the editor drawing to NUI (custom editor framework of ours). Already used for NWH Vehicle Physics 2.
    • Moving the documentation to Wiki (dynamicwaterphysics.com). PDF documentation has a lot of issues, namely with having to resubmit the whole asset to add a sentence or two. Documentation is also getting a few improvements.
     
  49. Theunforgiving

    Theunforgiving

    Joined:
    Jun 26, 2018
    Posts:
    2

    Thank you very much for your help I will update and try it out :)
     
  50. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    "Improved WaterObject behavior with more options. Boats now have less of a tendency to go through a wave rather than over it."

    Great news buoyancy engine is still under tweaks!
    Thanks for the update!