Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Luper Rouch, posted on November 13, 2001

Image Description, by Luper Rouch

Just a little screen shot from a little effect :)

Features :
  • OpenGL rendering
  • mesh is constructed by recursing in an octree (only stores bounding boxes and field intensities, there is a custom memory allocator for the nodes so rather large trees can be generated without mem alloc penalty)
  • recursion takes into account visibility and metaballs bounding spheres, it stops inside the volume (negative metaballs are not handled yet)
  • metaballs field values calculation is writen in asm (~10% performance gain)
  • "highly" optimized bounding boxes view frustum culling (used ideas from Ulf Assarsson and Tomas Möller, "Optimized View Frustum Culling Algorithms," ( : implemented frustum planes masking, temporal coherency (easy one but did not gave good results on the allways changing octree), and tests on n-p vertices)
  • mesh is generated using marching cubes algorithm
  • There are 12 metaballs moving in a rather large cube, mapped with an animated texture. The app runs at ~60FPS on my athlon 1GHz, geforce 256, 512Mo.

    You can get the win32 executable and source code at

    Note that this is a part of a larger project named TOTTEUR, a (not finished yet) 3d engine released under the GPL (

    Image of the Day Gallery


    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

    November 13, 2001, 02:29 PM

    This is awesome!

    I shall try the demo right away!

    Sirrah, you were best take my coxcomb. Ah, but don't take my codpiece!


    November 13, 2001, 02:34 PM

    they say purple is the colour of sexual frustration...


    November 13, 2001, 02:36 PM

    Mmm... Perhaps you should take my codpiece too then!


    November 13, 2001, 02:46 PM

    > they say purple is the colour of
    > sexual frustration...

    Nah - Its yellow.. Purple is fine.



    November 13, 2001, 02:46 PM

    I am interested in this octree mesh thing.


    November 13, 2001, 03:00 PM

    Nice work,

    is this what my skeleton looks like?



    November 13, 2001, 03:04 PM

    Hehe, it sure looks great!!! And runs smooth on my 800Mhz, Geforce DDR, 384MB RAM in 1600x1200 32bpp :)
    One thing though... My screen looks a bit green tinted when I'm returning to windows, because my eyes have... don't know what it's called... adjusted? to that purple color. Is it possible you will add a sort of smooth changing of colors? I think that would be great!


    November 13, 2001, 03:31 PM

    you wouldn't happen to have studied king lear in matrik too, would you? ;) i hate that story so much...

    anyway, to the author of the actual effect: it's really nice :)

    luper rouch

    November 13, 2001, 03:43 PM

    the colors should change slowly, it goes to blue and back to purple (nothing impressive yet, you probably can avoid waiting so long :)


    November 13, 2001, 03:43 PM

    Beautiful. It looks like purple jellyfish (sp?) swimming around. :) I'm surprised at the framerate with that much blending going on. It runs very smooth on my Athlon 1GHz 256MB with GeForce2MX. I guess the fillrate on my vid.card is a lot higher than I expected. :P


    November 13, 2001, 04:54 PM

    "12 metaballs moving in a rather large cube"

    what's your definition of a rather large cube? Ultimately there exists some fine voxel grid that the data is represented on whether its compressed using an octree or not. What's the resolution of that grid? If the "metaballs" are moving around constantly, don't you have to continuously recreate your octree?
    There's been a lot of papers on adaptive marching cubes. If you're running marching cubes on an octree, there is a problem with cracks appearing between different resolutions. Are you fixing this problem dynamically? If so, how?


    November 13, 2001, 04:57 PM

    Haha, that's funny... i know this girl who always tells me she dreams in purple... all she sees is purple and she doesn't have dreams... just... purple. she must be REALLY sexually frustrated ;)


    November 13, 2001, 05:07 PM

    King Lear is an awesome piece of work. Pitty you didn't like it. Oh well. No harm done I guess.

    Timothy Barnes

    November 13, 2001, 06:59 PM

    Wow I'm totally impressed by that shot. That looks so nice. You should make a screen saver or a Windows Media Visual plugin or something. Looks pretty.


    November 13, 2001, 09:02 PM

    I downloaded it, but it didn't want to run on Windows 2000. So I thought I'd download the source and try compiling it for myself, but all the .cpp files in 'gl files' are missing. I'd really like to see it running for myself if you could help.


    Jason Kozak

    November 13, 2001, 10:18 PM

    Might not be a Win2k problem. It's running fine here.


    November 14, 2001, 12:06 AM

    by "rather large", i mean that there can be large gaps between balls, without a big hit on performance (compared to the first attempt, where all points of the space grid where evaluated)

    the octree is regenerated every frame (but doesn't allocs memory more than once so construction time is not significant), maybe i'll try incremental updates one day ...

    multiple resolution are not handled yet : didn't figured out how to fill gaps (any resource ???)


    November 14, 2001, 12:08 AM

    you must also get TOTTEUR from sourceforge's cvs (link is on the same page as the screensaver) to be able to compile the screen saver


    November 14, 2001, 12:54 AM

    Sure, there's lots of papers on fixing cracks. There's a paper called "Adaptive Marching Cubes" You can probably find it on google. Kobbelt did it by indentifying the region of the crack, sticking a vertex in the center and then making a triangle fan to the vertices of the crack. Any way you do it, it won't really be fast. Our group will be publishing a paper some time next year on a techinique for generating polygons from a multi-resolution voxel grid that doesn't require crack fixing. When it is published it'll be linked to You can actually see a screen shot of it on that page.

    I'm still curious as to what size grid you're contouring on. I'd like to compare your speed against other methods. I do understand that you're doing a lot more than just contouring though. Thanks.

    Da Wolf

    November 14, 2001, 01:27 AM

    just tried it, VERY NICE EFFECT!! great work

    The Legend

    November 14, 2001, 02:55 AM

    I want a winamp plugin version!

    The Legend

    Rasmus Christian Kaae

    November 14, 2001, 03:28 AM

    Please get help to fix the colors.


    November 14, 2001, 03:30 AM

    Very Very nice effect ! i like very much that violet color :)
    Continue on this way and make us know all the news regarding the entire project :)



    November 14, 2001, 05:35 AM

    I tried your screensaver and it runs very smoothly on my Athlon 750 / 256Mo and TNT2. It is very nice and your source will be of great interest for my educationnal purpose.

    May I suggest you to bring options as the colors in which the meta balls cycle, the speed, size and basic things like this ?

    I choose to make it my default screen saver.. so thank you a lot :-)



    November 14, 2001, 06:07 AM

    there are so many inconsitencies in the story that it makes it hardly worth reading (let alone studying). the whole issue with edmund and edgar could've easily been avoided from the start - it's totally unrealistic.

    romeo and juliet, though full of bloopers as well, is a much better story i find, and its fame is well deserved.

    but anyway, i've written my english exam, i don't need to know any of this anymore ;)

    apologies to anyone who doesn't have a clue what i'm talking about! :)


    November 14, 2001, 08:07 AM

    I think she's dropping you a hint there buddy ;)



    November 14, 2001, 08:57 AM

    Well, I'm at work, but that was so pretty I thought I'd try it anyway.
    NT 4.0, Celeron 333 processor, 128 Mb memory and a Voodoo II
    And the amazing thing is - it worked!
    It does about 1 frame every 11 seconds (we timed it) but it works :o)


    November 14, 2001, 12:23 PM

    remember to download the included sdl dlls. you have to download all the dlls from the page, next to the main download link.


    November 14, 2001, 12:30 PM

    They say programming is the hobbie of sexual frustration

    This thread contains 29 messages.
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.