14 Jun 2017

Introduction to Personal Programming Project – Water Interaction Model for Boats

I start work on my biggest personal physics project, where I make a physics model for a boat in water.

At FIEA, the programmers work on a Personal Programming Project (PPP) in their third semester, where they get to work on a project of their choosing under the guidance of the faculty. I chose to work on implementing a water interaction model for boats, since game physics has always been an interest of mine and hopefully this project will help get my foot in the door.

This model is designed for use in games and not for simulations, hence, costly fluid mechanics calculations are not the focus of the project. Rather, capturing the major dynamic traits of boats in water by applying hydrostatic forces to the boat (or floating object) is the goal. The ideal is to make the model such that it can accommodate boats of different shapes and sizes in calm or very choppy waters.

I will be following the Gamasutra article ‘Water Interaction Model for boats in video games’ by Jaques Kerner for reference.

The focus of this project is not to create a simulation of water that boats will influence change in, but the forces the boat will experience as a result of the presence of a surface of water. I will be using the OceanCS code sample made by nVidia using DXUT and Jessy Tessendorf’s paper on ‘Simulating Ocean Water’, commonly known as Tessendorf waves.

A few things that I will cover in this dev diary are:

  • Implementing basic 3D physics in a game loop
  • Using the DXUT library for basic 3D rendering
  • Implementing an algorithm from reference to visualize an intersection line on the target
  • Implementation of hydrostatic forces to the submerged objects
  • Additional resistant forces by the water surface to damp the object