Forum

Meta mesh shader

Hi
does any of you know a method to render a metamesh (metaballs like) out of a point cloud ?
I’m trying to do fluids in realtime, but it seems kind of complicated…
As usual, any advice would be greatly appreciated.
Thanks

ya, thats not easy. i am currently patching an evolutional algorithm, where a dataset of positions evolve over time, the first results look slightly like a fluid thing, but without physical background … i will upload something to my patches page in some days …

but anyway, you have to build a mesh out of random positions, for this you can try to use the Delaunay (2d) node with the two angles outputed from Polar (3d) to create indices for the mesh.

mmmm, interesting, i’ll give it a try…
and is there a meshsmooth node in vvvv or does it have to be coded within VS ?

meshsmooth…you’ll have to do your own smoothing i guess while creating the points for the vertexbuffer.

but maybe you mean something like the Normals (EX9.Mesh) nodes smoothing angle?

no, i meant subdivision surface

make some points, interpret as meta-mesh, then do subdivision surface on the fly, to make the thing look like a liquid (and the fluid calculation is done only with the initial points)
that’s what i’m trying to do, in order to dynamicaly control some liquid over pre-rendered footage (of liquids of course…) ; hence the other post about 3dsmax cam data: i would like to match move my own pre-rendered footage.

btw: i found this about fluids:
GPU_Gems_Fluids_Chapter.pdf

… sorry

no need to be sorry. the layout gets killed with long links.

so use angle brackets for long links and the vertical dash to add a short description (see the posting comments under the text edit box)

but i cleaned it up, no probs…

but franzi, you all have seen the Wave Simulation treasure with a wave simulation shader by gregsn?

hi franzi!

as i understood it, the article you found describes the movement of particles within a 2dimensional rectangular plane. the whole plane is covered with that fluid and after applying external forces the fluid will move to distribute local pressure = equalize global pressure. ~
however the point is that the whole surface is covered with that fluid. and the boundaries are fixed.

but you are looking for simulating the boundaries of fluids and the possibility to have more drops / more surfaces which will combine to one when approaching.
in this approach the movement of the fluid within the boundaries is not of particular interest.

the techniques for simulating drops within another medium (metaballs + marching cubes) are not developed yet, however you’re right: time’s up for implementing it. for shure it would be too complicated to patch it.
we need some new nodes for it, which will define the surface with the metaball formulas and generate the mesh with the marching cubes algorithm.
http://en.wikipedia.org/wiki/Metaballs
http://en.wikipedia.org/wiki/Marching_cubes
http://en.wikipedia.org/wiki/Isosurface

but maybe a shader can be implemented which simulates a few metaballs and renders it with some volume rendering techniques? that is we don’t have to generate the geometry but render the volume , which will be computed (using the metaball formulas) on the fly within the shader… could also be difficult.
http://web.cs.wpi.edu/~matt/courses/cs563/talks/powwie/p1/ray-cast.htm

but maybe there are shaders out there which already do that stuff?

hope that helped
sebastian

thanks a lot this is VERY valuable for me…
in the meanwhile, i found a metaball FX shader, whose computation is done in 2d, as you pointed it,
but it might be a good start…
However, this shader, that uses the DoLerp hlsl function , basically performs a 2d heightmap and color blend map,
is not vertex-spreadable right now.
see link for info (some of you might be interested in):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/Blobs_Sample.asp

(the code is there, so i don’t paste it here)

i was interested in metaballs 3d too, and I took a look to this code, did u have nice result in vvv with it ?

“for shure it would be too complicated to patch it.”

theres actually an insane metaballs patch by majortom:
http://www.vvvv.org/tiki-download_file.php?fileId=1180