boat wave ripple effect

Blitz3D Forums/Blitz3D Programming/boat wave ripple effect

Sung(Posted 2009) [#1]
Hello all
How to make a good looking boat wave ripple effect? I`m trying around but no idea.
Can anyone help me.

f.e.



Kryzon(Posted 2009) [#2]
Hello Sung,

Here is one way to do it: You can start off by making these quads paralel to the water plane.

The logic is...

Every Time the boat moves and a certain time has passed...

-> Create new quad just on it's rear, at water level. The quad must have a certain starting size that you'll define through tweaking. Perhaps it would look better to spin the newest quad to the same orientation of the boat, at creation time, so as to ensure that the chain doesn't look too artifical.


Every loop cycle (or every 2~3 cycles, which could be a bit better)...

-> Increase each quad's size and decrease their opacity, based on the same speed for both properties. This will simulate simple ripple physics: they grow (and consequently become fainter) with time.
-> IF the quad's opacity reaches 0 or below that, then delete it (or make this polygon as "inactive", if you are using a single-surface system).



Now, onto these quads. They need to be single-surfaced to ensure optimal performance, and they should be textured with something like this:



So in the end, all these quads would overlap a bit eachother, resulting in your chain.

To embelish your ripple system, you could add the trails (the more linear ripples - these could be inside the ripple texture, or a second single-surface system), and of course, the foam (little smoke particles that go through the middle of the boat all the way to the rear, a bit above water level - check your picture).

Another way to do it (more complex) could be with a single mesh where the quads are connected by the vertices. That should look better, more smooth, but the ripple texture needs some good work to look tileable. Also, the code would be a bit harder to calculate each polygons UV coordinates. You use Vertex Alpha to progressively dissipate the end of the trail, so it travels together with the boat.

For this system, you might wanna take a look at this article: Mesh Trails in B3D (pictures seem broken).

Also, there is no better reference than reality when you are trying to adapt a special effect.