A downloadable module

Hydro is a module for Godot 3.1+ which allows rigid bodies to behave realistically in water. For installation and usage instructions, visit https://github.com/godot-extended-libraries/hydro/wiki

Download link leads to Github where you can clone the repo and add it to Godot.  

StatusReleased
CategoryAssets
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
Authorthe_jonri
Tags3D, Godot, Physics

Download

Download
https://github.com/godot-extended-libraries/hydro
External

Comments

Log in with itch.io to leave a comment.

This looks great, can't wait for the 4.+ version, I have some projects down the pipeline that involve this exactly!

Hey, trying to use hydro in Godot 4.1.1.

Did everything I could find out from the documentation but the HydroRigidBody just keeps falling through the water. Seems to have no effect at all.

The API is unfortunately not helpful for debugging.

Since you mentioned on GitHub that you are looking for volunteers for documentation: if you tell me how it works I will write a proper using instruction and make tutorials. Promise.

Many thanks,
Marie

(+1)

Can you share a minimal project that reproduces the problem?  I'd be happy to take a look.

On a side note,  I've started work on moving Hydro over to be a GDExtension for Godot 4.2 - enough GDExtension bugs have been fixed that it's finally possible to do so.  This should make Hydro much more accessible to people, and I'd love to be releasing that version with better-polished documentation and examples.  Any collaboration efforts would be much appreciated!

Hi Jonri,

thanks for the reply.

In the demo project, when I set the rudder of boat 1 to midships, it disappears under water after a while.

I made an own project with a box shaped vessel of 500kg, with abt 0.5m draught and the propeller abt 0.5m below the water line. I experimented with propulsion values (power?) between 2000 and 5000. Direction 0,0,-1. Vessel did not move ahead but started rotating around x-axis instead.

Will see how to export and share later.

Btw: I was serious with volunteering with documentation. Would totally love to do that.

Many thanks,

Marie

Hey, I put my test project here:
https://maydayacademy.itch.io/hydro-project/download/YgLxAKyiP_ke7jF_h_urqG25UDv...

Thank you so much for having a look!

(+1)

Looks like you have some collision shapes that are scaled (which Godot warns against doing) and also your hull mesh is scaled (it's not allowed for the same reasons that Godot doesn't want you to scale collision shapes, but this probably isn't in my documentation).  The end result is that Hydro thinks your boat is a 1x1x1 cube and it spins accordingly.

When I resize the collision shapes and mesh and revert the scale to 1 for everything, it starts acting like a boat.  Once the shapes were working I had to bump up the mass as well.

I do want to make Hydro more ergonomic to use in the next version, so I'll make note of the scaling issue.  If I can't make it deal with scaled objects automatically, in the worst case I could at least trigger the warning icon to show up when a shape is scaled.

(+1)

Thank you a lot. Unfortunately, I got used to ignoring this warning since until now there has never been a problem. Stupid me.

So then I will design the shapes in blender and import them so I can change the size without scaling.

The other issue was that in the demo project, the boat sometimes just disappears under water after changing propulsion value or rudder angle.

And great to hear that you will release it as an addon, that would be so cool. As far as I know hydro is the only way to do realistic boat or ship simulations in Godot without  coding your own hydrodynamic model. We used Dynamic Water Physics before, which is great but unfortunately only available for Unity and Unreal, which is not so great. And we also would like to use open source if available, so we super appreciate your work. We will probably use it a lot in the future to develop interactive learning tools for seafarers and sea rescuers.

Many thanks for your help again,

Marie

Edit: it was Godot 4.2 beta. Sorry for the mistake

Thank you. Seems to work nicely :-)

Just a question... That lead me to the apparently in working progress godot 4 version... Does still support 3.1 to 3.5?

Yes!  Check out the godot3.5.1 tag in Github: https://github.com/godot-extended-libraries/hydro/releases/tag/godot3.5.1

It should work with any 3.x version, but if you do encounter a build issue, feel free to report it on Github and we'll take care of it.

Thank you! Very kind

(1 edit)

Licence MIT or CC0?

The license is MIT.