POV-Ray : Newsgroups : povray.binaries.animations : Liquid animation Server Time
19 Jul 2024 04:18:52 EDT (-0400)
  Liquid animation (Message 11 to 20 of 20)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Claudio Pozzoli
Subject: Re: Liquid animation
Date: 12 Nov 2003 20:45:25
Message: <3fb2e235$1@news.povray.org>
> Very, very impressive. I'd be interested in some more information about the
> algorithm used. Is it similar to the one used in
> http://graphics.stanford.edu/~fedkiw/papers/stanford2001-02.pdf?

No ; ) the approach they used is semi-lagrangian (particles + level set method,
they combined a lagrangian approch with a eulerian approch).

Smoothed Particle Hydrodynamics, used (with some changes) in the program
I wrote, is a pure lagrangian method. Fluid evolution is tracked following
the movements of many pseudo-particles during the simulation. Have a look at the
links I've posted in the previous message, you'll find a good description
of the technique there. ; )

Feel free to ask if you need more details.


Post a reply to this message

From: Fernando Gonzalez del Cueto
Subject: Re: Liquid animation
Date: 13 Nov 2003 00:40:58
Message: <3fb3196a$1@news.povray.org>


Very very nice. We want to see more :)

Fernando


Post a reply to this message

From: Christoph Hormann
Subject: Re: Liquid animation
Date: 13 Nov 2003 04:42:01
Message: <ktvb81-2i7.ln1@triton.imagico.de>
Claudio Pozzoli wrote:
>>It looks very good.  If you wrote the simulation engine yourself i guess
>>a lot of people here would be interested in it.
> 
> 
> The simulation is based over Smoothed Particles Hydrodynamics, a
> pure lagrangian method introduced in late '70 by Gingold and
> Monaghan and originally used to model compressible flows in
> astrophysical simulations. Successively it has been adapted to the
> simulation of quasi-incompressible - incompressible flows.
> The liquid is approximated by a finite number of particles, each carrying
> physical informations like density, pressure, speed, viscosity...
> [...]

Thanks for the explanation, i was more referring to the actual program 
though.  The nice thing about particle based fluid simulation is that 
the fluid can move in large areas without excessive memory requirements 
that would occur with grid based methods.  It could even be worth 
considering integrating such a system into POV since for interaction 
with the environment you could rely on the raytracing functions.

>>Note that you don't need to generate a mesh from the scalar field,
>>POV-Ray can directly render isosurfaces.  I did renders of fluid
>>simulations before by generating a density file from the simulation data
>>and using it in an isosurface.
> 
> 
> How could I do this? I mean: once I've generated a density file, following
> the examples in pov documentation, I have to use it as a pattern (media,
> pigment-normal) and associate it with a primitive. Do you use an isosurface
> as object? densityfile as a media pattern? I would like to test it out! : )

You can use the density file in an isosurface shape just like any other 
pattern:

#declare Fn_Density=
   function { pattern { density_file df3 "file" interpolate 2 } }

isosurface {
   function { Fn_Density(x, y, z) - 0.5 }
   ...
}

This will show the isosurface with density=0.5.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Rick [Kitty5]
Subject: Re: Liquid animation
Date: 13 Nov 2003 07:47:06
Message: <3fb37d4a@news.povray.org>
Claudio Pozzoli wrote:
> What do you think?

That is very very impressive!!
-- 
Rick

Kitty5 NewMedia http://Kitty5.com
POV-Ray News & Resources http://Povray.co.uk
TEL : +44 (01270) 501101 - ICQ : 15776037

PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: Liquid animation
Date: 13 Nov 2003 23:28:00
Message: <Xns9433377F137C9raf256com@204.213.191.226>
cla### [at] liberoit news:3fb29804@news.povray.org

>> Can You please recompress it with some "standard" codec like mpeg-1,
>> divx, vxid?
> http://digilander.libero.it/stajaame/index.html
> Uploaded a mpeg-1 compressed video ; )

wooow
 
*realy* nice :) I quess it's nices water I had even seen in pov :)


-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Claudio Pozzoli
Subject: Re: Liquid animation
Date: 14 Nov 2003 10:29:10
Message: <3fb4f4c6@news.povray.org>
> Thanks for the explanation, i was more referring to the actual program
> though.  The nice thing about particle based fluid simulation is that
> the fluid can move in large areas without excessive memory requirements
> that would occur with grid based methods.  It could even be worth
> considering integrating such a system into POV since for interaction
> with the environment you could rely on the raytracing functions.

