• Create Account

## Water

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

6 replies to this topic

### #1Ahvolon  Members

122
Like
Likes
Like

Posted 08 July 2001 - 03:14 AM

Hi, I want to create water with waves and reflections. How can i do this?

### #2masterg  Members

100
Like
Likes
Like

Posted 08 July 2001 - 03:27 AM

Well, what do you think you''d do to create water? You can first think of water a quad, then textured/multitextured with some textures that have moving texture coordinates to make a flowing effect. Then you can think of the water as a large grid that has points that can move up and down creating waves. Go to nehe.gamedev.net and read the flag tutorial there, or look at loderunners ( i think it''s his) water demo thingy and try to do that.

### #3Seaman  Members

122
Like
Likes
Like

Posted 09 July 2001 - 09:47 AM

Gamasutra, 2 part article on waves and refraction, intersting read.

### #4mittens  Members

1323
Like
Likes
Like

Posted 09 July 2001 - 02:41 PM

Ok, check out NeHe''s waving flag tutorial... Water is *A LOT* like that, except that you need some different mathematical formulas to make it look right. Can''t help you much on the refraction end though... But, I think I''ll do some research on it, and write a tut sooner or later (later most likely).

------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials

### #5Blackstream  Members

122
Like
Likes
Like

Posted 09 July 2001 - 02:52 PM

Nehe also has reflection tuts (using the stencil buffer if I remember right). I''m not advanced enough to understand it yet, but I have a feeling that the answer that you are looking for is a combination of the flag tutorial and the reflection tutorial.

### #6Galileo430  Members

122
Like
Likes
Like

Posted 10 July 2001 - 01:41 PM

Reflection is nothing more then Negitive Scaleing about a plane.
(when the plane is infinate)

### #7Obelix  Members

122
Like
Likes
Like

Posted 10 July 2001 - 04:13 PM

You can create planar reflections like that and use the stencil buffer to limit the output to the water. If you have "big" waves will it not look right. Instead can spheremaps (perhaps also dynamic) be used.

The "amplitude" of the reflection is depending on the viewing angle. If you are looking right down at the water should the reflection almost be invisible. This can be achived by setting the alpha values for a spheremap. I think it is called the fresnel part.

Another interesting idea is to combine alpha maps and planar reflections. I have never seen a demo but here is an descripton http://reality.sgi.com/opengl/tips/puddles/

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.