Page 1 of 2

MetaBalls

Posted: Tue Jan 20, 2004 12:00 am
by traumatic
http://files.connection-refused.org/metaballs.zip

It's far from perfect and still needs LOTS of optimizing (can't get above 50FPS on my system) but I thought
I'll post it here because I don't know if I'll ever find the time to finish...

...and I know of people saying that PB can't do this :wink:


The demonstration is based on this article:
http://astronomy.swin.edu.au/~pbourke/m ... olygonise/
Maybe some of you can find a faster way than I did.


Now I will stop posting something new everyday. Promised! :)

Image Image
Image Image

Posted: Tue Jan 20, 2004 12:10 am
by Saboteur
Waw!! 8O
PB can't do this ;)

:D :D :D :D

50 FPS too....

Posted: Tue Jan 20, 2004 12:11 am
by Blade
Great!
Nice to see such stuff with PB!

Anyway you should check the normals calculations: the reflection is broken clearly in each quad, while if properly made should me more smooth...

sorry, too late to write a correct english... ;-)

Re: MetaBalls

Posted: Tue Jan 20, 2004 1:04 am
by NoahPhense
omg.. that kicks as$..

Posted: Tue Jan 20, 2004 1:39 am
by Dare2
That's good.

Don't know if this info is useful, but the metaballs render pretty much as per your posted images except for 800x600x32 resolution, when rectangles (mostly red) can be seen - display starts to get the "dirty" look I am used to with this sort of stuff, but does not get as dirty as most.

FPS is around 20 in 640x480 modes, around 15 in 800x600 and 1024x768 modes.

(NVIDIA RIVA TNT2 Model64)

Posted: Tue Jan 20, 2004 7:31 am
by J. Baker
Very nice, is this reflecting an image or lights?

Posted: Tue Jan 20, 2004 9:10 am
by traumatic
J. Baker wrote:Very nice, is this reflecting an image or lights?
that's environment mapping, so basically an image

Very nice

Posted: Tue Jan 20, 2004 9:18 am
by hteamspy
I get bettwen 60 and 70 FPS on 800x600 : 32bit

and constant 60 Fps on 1024x768 : 32 Bit

Nice work

Posted: Tue Jan 20, 2004 2:44 pm
by blueznl
again, on my machine, fps 60..65 :-/

hey, doesn't matter is a scene is easy or difficult, all i get is the same rate... huh... duh...

opengl or directx?

800x600x32: no (reddish) rectangles as noted above, but it's not always smooth on the blending areas

Posted: Tue Jan 20, 2004 2:47 pm
by blueznl
just noticed something... are you sure you calculate the framerate properly? if i move the mouse a lot, the reported fps varies from 25 .. 270, although it makes no difference on screen

Posted: Tue Jan 20, 2004 3:29 pm
by traumatic
blueznl wrote:are you sure you calculate the framerate properly?
yes quite, because it always reflects my refreshrate.
i'll check that tonight, thank you

Posted: Tue Jan 20, 2004 3:33 pm
by blueznl
well, it appears to be totally unrelated to my refresh rate (100hz) which makes it kinda' funny...

Re: MetaBalls

Posted: Tue Jan 20, 2004 8:02 pm
by GPI
Could it be, that you use SetRefreshRate(RefreshRate) ?

Because my monitor flickers now in 60hz (and normaly i set VGA-Driver so, that direct-x use 100hz) and the desktop-resolution is changed! Other PB-Programms doesn't have this problem.

When yes: Can you create a little test-version without this command?

Posted: Tue Jan 20, 2004 9:27 pm
by Num3
I found this nice Library on purearea that comes with some extra commands for Sprites...

Including SwapBuffers()...

This little baby turned my 60 FPS game (using flipbuffer()) into a 350!!! FPS game...

I was quite impressed! And give it 6 thumbs up !!!!

It's called SpriteX...

Posted: Tue Jan 20, 2004 9:35 pm
by tinman
It crashed on my machine. As did the one previous program I tried (I forget which one now, but I have it here somewhere).

WinXP, Athlon XP2800+, 512MB ram, nForce2 chipset/audio, Ati radeon 9600. All the latest drivers and OS patches.