• Advertisement

Archived

This topic is now archived and is closed to further replies.

Really Real Water.

This topic is 5056 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What''s the best way to represent water? I want to completely model the physics involved, not just simple waves on there surface and stuff, (although it should do that too). I want it to be ‘scoop-able’ and ‘pour-able’. It should maintain a constant volume, those volumes should be ‘split-able’ into smaller volumes and small volumes joined in to larger ones. It should take the shape of its container, unless it’s poured onto a flat surface in which case it should form puddles. It should be able to flow through pipes and over surfaces. I was thinking of using a particle system, in which each particle represents a discreet volume of water, like a droplet. The partials could be attracted by cohesion when very close to each other. If each particle had a list of adjacent particles it could work. What do you think? Do you have any ideas how to implement the particle system? Is there another way other than particles?

Share this post


Link to post
Share on other sites
Advertisement
I think that I''m leaning towards the particle system. Physics including surface tension / cohesion / pressure / gravity could easily (relatively, of course) be represented by "particles." I don''t know how much I would consider them particles as I would consider them control points for the water.. heh

Share this post


Link to post
Share on other sites
Do a search on "metaballs". Combined with a physics model it could be used for small scale water simulations. It''s been a long while since I''ve looked into them, but I do remember seeing a demo about 2 years ago featuring water droplets on a glass slide which worked pretty good.

Share this post


Link to post
Share on other sites
quote:
Original post by Cibressus
a pressure model would probably be the best way.

Tell me more.

Share this post


Link to post
Share on other sites
The best method for doing this is called Smooth Particle Hydrodynamics (SPH). This has been the leading method in many fields for modelling fluids and fluid-like systems. However, be warned... while the results are very good, the amount of effort required to implement it is considerable. Consider it a very advanced project. For example, studying surface tension using SPH was a whole PhD for a friend of mine!

Cheers,

Timkin

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You might find this interesting:

http://www.flipcode.com/cgi-bin/msg.cgi?showThread=04-01-2004&forum=iotd&id=-1

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
You might find this interesting:

http://www.flipcode.com/cgi-bin/msg.cgi?showThread=04-01-2004&forum=iotd&id=-1

That not really water, more like an amorphous solid.

Share this post


Link to post
Share on other sites
To Grain: Are you kidding? If such a system could be developed so easily, some game would use it already. I think it is impossible to implement such a thing to a real-time game because it would be so slow... But anyway, if you feel like interested:

http://panoramix.ift.uni.wroc.pl/~maq/eng

Here you can find some interesting demos, but I didn''t find any sources (but author says they can be found on his CD). I didn''t find it usable for a real-time game neither. But it is interesting.

But this whole problem is interesting. Rigid body dynamics is already used a lot, now liquid dynamics comes at stage. I''m really looking forward to some real gas diffusion...

A man can dream though... a man can dream...

Share this post


Link to post
Share on other sites
Particle systems are going to give you a very accurate representation of water, but it won't apply very well to games. If you want to represent a large volume of water (enough to fill a small pool), you're going to need alot of particles, which will require alot of CPU power. I believe it applies best to physics simulations however.

Particles are fairly easy to represent. They are just non-deformable spheres that obey a set of simple laws. They are attracted by gravity, they are attracted to near neighbour particles. Of course you can also complicate things a bit if you want the particles to behave like real water does, and evaporate with higher temperatures or lower pressures, etc.



Looking for a serious game project?
www.xgameproject.com

[edited by - Max_Payne on April 17, 2004 4:25:13 PM]

Share this post


Link to post
Share on other sites
Couldn''t you solve some performance problems by only treating the first couple of layers of particles as real (In, say, a deep pool of water) unless some was scooped out or otherwise moved? Write it so it know''s how deep the pools supposed to be, and if you get past the actual particles, introduce some more in the fake area...

Share this post


Link to post
Share on other sites
quote:
Original post by grhodes_at_work
Really real? Why not take a look at Ron Fedkiw's work?

http://graphics.stanford.edu/~fedkiw/

Graham Rhodes
Principal Scientist
Applied Research Associates, Inc.



That’s the exact kind of effects I am looking for. Although I don’t see any code or explanation how it was done.

[edited by - Grain on April 18, 2004 2:40:31 AM]

Share this post


Link to post
Share on other sites
one of the best tutorials ive found on modelling real-time water is at www.naturewizard.com, it tells you how to physically represent water waves but it doesnt say anything about adding droplets or pouring water though. there's also a demo that comes with the DirectX 9 SDK that shows a couple of different ways to model droplets on water and stuff like that.

~aussie

[edited by - James Sioutis on April 18, 2004 3:11:46 AM]

Share this post


Link to post
Share on other sites
Grain: There is some publications on Ron Fedkiw''s site including fluid simulation.

Share this post


Link to post
Share on other sites
I''ll also point to Jeff Lander''s talk on "Taming a Wild River" from GDC a couple of years ago. Very cool demo of water that would roll down a hill, pool in low areas, etc. I believe Lionhead is using a similar approach for their fluid physics in Black and White 2 (based on a demo at GDC this year).

Darwin 3D GDC Page

Graham Rhodes
Principal Scientist
Applied Research Associates, Inc.

Share this post


Link to post
Share on other sites

  • Advertisement