PDA

View Full Version : poring liquid effect



westsiiiiide00
02-22-2002, 04:53 AM
Hi guys,
How can I pour water from let's say a teapot to a cup?
Thanks
Later
Dan

Eric
02-22-2002, 05:22 AM
Simply put the cup below the teapot and slightly rotate your wrist so that gravity pushes the water down the hole...

No problem.

Eric

richardve
02-22-2002, 05:26 AM
http://www.opengl.org/discussion_boards/ubb/biggrin.gif

westsiiiiide00
02-22-2002, 05:39 AM
I tried that....
It doesn't seem to work!

Originally posted by Eric:
Simply put the cup below the teapot and slightly rotate your wrist so that gravity pushes the water down the hole...

No problem.

Eric

Tom Nuydens
02-22-2002, 05:45 AM
Did you remember to call glEnable(GL_REALTIME_FLUID_DYNAMICS) ?

-- Tom

Eric
02-22-2002, 05:53 AM
Originally posted by westsiiiiide00:
I tried that....
It doesn't seem to work!


Check your init code. It sounds like your states are incorrect, e.g. the cap is still on or something.

Regards.

Eric

rIO
02-22-2002, 05:55 AM
Apart the simple method that involves rendering a teapot using GLUT and rotating it with difficult matricial calculus...

A good solution could be to use isosurface and marching alghos (metaballs like).
Or particles, I think it's not that easy to implement realtime.

rIO.sK http://www.spinningkids.org/rio

Devulon
02-22-2002, 06:54 AM
Metaballs would definately work. And it should look cool as long as you do some nifty rendering. THere really isn't a straight forward right or wrong way to making water (especially water that can flow/change shape). Its all about making it look good and run fast.

harryx
02-22-2002, 08:04 AM
The problem with metaballs is that they make liquids look too gloopy, Ive never seen this effect done convincingly with metaballs.

AFAIK, using oriented particles whose shape deforms relative to their velocity is the neatest way to do this. Although any method that gets rid of the gloopy spheres look would be nice.

Zeno
02-22-2002, 08:33 AM
Make a large 3D grid on which to solve Poisson's equation. Place the teapot at the top as a source and the cup at the bottom as a sink.

You may have to optimize a _bit_ when you're done to get it to run real-time.

-- Zeno

DFrey
02-22-2002, 09:45 AM
To simulate or rather fake the column of pouring liquid, I wonder if simply jittering a tube mesh with 4D coherent noise composed of relativly low frequencies would suffice.

knackered
02-23-2002, 03:36 AM
"The problem with metaballs is that they make liquids look too gloopy, Ive never seen this effect done convincingly with metaballs"

Yes, like the beginning of Shrek - where shrek is pouring mud over himself, it just doesn't look like mud, it looks like some gloopy stuff - mud is more a fluid like water than gloopy, lumpy stuff.

davepermen
02-23-2002, 04:05 AM
but the beer in the fight against the nights of lord farquart is great http://www.opengl.org/discussion_boards/ubb/wink.gif

knackered
02-23-2002, 04:18 AM
Agreed http://www.opengl.org/discussion_boards/ubb/smile.gif What a film...

Mordoch Bob
02-23-2002, 12:41 PM
You could try defining the liquid as a bent column composed of point masses connected by springs. By using some sort of noise to propagate waves through the tube (i.e. jitter the nodes at the spout of the teapot), you could probably make a fairly real looking tea pouring demo in real time. However, it could also look really horrible. Having never actually done this, the only way to actually find out is for you to try it. Good luck.

[This message has been edited by Mordoch Bob (edited 02-23-2002).]

knackered
02-24-2002, 02:41 AM
Sort of like those magic beer bottle lamps - where a beer bottle is suspended over a glass by a transparent tube - the water is pumped up the transparent tube and spills over the side, trickling down the outside of the tube into the glass, giving the appearance of a constantly pouring beer bottle. God I need some sleep.