Blobs2D

Version 2.0 — © 1996-1999 Christian Cohnen

A classic demoscene effect: soft, glowing blobs that float across the screen, merge when they overlap and create colorful organic shapes. Well known from countless Amiga, Atari ST and PC demos, 2D blobs are surprisingly simple compared to their 3D metaball cousins — no ray marching, no isosurface extraction, just a precalculated radial falloff stamped onto a framebuffer.

The blob function uses a squared distance falloff: for each pixel inside the blob radius, the intensity is (1 − r²/R²)², giving a smooth bell-shaped bump. This field is precalculated once and then simply added to the screen buffer at each blob position every frame. Even-numbered blobs add their field (bright), odd-numbered blobs subtract (creating dark "anti-blobs") — when they overlap, positive and negative values cancel out, producing interesting interference patterns.

The color palette is hardcoded as a gradient from black through green, red, yellow, white and blue — so the overlapping intensities naturally produce vivid color shifts as blobs merge and separate. A pixelsize parameter lets you render at lower resolution for a chunky retro look.

Blobs2D

Features

Parameters

NameTypeDescriptionDefaultRequired
blobsizeint (4–128)Radius of each blob in pixels32no
pixelsizeintPixel scaling factor — higher values render at lower resolution1no
numberblobsintNumber of blobs (even = additive, odd = subtractive)10no
linkURLLink target when applet is clickedno

Code Example

<applet archive="Blobs2D.jar"
  code="Blobs2D.class" width="200" height="200">
  <param name="blobsize" value="64">
  <param name="numberblobs" value="6">
  <param name="pixelsize" value="1">
  <param name="link" value="https://www.chriscohnen.de">
</applet>

Version History

VersionDateChanges
1.0February 1997First version (ccblobs)
2.0November 1999Configurable blob size, click URL
August 2004FPS counter, constant speed, numberblobs parameter