pouët.net

Go to bottom

Position Based Fluids/Dynamics

category: code [glöplog]
 
added on the 2013-04-25 02:40:47 by rudi rudi
i gotta try this :)
added on the 2013-04-26 12:20:45 by smash smash
Yes. do that!.. :)

(ohh and RIGHT now. scenesat played Varia - Agenda Circeling Forth. MUST mean something :) )
added on the 2013-04-26 12:26:29 by _Chucky_ _Chucky_
can someone confirm / infirm my thoughts?

there are two parts
- simulating particle positions
- convert those particles into a surface for rendering

how is rendering done? raymarching? marching cubes then mesh rasterization?

I would love to get started coding a fluid sim. I know there are things in GPU gems but samples don't even run on my Radeon HD4850 so it's a bit tough to get started without a sample to fiddle with
the rendering is done by splatting elipsoids into the depth-buffer, and smotthing it, more or less.
added on the 2013-04-26 14:41:12 by kusma kusma
kusma: nice, I didn't know this method. what you're saying so much more elegant compare to Marching-cubes.
added on the 2013-04-26 15:18:52 by TLM TLM
see those videos on blog.mmacklin.com/publications
BB ImageBB ImageBB Image :O
added on the 2013-04-26 15:34:17 by ewerybody ewerybody
looks cool. can it do a sugar wave too? or drops in the coffee? or a bubble of coffee floating over the surface? or the milk fluid sim? any body ever recorded the coffee milk mix in a glass? i searched that a couple of times on youtube. nobody has it?

sorry. i was just a lil deep into playing with my coffee utils and "graphics" here. ;)
added on the 2013-04-26 17:19:45 by yumeji yumeji
don't ask how many times my girlfriend looked strange at me when I made a coffee and put only some milk into it and was really fascinated about the great turbulences...
added on the 2013-04-26 18:41:21 by questor questor
I like my coffee as I like my women ...

Cold and bitter ;)
added on the 2013-04-26 19:03:27 by Punqtured Punqtured
I find their distinction between SPH and "Position Based Fluids" very odd, since what they propose is an SPH method - they use the entire Lagrangian decomposition and kernel smoothing framework (including stable spatial derivatives) of SPH. In addition, the majority of their method is identical to existing methods in SPH - the only thing that actually is new is a modified formulation for the incompressibility.

Also, I'm a bit curious about their incompressibility formulation. Normally, incompressibility in a fluid is defined as the velocity field being divergence-free. Numerically enforcing the divergence constraint simultaneous to the other Navier-Stokes constraints is tricky, so almost all methods decompose the simulation into advection- and projection step. Advection moves fluid quantities (in this case the particles themselves), which usually violates the divergence constraint. The projection then turns the new velocity field into an incompressible one by finding the "closest" velocity field that is divergence-free (usually using Helmholtz decomposition), making things incompressible again.

Their new projection step assumes constant density throughout the fluid and enforces it using hard constraints by moving the particles themselves. This is already a bit dodgy, but I suppose it can be seen as a different formulation of a prediction-correction step. The problem in this case is that enforcing incompressibility should only change the velocity field, not the density field (i.e. particle positions). In their case, since change in position ~~ change in velocity (which is a side-effect of verlet integration), this apparently justifies moving the particles themselves. Whether this a) even leads to a divergence-free velocity field in the limit and b) if it does, whether it is the closest divergence-free velocity field (and not just any), is questionable and not really covered in their paper. The original SPH is consistent, meaning that an infinite number of particles and infinitesimal timesteps lead to an exact solution to the Navier-Stokes equations, but I have doubts this is the case here.

Don't get me wrong - the videos look cool as hell - they just aren't very realistic (they show the same false-viscosity artifacts of most early SPH methods), and it is unclear whether this is due to too large timesteps or inherent in their method. Additionally, they don't really explain the benefits of their new incompressibility formulation over existing ones, since there already exist unconditionally stable projection methods for SPH.

@yumeji: Milk in coffee is awesome! You'll have more luck finding ink in water on youtube though (looks almost as cool). But doing that with SPH wouldn't really work, since it doesn't take to mixed phase fluids very well - it's better for free-surface flows (it would smooth most of the interesting details on the milk-coffee boundary anyway). Eulerian methods are usually better in this case, since you can more accurately trace the boundary (with sub-grid accuracy, too). I did see a few very cool simulated mixed-phase videos (white stuff in water), but I cannot seem to find any at the moment :(
added on the 2013-04-26 22:09:39 by Noobody Noobody
@noobody ink in water is lame. coffee is better. smoother. it can even cast milk shadows on thick edges. doesn't even need much to record. a dark room. a glass. a flashlight. a semi thin coffee, milk and a hd camera. why there's none? *shrugs* :D
added on the 2013-04-26 22:35:31 by yumeji yumeji
Plenty of Latte Art videos on YT...?
added on the 2013-04-26 23:32:17 by Photon Photon
Very realistic simulation, I hope this leads to some interesting experiments with, say, making actual digital paint using fluid simulations and tye-die effects created by mixing different liquids of varying consistency, texture and color... Gotta play around with it when there's an accessible API. :)
added on the 2013-04-27 21:32:23 by visy visy

login

Go to top