Jul 9, 2009
Alchemy 3D metaball early preview
Check it out! (note: requires FP 10.0.22)
I thought I'd give an early demo of a 3D metaball system that I've been working on in the lab for the last week. As fate has it, Frank Reitberger also posted a fantastic metaball experiment today with great results. Where our systems differ, is that I've written mine entirely in C++ through Alchemy with the intention of eventually tying it directly to my particle emitter, ensuring the least amount of data marshaling possible.
Keep in mind, this is an early preview and some glitches still exists, namely some forward facing triangles are being rendered in the incorrect order. I plan on sorting the indices in C++ once I find a suitable technique.

Of course, what would a blob simulator be without the necessary webcam support?
For the Alchemy coders, I thought I'd mention an important lesson that was learned with this experiment. Originally I had the vertices, normals, and uvts stored in a value object that looked like this:
-
struct VertexVO
-
{
-
float v[3];
-
float n[3];
-
float t[2];
-
};
The problem is that that blocks of the Alchemy RAM ByteArray are overwritten unless explicitly allocated, and therefore the start of the vertices data was getting written over by indices. The solution is simple and obvious, allocate memory:
-
verts = new float[MAX_VERTICES*3];
-
norms = new float[MAX_VERTICES*3];
-
uvts = new float[MAX_VERTICES*2];
UPDATE: Added reflection and Frank's Pixel Bender Fisheye filter to the webcam view.




nice work and great framework – if you ever release the source give me a shout as I’d be interested in converting it to haXe to see how haxe inline syntax stack up against c++ in alchemy.
[...] boring the next weeks… Edit: Can´t get enough of it? I strongly recommend to have a look at Peter Nitsch´s Alchemy 3D metaballs. Damn cool – it´s metaball [...]
I’ve seen the FPS and Memory counter before but I do not know where it came from. Where did you get it?
TIA
-JS
Mr. doob! http://code.google.com/p/mrdoob/wiki/stats
niiiiceeee!
however, the process is really intensive for my cpu, i had to close some apps to get a decent fps.
Thanks!
-JS
WHAT THE!!!! oh my its just amazing, going to trhow aaway my 3d engine now :p