To determine the visibility of another fish, we take advantage of the mass-spring-damper structure of the fish model. To first determine if fish j is within fish i's view volume, we simply test if the center of j's body (we use the origin of the fish local coordinate system as the center point) falls within the view volume of i (Note that, the view volume of fish i is instead of ). If it is, we proceed as follows: Fish j is visible to fish i if and only if any one of the mass points of j is visible to i (i.e. not occluded by any other objects). In Fig. , the fish represented by the mass-spring-damper model is visible. It should be pointed out that, although in the worst case this visibility check can be expensive (each fish has 23 nodes), on average it is much better since the algorithm will reach a conclusion as soon as it finds a single visible node. In the case of a more complicated virtual environment, we can use bounding box techniques to speed up the occlusion test.
|Xiaoyuan Tu||January 1996|