water in open GL
Howdie y''all,
There is a really cool fountain by where i live and i wanted to turn it into an open GL project as a learning expierence. I''m not a total newbie (i have both the Open GL super bible and red book and have read through a lot of both of them... plus i''ve programmed a while) but i have never done really cool looking water before. I know it can be done with open GL because i''ve seen it. I assume that there is just some sort of vertex data that holds data if there are big waves, or a moving texture or something... Can anyone who has done this before explain the basics? or does anyone know a website (even for D3D) with a good tutorial. I think the fountain would be a great project because it has really cool lighting, and i can do a particle engine for the water spraying upwards, plus the water... Plus i am going to use it as a present for a friend who i go there a lot with. Any help is greatly appreciated... Thanks!
PS This forum is by far the best for Open GL that i''ve found on the net
Dr. Jones
OK, there are 2 main ways to do this. One is particles, and one is sheets. (or you could do both).
Here are some ideas:
Water being thrown up like a fountin, would probably be done best with a particle engine.
Water falling like a waterfall would probably be done best using polys from the top to the bottom, with scrolling textures. If you wanted be really fancy, you could layer sheets, and use a faster scroll speed on one, or prehaps an environment map.
For general splashes at the bottom, a particle system would work. If you wanted water vapour at the bottom (kind of like a big waterfall) have a few large particles moving and rotating about, and have a very light white texture that is uneven (can anyone explain that beter?
)
For the actual water, you might want to look at unreal and how you can make a texture wavey, so it moves back and forth. If you want the effect that looks like the actual texture is changing. You could write somthing like Unreal''s Fire Engine (pain in the ass), or you could move the location of actual texture co-ords (you would need a nicly tiled water surface). Or you could just modulate a tiled surface and make the water go up and down, and such. This looks really good with an environment map.
ANDREW RUSSELL STUDIOS
Here are some ideas:
Water being thrown up like a fountin, would probably be done best with a particle engine.
Water falling like a waterfall would probably be done best using polys from the top to the bottom, with scrolling textures. If you wanted be really fancy, you could layer sheets, and use a faster scroll speed on one, or prehaps an environment map.
For general splashes at the bottom, a particle system would work. If you wanted water vapour at the bottom (kind of like a big waterfall) have a few large particles moving and rotating about, and have a very light white texture that is uneven (can anyone explain that beter?

For the actual water, you might want to look at unreal and how you can make a texture wavey, so it moves back and forth. If you want the effect that looks like the actual texture is changing. You could write somthing like Unreal''s Fire Engine (pain in the ass), or you could move the location of actual texture co-ords (you would need a nicly tiled water surface). Or you could just modulate a tiled surface and make the water go up and down, and such. This looks really good with an environment map.
ANDREW RUSSELL STUDIOS
Well, you can do water very similar to the way you, maybe, have done in the waving flag example on NeHe''s site. A lot of quads, and you can do some special math to make the water look right.
------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials
------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement