Metaballs 3D Demo
A real-time 3D metaball demo implemented as a Java applet (2001).

What are Metaballs?
Metaballs are organic-looking 3D objects defined by implicit surfaces. Each metaball emits a field that falls off with distance. Where multiple fields overlap, the surfaces merge and blend smoothly together – creating the characteristic “blobby”, liquid-like shapes. Negative metaballs can carve holes into the surface, adding further variation.
Marching Cubes
To render metaballs, the 3D space is divided into a regular grid of small cubes. The Marching Cubes algorithm then evaluates the field strength at each corner of every cube. If the field crosses a threshold (the isosurface), a polygon is generated for that cube. By marching through all cubes, a triangle mesh of the entire surface is reconstructed in real time.
Rendering
- Custom software renderer (no GPU acceleration)
- Phong shading using a ray-traced lighting map
- Light map is recalculated dynamically when the light vector changes
Controls
Click on the applet to focus, then use keys to switch scenarios:
| Key | Mode |
|---|---|
0 |
Positive blobs |
1 |
Positive and negative blobs |
2 |
Positive and negative, one rendered in line mode |
3 |
Fade (blur) effect |
Hold down the right mouse button to move the light source.
Applet
Note: Java applets are no longer supported in modern browsers.