Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Alexander Stockinger, posted on December 31, 2000

Image Description, by Alexander Stockinger

This is a shot of a demo I am currently working on which demonstrates the capabilities of the water effect seen out there in the democoding scene quite frequently.

I myself am really astonished what this little 2D effect can do once you put it in 3D and add some little collision code to interact with a particle system.

The part I am working on right now is the physics for the grass since I'd like to see it waving in the wind. Would be very neat. But up to now it's still very unstable and I am happy if it's not freaking out just by gravity...

Some more features:
  • Fully featured particle system
  • Collision detection with effect on texture
  • skeletal animation system to for the grass
  • There's also a demo available for download at but there are still loads of compatibility issues and the demo is by no means finished. Actually it's just starting to work...

    Have fun and happy coding,

    Image of the Day Gallery


    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

    December 31, 2000, 03:20 PM

    I've seen this effect a lot, but that doesn't make it any less cool. What are those purple dots? Water droplets? Any plans to incororate this into a game?

    Hey, I've gotten first post three days in a row, where is everbody?


    December 31, 2000, 03:24 PM

    Looks very cool...

    Vorteks: I posting about 10 minutes ago and flipcode gave me a "thread id already in use" bug. I guess some people might be having the same problem.


    December 31, 2000, 03:41 PM

    Looks nice, runs well on a Radeon.


    December 31, 2000, 04:02 PM

    Very cool indeed!

    I like the invisble man who is relieving himself in the water. The only thing I can say is that the waves generated are somewhat square. Anyways, I get 45fps at 1280x1024; 50 if I don't run Seti@home in the background, which is very interesting.

    Ok, cheers

    - Betelgeuse


    December 31, 2000, 04:21 PM

    Looks nice, how about some AI fish swimming about under the surface? ;)



    December 31, 2000, 10:53 PM

    Hmmm, I've done a fair bit of playing around with this demo effect, I wanted to use it in a game a short while ago.. (realtime wakes). Problem is, is that the effect isn't really suited for simulating waveforms any "higher" than about the width between grid points.. else it all just turns into a spikey mess. Anyways Cool IOTD, cyas.

    Alexander Stockinger

    January 01, 2001, 06:03 AM

    Thanks for the replies...

    Number27: You're right. It's just the waves. Nothing more...

    Myrmecophagavir: Already thought about that. Will be there in the next version, promised...

    Betelgeuse: Kids have seen this demo so I couldn't really make the man visible. But it's really high quality! Skeletal animation, cloth simulation, all you please. But unfortunately I can't show all that since kids will see all that.. ;)
    The problem with the somewhat square shapes waves is known. It's a result of the effect. It's no real wave simulation. There's a way to fix it but it costs some performance (since it means taking more pixels into account when doing the blur)...

    Vorteks: In lack of enthusiasm for coding some function to draw sprites for the water drops I sticked to funny colored cubes for the moment and concentrated on getting the basics working.

    see ya,

    Lourens Veen

    January 01, 2001, 06:13 AM

    How about creating some waves where the grass crosses the water surface as well? That would make it more realistic I think.

    Alexander Stockinger

    January 01, 2001, 08:41 AM

    That's what I've planned, but I probably won't implement that until the physics for the grass works properly. If someone knows where to get information about simulating grass-physics (maybe springs or sth), don't hesitate to let me know...



    January 01, 2001, 01:11 PM

    Any chance of you releasing the source? I'd like to see how you did the water effect. Or perhaps links to other sites with a similar effect.


    January 01, 2001, 01:45 PM

    You should significantly change or remove your grass. Also, what are those pink spheres ? These needs to be improved.
    Waves effect is cool.


    January 01, 2001, 02:34 PM

    Nice image. You can make something interactive there, have particles enter the water.

    I am still being surronuded by blumbering fools.


    Alexander Stockinger

    January 01, 2001, 02:38 PM

    Slyce: Without proper explanation you can't really do anything with the code except getting it running. And it's actally broken up into two seperate parts since distirtion effects can be used for way more than water...
    But there's a fairly good tutorial over at It includes both, the blur and the refractional part and features some demo exe with some really good source (in Delphi / some ASM).

    here you have the link:
    The Water Effect explained

    Like already mentioned, this is the very first alpha version and it features nothing more than the basics. The red spheres are colored (way more than red) cubes that'll be replaced by sprites in the next version and the grass is only represented by it's bones at the moment. They'll be replaced by some textured polygon mesh, soon.

    Although this sounds a bit paradox, that'll probably improve the speed of the app since I am rendering 24 polygons per water drop at the moment and the textured sprite will reduce that to 2...

    So far,


    January 01, 2001, 03:01 PM

    For what it's worth, it looks great on my TNT2 Ultra, celeron 466, 128 mb of ram. It gets roughly 35 fps which is to me acceptable, I'd much rather see a game with these kinds of effects going on around me at 35fps than have the smoothest experience you can imagine but with an ugly digital photo of a puddle ;) Nice work!


    This thread contains 14 messages.
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.