PDA

View Full Version : Water suggestion/question



Ace_Man
11-20-2000, 09:59 PM
I notice that in a lot of games water is simulated with moving (square) textures. They use transparency with a water texture. I can handle the transparency and the texture, but I'm not sure of a way to simulate the movement and not have the square texture protrude from what it's moving in.

For instance, if the following is a birds eyes view of square swimming pool how can I animate my textures moving whithin the boundaries of the pool? Thanks so much.

|-----|
| |
| |
|-----|

dans
11-20-2000, 11:35 PM
Clamp your textures to each square
then when you move/animate your vertex points your texture coords will not need to be modified.

Dodger
11-21-2000, 08:01 AM
I'd suggest moving the vertices up and down, for example on several overlapping sine waves and additionally moving the texture coordinates in some way that has the same period as the water waves.
Might also look good to have 2 different textures on the water surface, alpha blended and moving in different directions. That would give it a more heterogenous look and get rid of visible tiling.

Ace_Man
11-21-2000, 10:57 AM
Thanks for the suggestions...I'll try them out