In short, there are two different computational phases:

1) Compute change rates for every particle involved in the simulation. In detail:
    -) fluid-fluid particles interactions (every particle within a fixed distance from
        the particle being updated has to be considered in the process. Check
        the papers for more details about the equations... you have to update
        accel. and density. ~30-40 neighbours / particle).
    -) external forces (gravity... simply add them to the accel. vector of the
particle).
    -) boundary-fluid particles interactions (for the moment boundary is
        modelled introducing fixed particles in correspondence of the solid
        surface and adopting a pure repulsive Lennar-Jones interaction force.
        Fixed particles are placed really close in order to form a strong
        barrier to the penetration of the fluid). It should be easy to replace
        particles and to manage directly particles-solid collisions.

Note: 1a) In order to speed up computations, as the interpolating kernel
          presents a compact support (only particles within a fixed distance
          interact), it could be used (well, it's obligatory ;) ) a suitable
neighbours
          finding algorithm. I've used a simple uniform grid: all the
          neighbours of the particle being updated are located checking only
          few adiacent cells (you can take advantage of the simmetry in
          particle-particle interactions to reduce computations).
          1b) Current time-step is determined checking the physical properties
          associated to every particle (simply check accel. and speed of sound).

2) Update particles position-density-speed (leapfrog scheme, prediction - correction
     formulation) using change rates and timestep found in the previous step.

The first one is the more complex and time consuming phase by far...
1661s computation -> 1558s phase 1 vs 102s phase 2... ;)

> You can use the density file in an isosurface shape just like any other
> pattern:
>
> #declare Fn_Density=
>    function { pattern { density_file df3 "file" interpolate 2 } }
>
> isosurface {
>    function { Fn_Density(x, y, z) - 0.5 }
>    ...
> }
>
> This will show the isosurface with density=0.5.

Gotta try it but I have to rerun simulation to collect data once again, though.
I'll do it in the weekend.


Post a reply to this message

From: JimT
Subject: Re: Liquid animation
Date: 14 Nov 2003 12:25:01
Message: <web.3fb50eed16bb28727c8049c20@news.povray.org>
Claudio Pozzoli wrote:
>
>I've wrote and external program responsible for the physical simulation of the
>liquid. Every time step (user defined) it saves in a file the surface of the liquid
>in mesh2 format (around 12000 vertex and 22000 triangles for the simulation
>posted). All those file are then processed by PovRay for final rendering
>(Pov is used only for that purpose). Rendering times are a problem, though:
>8 min / frame with radiosity and photons on (~360 frames in the animation
>you've seen). Maybe an advanced user could optimize
>some parameters and speed up rendering without a loss in quality... :)
>
Very convincing, and good luck with your thesis. A bit of flash always goes
down well!

I can understand that the photons are giving you some very nice caustics,
but I'm not sure radiosity is contributing much. Do you save much time with
it off?


Post a reply to this message

From: Andrew Coppin
Subject: Re: Liquid animation
Date: 14 Nov 2003 15:33:43
Message: <3fb53c27$1@news.povray.org>
OK, so that's downright cool!

*sigh* Makes me wish I could do stuff like that... but last time I read a
paper on the subject, it was totally over my head. (I'm still trying to
figure out how on Earth cubic Bezier splines work... heh)

Thanks.
Andrew.


Post a reply to this message

From: Claudio Pozzoli
Subject: Re: Liquid animation
Date: 18 Nov 2003 07:50:35
Message: <tfm7ucng4gjk.1fptfpdprq5mx$.dlg@40tude.net>
> In data Fri, 14 Nov 2003 12:24:21 EST, JimT ha scritto:
> I can understand that the photons are giving you some very nice caustics,
> but I'm not sure radiosity is contributing much. Do you save much time with
> it off?

I'll post some screenshots with and without photons/radiosity as soon as
possible (I've formatted my hd... I've got to reinstall everything :P).

Claudio


Post a reply to this message

From: ACH Postma
Subject: Re: Liquid animation
Date: 14 Jan 2004 21:23:42
Message: <4005f9ae$1@news.povray.org>
Beautiful !

I always were a liquids freak so this is really nice to watch ! I wished I
had time to study this furthermore !

/~\nne


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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