Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Water suggestion/question

  1. #1
    Intern Contributor
    Join Date
    Mar 2000
    Posts
    94

    Water suggestion/question

    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.

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

  2. #2
    Junior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Brisbane,QLD, Australia
    Posts
    101

    Re: Water suggestion/question

    Clamp your textures to each square
    then when you move/animate your vertex points your texture coords will not need to be modified.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Lubbock, TX, USA
    Posts
    197

    Re: Water suggestion/question

    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.

  4. #4
    Intern Contributor
    Join Date
    Mar 2000
    Posts
    94

    Re: Water suggestion/question

    Thanks for the suggestions...I'll try them out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •