The past few weeks I've been experimenting different ways to get the little quad of water mesh I had into an ocean. My initial approach was to implement some sort of geometry as described in this paper, but I ran into a good number of problems. First off, after constructing the near patch, it wasn't too easy to integrate it into CS with a moving camera. I had to index the texture and wave generation coordinates in world space from the shaders, and that sometimes had bad effects. Also, the far patch gave me a number of problems, most of which was that it was almost impossible to find the correct transform to paste it in front of the camera. I'm not too sure how the conics in the paper mentioned above would have proved useful.
So, I decided on a new approach. A better approach. I got my idea from this paper, which employed the use of different ocean "cells," each with their own geometry. This way I was able to do some LOD calculation at the same time as I was generating the ocean waves. Since the wave generation is still based on world-space coordinates, it was easy to tile the cells and maintain a seamless ocean surface. Currently the only problem with this approach is that the texture coordinates are not accurately being set so there is noticeable "popping" when you move the camera up away from the ocean because you can see the different texture coordinates changing. I hope to get that fixed over the weekend.
|<< <||Current||> >>|