Reaction Diffusion In Photoshop
By Neil Blevins
Created On: June 4th 2015
Updated On: Feb 15th 2023
Software: Photoshop

Reaction Diffusion is an algorithm that mimics the chemical process that's responsible for a lot of patterns we see in the natural world. The stripes on a zebra, the spots on a cheetah or giraffe. Fish have these sorts of patterns, plants, coral, etc. And considering how often these patterns appear in nature, its amazing how little commercial software there is out there to create such patterns.

You have two choices with this lesson, watch me discuss the issue in the video below, or read the full text.




Image from Spots plus spots equals maze: how animals create living patterns

Image from Zebra Facts

Image from Wildscreen Arkive

The chemical process works like this. You have two sets of molecules, an "activator" and an "inhibitor". The activator travels along the surface until it meets an inhibitor, which then tries to stop the advance by converting the activator into an inhibitor. The activator produces more of itself, and the cycle continues. In small spaces (like the skin of an animal), this system eventually reaches equilibrium. And the result of this battle leaves a pattern behind.

There's a lot of experimental software out there to make these sorts of patterns in both 2D and 3D, but as mentionned before, very little commercial software. There was a "Reaction" filter for Photoshop released as part of the old Kai's Power Tools filters, but they were discontinued a long time ago. However, I recently discovered a trick in Photoshop that lets you make reaction-diffusion type patterns. Its certainly not as full featured as a dedicated piece of software, but it can make some really interesting patterns. The following video is by SkyBase, and as he puts it, "You just have to have an initial image, then apply a set of filters that "cause a reaction" (sharpen, highpass, levels, edge detect... anything that brings contrast) and then have it diffuse (blur, median, min/max, and otherwise so many options.)"

Watch this short video here to see the procedure...


Here's a direct link to the video on Vimeo: Tutorial: Reaction-Diffusion in Photoshop

So you can see how this technique mimics at least conceptually the same sort of thing that's going on in nature. And in practice it does manage to achieve many of the same results, at least in 2D.

So using what we've learned, I've made a series of Reaction Diffusion Photoshop Actions, and then have tried them on a number of different types of base images to achieve quite a variety of interesting results. Keep in mind when doing these experiments that there are a number of variables that should be considered to achieve different sorts of results...
Now lets try out some different actions on different patterns. 6 Actions in all.

Reaction Diffusion Standard

This action contains the following steps:
Here's some examples using this filter on an initial image...


Initial: Random Dots

Final
 

Initial: Random Dots with more distance between them

Final

Initial: Photo Of A Tiger From The Internet

Final


Initial: Perlin Noise With Fractal and High Contrast

Final

Initial: A dot

Final: I stopped the process after a few iterations


Initial: A Tall Dot

Final: I let the process keep going for a lot of iterations

Initial: Big empty dot with smaller dots

Final


Initial: Big empty dot with smaller dots

Final: Notice how blank areas tend to fill with longer linear strands

Initial: Lines and circles

Final: Notice how dots and lines form slightly different patterns


Initial: All Wavy Lines

Final

Initial: Long lines

Final


Initial: Long lines at different distances

Final: Notice how more blank area leads to curvier lines, and areas where lines are closer together remain straight

Initial: Horizontal Noise

Final


Initial: Horizontal Noise

Final: This simulation had more iterations to get a more complex pattern

Initial: Horizontal Noise with Contrast

Final


Initial: Perlin Noise With Contrast

Final

Initial: A few thick lines

Final


Initial: Random Dots

Final: Only a couple of iterations

Initial: Round Cellular Pattern

Final


Initial: Square Cellular Pattern

Final

Initial: Round Cellular Pattern Large

Final


Initial: Round Cellular Pattern High Contrast

Final

Initial: Round Cellular Pattern High Contrast and Fractal Iterations

Final


Initial: Square Cellular Pattern with Noise on top

Final

Initial: Tech Pattern

Final


Initial: Circles

Final

Reaction Diffusion Soft

This action contains the following steps:
Here's some examples using this filter on an initial image...


Initial: Random Dots

Final: More Blur causes larger patterns to form
 

Initial: A dot

Final

Initial: All Wavy Lines

Final: Thicker Wavy Lines


Initial: Cellular Pattern

Final

Reaction Diffusion Directional


This action contains the following steps:
Here's some examples using this filter on an initial image...


Initial: Perlin Noise High Contrast

Final: Sorta Reminds Me Of Sand Dunes
 

Initial: Round Cellular Pattern

Final

Initial: Dots at regular intervals

Final


Initial: Long lines at different distances

Final

Reaction Diffusion Small

This action contains the following steps:
Here's some examples using this filter on an initial image...


Initial: Tiny Random Dots

Final
 

Initial: Photo Of A Tiger From The Internet

Final: Less Blur causes finer patterns to appear

Reaction Diffusion Directional Small

This action contains the following steps:
Here's some examples using this filter on an initial image...


Initial: Perlin Noise from one direction

Final: Since the directional blur is less, you get finer patterns
 

Initial: Horizontal Noise with Contrast

Final

Reaction Diffusion Spin

This action contains the following steps:
Here's some examples using this filter on an initial image...


Initial: Perlin Noise High Contrast

Final: Stuff in middle is spun less of a distance than stuff at the edge, so you have a more detailed final pattern in the middle
 

Initial: Random Dots

Final

Initial: Square Cellular Pattern

Final


Initial: Long lines at different distances

Final

Of course this photoshop trick has some limitations, and I'd still love to see some software dedicated to these sorts of techniques. Real Reaction Diffusion simulations have far more options and variables to get an even wider variety of patterns. But its still pretty cool the amount of variation you can get with this simple photoshop trick. Try your own variations of these actions to get even more patterns, and please share with me any cool ones you find!

Download the actions by right clicking here and use "Save As": SoulburnReactionDiffusion.zip


This site is ©2024 by Neil Blevins, All rights are reserved.
NeilBlevins.com Twitter Mastodon Bluesky Instagram Cara Blogger Facebook LinkedIn ArtStation Kickstarter Gumroad YouTube IMDB