Fluid dynamics

Status
Not open for further replies.

dream431ca

Newbie
Joined
Jan 23, 2004
Messages
3,384
Reaction score
0
Is it possible for the source engine to simulate fluid dynamics? (waves, bubbles, boyancy?) I heard it does take quite a bit of processing power to do it. But because valve have put all the physics into just 2 lines of code, (previously stated by a valve employee one year ago), the source engine should theoretically beable to handle it.. what do you guys think...
 
No it can't. It's also been discussed before...many times. CPUs today just can't handle it.
 
what you say (waves, bubbles, boyancy?) is not fluid dynamics. thats has been in games forever.

true fluid dynamics would be simulatiting every singal water moliclue which would be imposable with todays and tomarows computers. but you could kinda simulate it like in black and white 2
 
dream431ca said:
Is it possible for the source engine to simulate fluid dynamics? (waves, bubbles, boyancy?) I heard it does take quite a bit of processing power to do it. But because valve have put all the physics into just 2 lines of code, (previously stated by a valve employee one year ago), the source engine should theoretically beable to handle it.. what do you guys think...

Can fake bubbles and waves, and yes it has bouyancy.

But as for real fluid mechanics, no it's not possible right now. No computer could run it.
 
I thought i read they had bouyancy (sp) in there... like when the bodies float to the surface of water

as for the other stuff i doubt that's in... but they can still simulate it (ie.. the water will carry you this direction while your in it etc...)
 
source does bouyancy modelling for stuff in water

the other stuff is way to much work for a real time game.
the water surface waves calculation (for reflections/refractions) is prolly just done in a shader on the GPU.

seriously, there is _way_ more than 2 lines of code handling the physics - i would guess they meant u can make an object into a physics object by adding two lines of code in your mod/game.
there is a lot more code supporting that, though
 
dream431ca said:
Is it possible for the source engine to simulate fluid dynamics? (waves, bubbles, boyancy?) I heard it does take quite a bit of processing power to do it. But because valve have put all the physics into just 2 lines of code, (previously stated by a valve employee one year ago), the source engine should theoretically beable to handle it.. what do you guys think...
Doesn't the "Docks" video demonstrate buoyancy?
 
That article wasn't funny. :|

Come on seriously.
 
No computer as it stands now could run fluid dynamics in realtime :p You would have to do offline rendering for true fluid dynamics.
 
Bigcheese said:
what you say (waves, bubbles, boyancy?) is not fluid dynamics. thats has been in games forever.

true fluid dynamics would be simulatiting every singal water moliclue which would be imposable with todays and tomarows computers. but you could kinda simulate it like in black and white 2

Have you ever taken physics?? Bubbles and waves and boyancy ARE part of fluid dynamics:

waves: Energy flowing through a medium of liquid creating waves or ripples in the fluid

bubbles: A gas that displaces the fluid making the fluid less dense and also creates waves at the surface of the fluid.

boyancy: A mass displacing a fluid in which the fluid surface level becomes higher (depending on the mass of the object in the fluid.)

Yes...these were in games before...but were talking about the source engine. In other games...they did not simulate these sorts of things...it was just there for presentation or effect...but there was never really any serious physics behind it.
 
They're all just fake in HL2... but at least they're there. :)
 
dream431ca said:
valve have put all the physics into just 2 lines of code

You clearly have never done any programming....

Of course I'm assumming that valve hasn't invented some new super, highly abstract, programming language, where the physics could be applied by say....

apply physics;
Dance_A_Happy_Dance;

:)
 
Technially, they could just be very looooooong lines... like... waaaaaaay long... I mean... we're talkin'g super long here... I mean just...wow... whoa, what was I talking about?
 
It's still just an effect. To truly physically simulate water, as has been said, you'd need to malculate the movement and reactions of each water molecule. Instead they just simulate the visible effects of water by sticking a splash animation whenever you jump in or a bullet hits it (not sure if the surface actually changes or if it's done with 2D sprites or what). As far a bouancy goes, each object has mass and density in source, so bouancy can be easily calculated without the need to physically simulate every water molecule.
 
well true boyency displaces water but that would still not be to hard.

untill we have GFX cards that simulate atoms and not polygons then there is no reason to have true fluid dynamics. you can simulate it.
 
Damn, I can't believe I overlooked the posibility of crazily long lines!

:(
 
getName() said:
Damn, I can't believe I overlooked the posibility of crazily long lines!

:(
Don't feel bad... at least you have a sweet avatar. :)
 
Bigcheese said:
well true boyency displaces water but that would still not be to hard.

untill we have GFX cards that simulate atoms and not polygons then there is no reason to have true fluid dynamics. you can simulate it.

Valve said the source engine is fully upgradeable so in the future I would very much like to see that.
 
OK first of all, there is absolutly no need to simulate fluids in a game. When you're fragging Combine do you care (or are even going to notice) that the water is flowing realistically? No. All that matters is it looks good, which requires a nice shader, not full simulation.

Second of all, being able to simulate fluids in realtime all depends on the depth and accuracy of simulation. You can generalize the way say, water flows around obstacles and compute that in real-time (See Maya 5 and up, Fluid Effects), although rendering is another issue. If you want to run a simulation that details how every water molecule interacts with each other, your computer would put up a white flag and surrender. This type of simulation, in real-time plus rendering, probably won't be happening within this century. (At least for any body of water any bigger than a teaspoon)

Third of all, graphics cards won't ever "simulate atoms and not polygons." All your graphics card does is tell your monitor what color and how many pixels to draw and where.

And my last point before I step down from my soap box, is that in art or programming, if you can fake it faster than you can do it legitimatly, then by all means fake it.
 
gusolson said:
It's still just an effect. To truly physically simulate water, as has been said, you'd need to malculate the movement and reactions of each water molecule.

Well, IAAP, and your statement depends on your definition of "truly physically simulate water". fluid codes have been around for a long time, and if you're only interested in macroscopic effects (smallest scales being bullet sized) your fluid elements only need to be at minimum some reasonable fraction of that size. Of course, you run into problems if you need many of these elements. You're basically right in that the computational cost can get very high, very fast. I honestly don't see the point even if you had the computational power, it's so much easier to fake it.. ie:

water(){
if(bullet_hit)
fancyrippleeffect(bullet.lastposition);
}

and watch the ooos and aaahhs
 
getName() said:
Damn, I can't believe I overlooked the posibility of crazily long lines!

:(

Actually, in the definition of a line of code in C++, two lines would be an impossibility, as it is just one function per line (and then the good ol' ;)
 
closed because the point has been made.

No, true fluid dynamics aren't in hl2.

No, a mod can't add it in.

That article was a joke article.... (2 lines thing)
 
Status
Not open for further replies.
Back
Top