Forgot Password

Hydro v0.2

Saturday, March 09, 2019

Hydro v0.2 is officially released!

They say the last 10% of a project takes 90% of the time, and this is no exception. There are a handful of new features which should make this quite usable now, but they're not the kind of thing that will make a big splash (pun intended). I've split the functionality into several nodes, which should add a lot of versatility and make this quite usable in a variety of situations. Here are the nodes I've added:

WaterArea

This allows you to define a limited area in which the hydrodynamic calculations take place. Without this, you've only got an infinite ocean, and the module is always checking for potential submersion in the water. Now, you can add a WaterArea to a valley in your terrain, and your HydroRigidBody will be a standard RigidBody on land, and only have the extra functionality when it hits the WaterArea.

You've also got the ability to set the density of each WaterArea independently. Freshwater and saltwater have different densities, and you could also use this for pools of lava, maple syrup, etc.

WatercraftBallast

By default, the mass of a HydroRigidBody is centered at the origin of the object. Adding additional weight at various points can improve realism in some cases. The WatercraftBallast node allows you to position a point mass at a specific location. This can be useful for cases such as:

  • Creating a keel on a sailboat
  • Simulating cargo on a ship
  • Shifting the weight of a rider


WatercraftPropulsion

This can be used to add prop or jet drives, bow thrusters, or more to your watercraft. The propulsion system will only provide thrust when its origin is underwater. You can add as many as you need to your watercraft and control them independently.

WatercraftRudder

This will dynamically generate a steerable rudder and attach it to your hull. As with the rest of the hull, only the submerged portion of the rudder will function.


There is also documentation for each of these nodes within Godot itself, along with the wiki.

I'm expecting to release one more version before this is feature-complete. Here's what is coming up:

  • Create editor gizmos.
  • Improve the method for debugging the forces.
  • Allow the actual shape of a WaterArea to automatically define the water height.
  • Add the ability to have a simple water flow such as a river affect HydroRigidBody objects.
  • Create a simplified mathematical model that allows you to optionally trade accuracy for speed. This would accommodate use-cases where you have hundreds of objects, or offer a fallback for less powerful mobile devices.


Finally, here's a video of the new WaterArea nodes in action, each block of water has a different density:






Be the first to comment.