boat in water

Started by
0 comments, last by greeneggs 21 years, 11 months ago
I have an ocean wave height field, generated using FFT. I would like to add into it a local height field, generated by traditional finite differences, for a boat moving through the water. (Just keeping track of this local height field as the boat moves is a little tricky -- I think to avoid memory copying I should use a wrapping tile, with waves damped according to their distance from the boat''s center in the tile.) I don''t have much experience with physics models and don''t think I''ll be able to get a big engine up and running. I''m finding the physics tutorials out there pretty intimidating, and just don''t know how to get started. Here''s what Jensen and Golias have to say ( http://www.gamasutra.com/gdce/jensen/jensen_02.htm )

To approximate the displaced volume, we represent the object by a series of patches described by the coordinates of their centre, their area (a) and their normal (N). Then for a given patch (if it’s centre lies in the water), the volume of displaced water can be written as:

  V = a(Pwater - Ppatch_center)N

where Pwater is the point on the water surface and Ppatch_center is the position of the centre of the patch. Now, for simplification, we can assume that this force has always direction of the water surface’s normal at the given sampling point. Thus the force applied to the centre of our patch is:

  F= r v N_water

where r is the water density. We apply this force to the given point using the standard equation for rigid object physics, as described for example in [13]. There are also two other forces that we should try to simulate. First, floating objects don’t slide freely on the water because of drag. We approximate it for each patch using equation: 

  F_drag= ß a V 

where ß is constant and V is velocity of the patch centre relative to the water. Also, when object with proper shape moves on the water, it rises out from the water, depending of it’s shape, orientation and velocity (this effect is best seen on boats). 

We use the following equation to approximate this effect:

  F = -j a (N.V) N

where j is another constant. Note that we use bilinear interpolation of values defined in the grid, to obtain all quantities connected to the water surface, at arbitrary points on the surface. 

While this covers the way water affects floating objects, there should also be feedback going in the opposite way. ... First, for all grid elements touched by any object, we temporally increase the damping factor in the wave model used for object interaction (this creates a wave “shadow” – i.e. place in which waves don’t spread). Secondly, we compute the change in depth of the floating object between the last and current frame, and feed this difference back to the water surface as direct displacement of the surface.
 
I have a model of a boat. Starting small, how can I begin to apply this technique? (J-G don''t mention it, but I''d also like the boat to throw up a spray as it hits waves.)
Advertisement
Personally the scheme you have quoted sounds like a rather difficult way to simulate a floating object. I believe you''d get better results if you simulated the pressure field for the water and used this to compute buoyancy forces, drag and aerodynamic lift effects on the hull.

Cheers,

Timkin

This topic is closed to new replies.

Advertisement