POV-Ray : Newsgroups : povray.binaries.animations : Poor Man's Fluid Simulation Server Time
15 May 2024 14:24:15 EDT (-0400)
  Poor Man's Fluid Simulation (Message 1 to 7 of 7)  
From: William Tracy
Subject: Poor Man's Fluid Simulation
Date: 8 Jan 2009 01:19:17
Message: <49659ae5@news.povray.org>
I was staring at the particle demo for mechsim:
http://megapov.inetart.net/demo/particle.mpg

It occurred to me to replaces the spheres with blobs, and see if I could 
create the illusion of a liquid. The end result met my (admittedly low) 
expectations. :-)

Mm, liquid mercury. ;-)

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

I disapprove of what you say, but I will defend to the death your right 
to say it.
     -- Evelyn Beatrice Hall, frequently mis-attributed to Voltaire


Post a reply to this message


Attachments:
Download 'particle.mpg' (460 KB)

From: triple r
Subject: Re: Poor Man's Fluid Simulation
Date: 8 Jan 2009 02:10:00
Message: <web.4965a609c4fc4309ef2b9ba40@news.povray.org>
William Tracy <wtr### [at] calpolyedu> wrote:
> I was staring at the particle demo for mechsim:
> http://megapov.inetart.net/demo/particle.mpg
>
> It occurred to me to replaces the spheres with blobs, and see if I could
> create the illusion of a liquid. The end result met my (admittedly low)
> expectations. :-)


http://en.wikipedia.org/wiki/Smoothed_particle_hydrodynamics
http://www.rchoetzlein.com/art/

This is the basis for how a lot of free surface flows are simulated.  I don't
know the details, but it seems like the coefficient of restitution should
definitely be zero (so it doesn't bounce), and surface tension should manifest
itself as a small attractive force between particles (so droplets don't go
flying off without a decent push).  A few more particles and it could actually
look convincing.  I'm not sure how mechsim handles collisions or forces, but
this could get pretty expensive if you have to do it through functions or loops
in POV-Ray.  Of course there are existing implementations too.  Is this how
Blender does it?

 - Ricky


Post a reply to this message

From: William Tracy
Subject: Re: Poor Man's Fluid Simulation
Date: 8 Jan 2009 12:10:54
Message: <4966339e$1@news.povray.org>
triple_r wrote:
> This is the basis for how a lot of free surface flows are simulated.  I don't
> know the details, but it seems like the coefficient of restitution should
> definitely be zero (so it doesn't bounce), and surface tension should manifest
> itself as a small attractive force between particles (so droplets don't go
> flying off without a decent push).

Hmm. There are a few mechsim parameters I could play with ... :-)

The biggest fundamental problem with this approach is that Povray blob 
objects do not conserve mass. When they approach each other, they become 
much bigger than when they separate.

> A few more particles and it could actually
> look convincing.  I'm not sure how mechsim handles collisions or forces, but
> this could get pretty expensive if you have to do it through functions or loops
> in POV-Ray.

Mechsim is a patch to Povray; AFAIK the physics simulation is done in C 
code. That said, this animation did take a bit over four hours to render.

Unfortunately, I have another project (not Povray related) that's using 
up my CPU cycles right now, so I may not get to play with this much 
more. If I did have more time, I would try to find a way to turn it into 
an entry for the "relativity" round of the TC-RTC.

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

I disapprove of what you say, but I will defend to the death your right 
to say it.
     -- Evelyn Beatrice Hall, frequently mis-attributed to Voltaire


Post a reply to this message

From: triple r
Subject: Re: Poor Man's Fluid Simulation
Date: 8 Jan 2009 14:15:00
Message: <web.49664fd3c4fc4309ef2b9ba40@news.povray.org>
William Tracy <wtr### [at] calpolyedu> wrote:
> The biggest fundamental problem with this approach is that Povray blob
> objects do not conserve mass. When they approach each other, they become
> much bigger than when they separate.

But at least discrete mass is conserved.  With enough particles, you wouldn't
really notice the difference.

> Mechsim is a patch to Povray; AFAIK the physics simulation is done in C
> code.

But to do something like more complex force laws between nearest neighbors, I
suspect you'd either have to do it in POV-Ray or patch it in.  I'm not sure the
framework, as much flexibility as there is, allows you quite that much freedom.
Or if it does, it's probably O(n^2).

> Unfortunately, I have another project (not Povray related) that's using
> up my CPU cycles right now, so I may not get to play with this much
> more.

Always unfortunate.  My CPU cycles (my brain's, not my computer's) are in short
supply too, although I'm just kinda spinning my tires on the other project.
Perhaps time for a few more all-nighters...

 - Ricky


Post a reply to this message

From: William Tracy
Subject: Re: Poor Man's Fluid Simulation
Date: 10 Jan 2009 15:15:21
Message: <496901d9@news.povray.org>
I cranked up the damping so that the droplets don't bounce any more. 
Unfortunately, it also retards horizontal motion. :-P

As it turns out, mechsim *does* support attractive forces between 
particles, but this thing renders slowly enough as is (13 hours, 39 
minutes, and 49 seconds for this sequence).

That said, eliminating the bouncing does *wonders* for making this look 
like an actual fluid. Good call!

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

I disapprove of what you say, but I will defend to the death your right 
to say it.
     -- Evelyn Beatrice Hall, frequently mis-attributed to Voltaire


Post a reply to this message


Attachments:
Download 'particle.mpg' (628 KB)

From: clipka
Subject: Re: Poor Man's Fluid Simulation
Date: 10 Jan 2009 15:45:00
Message: <web.49690861c4fc4309168446870@news.povray.org>
William Tracy <wtr### [at] calpolyedu> wrote:
> That said, eliminating the bouncing does *wonders* for making this look
> like an actual fluid. Good call!

Looks a bit yucky, somehow - like fresh milk that has ceased to be fresh ;)


Post a reply to this message

From: holohause
Subject: Re: Poor Man's Fluid Simulation
Date: 4 Oct 2009 08:05:01
Message: <web.4ac88ea6c4fc4309c7f1d3f30@news.povray.org>
William Tracy <wtr### [at] calpolyedu> wrote:
> I was staring at the particle demo for mechsim:
> http://megapov.inetart.net/demo/particle.mpg
>
> It occurred to me to replaces the spheres with blobs, and see if I could
> create the illusion of a liquid. The end result met my (admittedly low)
> expectations. :-)
>
> Mm, liquid mercury. ;-)
>
> --
> William Tracy
> afi### [at] gmailcom -- wtr### [at] calpolyedu
>
> I disapprove of what you say, but I will defend to the death your right
> to say it.
>      -- Evelyn Beatrice Hall, frequently mis-attributed to Voltaire


Its Great!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.