GPU-supported bubble and foam rendering


Tamás Huszár

Supervised by: László Szécsi

Department of Control Engineering and Information Technology,
Budapest University of Technology and Economics,
Budapest, Hungary



Several types of foam can be found both in nature and artificial environments; yet it is rare in computer graphics due to its complex nature. Modelling foam structure and dynamics by simulating the underlying bubble structure has a high computational cost. To model such a complex phenomena we need to use serious simplifications while maintaining realism and detail.

In this paper we propose a method for rendering dense soap foam in real time. We first build a foam blob from realistic soap bubbles which has a solid inner structure. We use a hybrid method based on ray tracing and 2D billboards to render dense foam constructed from hundreds of these blobs. To model foam behaviour and interaction, we present a simple particle based physics simulation approach. While our method is capable of rendering foam featuring a large number of bubbles, it has certain limitations we also discuss in this paper.

Keywords: Bubble rendering, foam rendering, impostors


Presenting natural phenomena like smoke, fire or fluids in a realistic way is a tough challenge in computer graphics. Even though the equations describing the physics of these phenomena are known, the exact calculations are too complex to perform in real time. Today’s graphics hardware requires some intuitive simplifications or artistic input to efficiently present these phenomena in real-time applications like computer games.

Bubble and foam simulation falls into the above category. The structure of dense foam built of soap bubbles exhibits large complexity. While modelling a physically correct soap bubble is an easy task, building complex foam structures from individual bubbles cannot be done in real time on current hardware.

In this paper, we propose a method to render and simulate dense soap bubble foam. We give an intuitive simplification of foam structure which enables us to simulate realistic foam with the speed, detail and quality necessary for real-time applications. After the introduction and previous work, we give a short overview of bubble simulation, discussing the actual techniques used in our method in section 3, including our solution for efficiently modeling multiple connected bubbles. Section 4 introduces the idea of building foam from blobs of soap bubbles. We discuss the structure of these blobs and provide two different methods of storing and rendering blob structure. In section 5, the technique of building actual foam of the blobs is discussed, including a basic physics simulation described in section 6. In the next section we present our result, and provide possible enhancements and future work in further sections, including the conclusion of this paper.


The paper can be downloaded from the link below.



Bubble formation with mutual bubble walls Close-up of rendered foam
Foam formation sliding down on a slope Large foam consisting of more than 180000 bubbles



A short video showing the presented method can be downloaded from the link below.