This topic is now archived and is closed to further replies.

Fast Metaballs (new article)

This topic is 6069 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello there dear forum lurkers Long time, no see. I suspect that not many of you know who I am since it's been quite a while since I was here the last time. I will not bore you with the story. I let other do that instead. I'm going to ask anyone who is willing a favor. I've recently written a new article/tutorial on how to make fast metaballs. I would like you all to read it and give me your comments on it before I publish it on my homepage and tell the public about it. Help me find all the flaws in the reasoning. Tell me what I forgot to mention. Tell me anything, even if it is just to tell me that I suck. You'll find the article here: You can also find a small demo I wrote using this technique here: Well, that's it for now. I look forward to reading your comments. - WitchLord Edited by - WitchLord on April 23, 2001 6:01:41 PM

Share this post

Link to post
Share on other sites
Welcome back and how was the stay with your lady in Brazil?

I don''t have the time to look over the source but I did try the demo.
Congrats, you got it to work on my crappy Matrox Milinium card.
It was fast too.

Two odd things I noticed.
1) The picture texture was mainly fine, but I had some weird rectangles appearing over some parts of the main metaball. (could be the card, it would not surprise me.)

2) The metaballs would dissappear when not attached to all of the other ones in the center. If not attached, they would not render.

Share this post

Link to post
Share on other sites

this is a really nice article, and a really nice algorithm. I just stumbeled over one thing: you said that the normal is:
n = m*v/d#4
so I tried it, and I always got
n = -2*m*v/d#4
Maybe I didnt calculate it correctly, but I think this might be correct. Especially the sign seems reasonable, as the function get larger towards the center of the metaballs.
But the result is the same with both formulas, so I suppose yours is just an "optimized" form of mine. Even though I think you could mention this.
Another thing I would like to be mentioned is, that you have to add the normals before making them length 1. This is important to get correct results, and one could make this wrong. But your article is mainly about the surface finding, so I suppose this is not really important...
Anyways, good article!

Share this post

Link to post
Share on other sites

Thanks. It was great, so great in fact that I'm moving there in two weeks :D

I don't have the problems that you have on my GeForce 256. I can't think of anything other than crappy drivers that are the blame for that. Unfortunately Matrox are infamous for their poor driver support.

There are no source code with this one. I've decided not to release source code anymore, except maybe in the form of helper classes, like wrappers and such. The reason for this is that I want to put extra focus on the algorithms, without all the other garbage that must come with an demo (initialization, etc). Also I prefer not to let people get the chance of copy and pasting my code in to their own projects. They will not learn anything that way anyway.


Thanks. Your points are valid. You have derived the formula correctly, however you have switched the direction of the vector so that it goes from the point of interest to the center of the ball. This gives you a negative sign. Oh, and I forgot the 2, you're right about that one. I have it in the source code (although it's not needed) but I forgot it in the article. I will fix that. I will also add what you said about normalizing after the summation.

Edited by - WitchLord on April 24, 2001 3:56:09 AM

Share this post

Link to post
Share on other sites
He WitchLord - long time no see

Do you remember that metaball thread here - long long - ago? I see you got the metaballs going again. Same here. I did some of them a few weeks ago.

I see you got some nice optimisations going. Looking good.

Maybe I''ll cya later some time,
- Bas.

(I hope I can make you jealous with these screenshots, so we can get our metaball war going again )

Share this post

Link to post
Share on other sites
Greetings Bas, I''m happy to see some of my old friends still frequent the forums

Yes, I remember it well. It was almost exactly one year from now and it was one of the most rewarding discussions I''ve had in this board.

I actually already saw your screenshots on your homepage and I must admit they look marvellous. I tried to find a download for your screensaver but I had no such luck. Do you have it available for download?

I''m not going to add shadows for my metaballs, but I might make them into a screensaver too. I''ve thought about it before I saw yours. But I don''t know when, I have so many things I want to do right now plus I have the relocation to Brazil to worry about.

I have plenty of ideas for more optimizations for my metaballs that I might try out someday soon. Maybe I can boost the number of metaballs to 30, still with smooth framerates.

Right now I think I''m going to concentrate on my game. Btw, I''ve followed your development of your game a while and I must say that I''m impressed with your results so far.

- WitchLord

Share this post

Link to post
Share on other sites