Photorealistic modeling and rendering of materials with complex internal mesostructure is a hard challenge in Computer Graphics. In particular, macroscopic porous materials consist of complex translucent substances that exhibit different details and light interaction at several different scales. State-of-the-art techniques for modeling porous materials manage the material either as a surface and set up complex capture procedures or as a volume by employing different instances of procedural noise models for its representation. While the surface solution achieves several desired material properties, it still presents drawbacks in practical applications-high computational costs, complex capture procedures, and poor image variability, among others. Volumetric solutions are more flexible, but the final structure and appearance are difficult to control. To overcome these drawbacks, we propose an algorithm for the procedural generation of porous materials. The method is based on an artistic and physically inspired simulation of the growth of self-avoiding bubbles inside a volume, by means of dynamical systems. The patterns induced by the bubbles can be easily and intuitively controlled. The bubbles adapt to any given shape and have convincing global and local fluid-like patterns as seen in bread and sponges. Our method generates 3D textures that adequately represent porous materials, which can be used as input for creating realistic renderings of different porous objects. As a case study, we present the results of using these 3D textures as input to a direct volume renderer and show that they compare favorably with standard 3D texture synthesis methods. Copyright (C) 2016 John Wiley & Sons, Ltd.