Was toying around with vertex-color driven animation in UDK, came up with this.
I made a script to give some random vertex colors to specific verts of a grid-like mesh. I wanted to use the data to drive animation, random z-offset, and masks for color gradients.
I then started toying around with some sine waves, and ways to get some natural looking movement to the ocean itself.
Since it’s implementation, i broke up the constant repetition of the horizontal waves with a vertical wave that gives the white caps a more interesting feel.
Speaking of white caps, i am simply using a world-space height based mask to compute when the color should turn white. If the pixel is higher than, say… 48 units in world space, it will turn white.