Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Assets Dynamic Water Physics - Realistic. Fast. Universal.

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

?

Which water asset do you use with DWP?

  1. Crest

    52 vote(s)
    49.1%
  2. AQUAS

    11 vote(s)
    10.4%
  3. RAM

    12 vote(s)
    11.3%
  4. Ocean Community Next Gen

    4 vote(s)
    3.8%
  5. Ceto

    4 vote(s)
    3.8%
  6. SUIMONO

    5 vote(s)
    4.7%
  7. Ultimate Water System

    4 vote(s)
    3.8%
  8. Other Flat Water Asset

    3 vote(s)
    2.8%
  9. Other Water Asset With Waves

    11 vote(s)
    10.4%
  1. reedthegod

    reedthegod

    Joined:
    Apr 20, 2020
    Posts:
    3
    YAY! FINALLY WAVES THE ONE THING I BOUGHT THIS FOR!
     
  2. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,050
    I'd like to see a demo of that.
     
  3. stocks109

    stocks109

    Joined:
    Jul 18, 2013
    Posts:
    2
    Hi, what ocean / wave system do you recommend for this plugin that can support both mobile, console, and PC-based VR platforms?
     
  4. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
  5. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    If you are using Dynamic Water Physics 2 I would recommend Crest for sure. It is open source and getting more and more polished with each update - and they come almost on daily basis.
     
  6. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
  7. unity_HbZilIZAWyFuAg

    unity_HbZilIZAWyFuAg

    Joined:
    Feb 5, 2020
    Posts:
    8
    I am trying to modeling a ship but when I run the program the ship tilts on the left side.
    I have done an other ship before and I didn't have any problem.
    Can you help me with this?
    Thank you
     
  8. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    This one is easy to fix. Your center of mass is too high and therefore it tips over.
    Just attach center of mass script that is included and lower the value on the Y axis.
    If you already did that and it still tips over, make sure that the rotation of your model is correct (X-right, Y-up, Z-forward).
     
  9. unity_HbZilIZAWyFuAg

    unity_HbZilIZAWyFuAg

    Joined:
    Feb 5, 2020
    Posts:
    8
    Thank you for the tips.
    I am trying but in order to stay straight I have to lower the CoM with a quite a high value such as 9 and the draft of the ship is 6.
    The axis are correct now (they weren't before).
    I solved the problem using the hull of the first ship scaling it. The only remained issue is that the ship is rolling too much when I have rough sea. Can you explain what are the following parameters:
    -Skin Friction Drag
    -Dynamic Force Power
    -Velocity Dot Power
    thank you
     
  10. unity_HbZilIZAWyFuAg

    unity_HbZilIZAWyFuAg

    Joined:
    Feb 5, 2020
    Posts:
    8
    I read what the parameters are on the code.
    But I am still not able to have a good behavior in rough sea with the second ship: it jumps and turn a lot in all axis.
     
  11. unity_HbZilIZAWyFuAg

    unity_HbZilIZAWyFuAg

    Joined:
    Feb 5, 2020
    Posts:
    8
    I am using DWP2 with Crest.
    I am trying to modelling some big ships ,such as a Container Carrier with 325m of length. No matter what parameters I change, it seems to me that it is always rolling too much
     
  12. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    Hello,
    please try inreasing the angular drag on the Rigidbody a bit.
    Normally large ships have some kind of roll stabilization but this has not been implemented in DWP2.
    Check this video:

    Or this Wiki article: https://en.wikipedia.org/wiki/Stabilizer_(ship)
    Increasing angular drag will help to some extent but a small script that applies counter torque to the ship would be better. I.e. when the ship is tilted left add torque in clockwise direction and vice versa.
    I have added this as a TODO.
     
  13. Zeevex

    Zeevex

    Joined:
    Jan 15, 2018
    Posts:
    28
    Hey! i'm looking at creating a river simulation, objects flowing down stream.. specifically a raft
    the asset R.A.M. seems to cover the shader part of this, does your asset have support for R.A.M.?
    and if so, how well does it handle drops/slopes in the river

    Kind regards!
     
  14. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    I have contected R.A.M. publisher about two weeks ago and nothing. But since it is quite requested I will see what I can do. DWP2 supports both waves and water flow. I am preparing to do a larger update in the future.
     
  15. obstudio

    obstudio

    Joined:
    Sep 30, 2016
    Posts:
    58
    try on discord
     
  16. unity_HbZilIZAWyFuAg

    unity_HbZilIZAWyFuAg

    Joined:
    Feb 5, 2020
    Posts:
    8
    I am modeling a container carrier.
    I am simulating a propeller that has always the same force and the ship is always reaching the same maximum speed, such as 17 knots.
    If my ship collides with something it happens that ,using the same force, the ship reaches a much bigger speed, such as 20 knots.

    I am applying the forces to the rigid body of Ship_local_pivot, the waterobject script is in "hull" gameobject and the collider is in "CollisionDetect" gameobject


    Can you understand why this is happening?
     
  17. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    Could it be that the collision pushes the ship slightly out of the water? This would reduce the drag on the hull and allow the ship to go faster.
     
  18. unity_HbZilIZAWyFuAg

    unity_HbZilIZAWyFuAg

    Joined:
    Feb 5, 2020
    Posts:
    8
    After further tests I understood that this is happening always in a certain zone of a terrain. So it is not due to a collision.
    Is there a way to know the value of the drag in each point?
     
  19. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    That is interesting. What water are you using? A flat plane, Crest or something else?
     
  20. unity_HbZilIZAWyFuAg

    unity_HbZilIZAWyFuAg

    Joined:
    Feb 5, 2020
    Posts:
    8
    We are using Crest
     
  21. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    In that case - Crest uses LODs. I.e. the waves get finer and finer the closer you are to the origin. Could it be that if you are not using floating origin that the ship speeds up over LOD0 where the waves should be the highest resolution.
     
  22. ash4640

    ash4640

    Joined:
    Jan 19, 2018
    Posts:
    59
    I'm just wondering if I can delete the Demo Content folder after import DWP2, it is around 200mb; also is there a tutorial for integrating with Crest
     
  23. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    Hello. v2.2 will be getting rid of Demo Content folder and everything will be in a single directory so while you could in 2.1, the answer is no for 2.2. Besides, except for using space on your drive these files will not increase the size of your build.
    As for Crest tutorial: http://dynamicwaterphysics.com/doku.php/WaterAssets
    v2.2 will have some major improvements for Crest integration and make integrating 3rd party assets much easier tho. Check the posts above for the changes. The update is expected in a few days.
     
    Last edited: Jul 12, 2020
    ash4640 likes this.
  24. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    I am currently rewriting most of the docs for DWP2 2.2 as these have been updated so many times that I feel they lost some of the usefulness and do not cover all the bases.
    Also, in 2.2 a new type of WaterDataProvider will be introduced: RaycastWaterDataProvider. RaycastWaterDataProvider can be used with any object that has a Collider attached to it. This should be useful for R.A.M. style assets or scenes that have rivers/streams/waterfalls implemented as a mesh with a scrolling texture.
     
    dsilverthorn and 3dship like this.
  25. unity_HbZilIZAWyFuAg

    unity_HbZilIZAWyFuAg

    Joined:
    Feb 5, 2020
    Posts:
    8
    I have a gameobject that represent the ship, it has a rigidbody with the mass of the ship.
    This gameobject has several children:
    -one gameobject that represent the "hull" of the ship and that contains WaterObjects script;
    -some of the other children have colliders that I use for several purposes.
    If one of these colliders is not symmetric respect the center of the ship and the "hull" collider the ship is going to stay bent on a side .
    Can you explain what is happening here?
    Thank you
     
  26. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    If I understood correctly the colliders for the object are not fully symmetric and therefore the ship tilts to the side?
    This happens because unity calculates center of mass as a center of all colliders, as if they all have uniform mass.
    To fix this add CenterOfMass script to your ship (to the object containing the Rigidbody) and adjust the X value in play mode until the ship is level. Then exit the play mode and use that value for center of mass.
     
  27. NyeinZL

    NyeinZL

    Joined:
    Mar 17, 2019
    Posts:
    9
    Hello!
    Could you please upload video tutorials for RAM and Crest.
    I followed the pdf manual and the boats and objects were not float.
    I am stuck.
    The demo scene of DWP2 works very well.
     
  28. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    Hello,
    the highest supported version of Crest in DWP1 is Crest 6. Later versions have different API.
    RAM is not supported and never was in DWP1.
    DWP1 and 2 are very different assets with not much in common (ship controller is similar but the WaterObject code is completely new).
     
  29. NyeinZL

    NyeinZL

    Joined:
    Mar 17, 2019
    Posts:
    9
    I am using DWP2
     
  30. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    Ah, OK then. Please also check: http://dynamicwaterphysics.com/doku.php/WaterAssets
    just in case the offline docs are outdated (should not be).

    Which one are you using, Crest or RAM? I am asking because they have quite different setups.
    Also, could you say which steps have you made? Does it float as if using flat water (i.e. does not register waves) or falls just straight through?
    And finally, do you get any warnings or errors?
     
  31. NyeinZL

    NyeinZL

    Joined:
    Mar 17, 2019
    Posts:
    9
    upload_2020-8-29_22-3-6.png 1.

    I tried both Crest and RAM.
    The above is screenshot from RAM.
    The followings are what I did.
    1. I opened the demo scene of DWP2.
    2. I disabled Water from Environment.
    3. I added RAM Lake Polygon. Tag Water and Layer to Water (layer 4)
    4. I changed RAMwaterprovider.cs.txt to RAMwaterprovider.cs.
    5. I created Empty Object and assigned RAMwaterprovider.cs.

    Play and all the objects were not float.
     
  32. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,135
    Could you PM me your project and I will take a look at it. Just remove the Library folder to reduce size. This will probably be the fastest way for me to debug it.
     
unityunity