---
title: Metaballs
description: Technical article and creative exploration from Kffein's research and development lab.
url: "https://kffein.com/en/lab/metaballs"
date_modified: "2026-11-09T10:43:04-05:00"
---

 *Version française : [Metaballs](https://kffein.com/fr/lab/metaballs)*

# Metaballs

**Author:** WebGL

**Role:** 2021

A WebGL experiment with an interactive metaballs scene

## Real-time merging and splitting of shapes

This effect was originally meant to be part of another experiment that was never finished. It was later picked up by an innovation group working on a communication-themed project. The idea was to recreate the look of a lava lamp, where bubbles merge and then pull apart.

It was no small challenge, since the effect relies on a lot of math and we don’t consider ourselves experts in the field. On top of that, it had to be interactive and deliver exactly what we had in mind. We had seen demos like it before, but rarely with the code. So it took a lot of research, from tutorials and articles to demos, along with careful work on camera placement, which plays a key role in the illusion of merging.

We came away with a solid understanding of this effect, one we often see on the web but rarely see explained.