You might have seen this effect more frequently during the last months: Those growing organic blobs that cover a surface in intricate Patterns (sometimes resembling the texture found in a Keith Haring painting). These patterns are the result of a process called Reaction Diffusion.
Reaction diffusion simulates the behaviour of two substances (chemicals) which interact with each other. On the one hand the substances are transformed into each other (this is the reaction), yielding higher concentrations of the given chemicals at a spot, on the other hand they also dissolve (this is the diffusion), spreading themselves out over an area. By giving each chemical an individual color and simulation both the concentration and the diffusion over and over again, with the right parameters beautiful patterns emerge.
Until now most implementations of reaction diffusion we’ve seen were done on a 2D plane (like the example in Pt. I in Photoshop), but we were looking for a way of running the simulation in true 3D space as well. Enter voxels and volumes. With a volume being the natural extension of a 2D image into 3D space, implementing the Reaction Diffusion algorithm in true 3D is doable. And that’s what we’re gonna do in this three part tutorial.