Plasma generates random textures in Adobe Photoshop® CS6 for Windows. When run in grayscale mode, the resulting image has visual overtones similar to the Clouds filter in Photoshop with varying levels of smoothness depending on the filter settings. In RGB color mode, images range from smooth, “tie-dye” color effects to fuzzy or grainy multicolored abstract patterns (see Examples). Additional effects can be generated increasing or decreasing the color saturation or other adjustments according to the artist’s patience and imagination.
The Plasma filter is available free through the Adobe Exchange® CS6 panel, which is accessible inside Photoshop via the menu option Window → Extensions → Adobe Exchange. After installation, restart Photoshop, and the filter will appear under the Filter → Render sub-menu where it operates like any other Photoshop filter.
The Plasma filter uses a modified form of a classic midpoint displacement algorithm. The basic idea has been around for at least a century (see Blancmange Curve) and is closely related to the idea of Fractals, or self-similar curves or surfaces (if envisioned as defining a height map for a landscape). In 1982, Fournier et. al. presented the random midpoint displacement method for terrain generation. Since natural landscapes are not perfectly self-similar, the synthetic surface is constructed to be more life-like by randomly shifting the heights of the midpoint lattice sites.
Briefly, the basic midpoint displacement algorithm iteratively divides a square image into smaller regions, assigning color (or height) values to the midpoints. At each stage, the midpoint assignment is followed by defining new sub-square corners using an average over neighboring parent corners. When applied to images, the process “drills” deeper into the pattern until the pixel level is reached.
A little more specifically, the corners of the initial global square are assigned random values. The midpoint is given a value based on the average of these corners plus a random shift. Based on this new midpoint, the global square is then divided into four sub-squares where the new corners (on the edge midpoints of the parent square) are assigned values based on the average of the neighboring parent corners. Depending on which resource is referenced for the basic algorithm, this step is amended by adding a random shift to the new corner values. Further, each random shift is scaled downward according to the mapping level.
One distinction from the work by Fournier et. al. mentioned above is that we draw the random numbers from a uniform, as opposed to a Gaussian, distribution for simplicity. For color Plasma images here, we repeat the process for each RGB channel independently to form the composite color image. While the algorithm was defined above for square domains, it can also be applied to rectangular systems with only small changes to the base algorithm.
The figure on the right shows the dialog screen for the Plasma filter in Adobe Photoshop CS6. Briefly, the preview pane sits at the top of the frame and displays the approximate result based on the current filter settings. The main controls lie below the preview pane, but the most important is the Turbulence in the Structure group.
Example textures are shown elsewhere, or one can simply explore the options and available patterns while watching the preview pane.
If the user holds the control key when launching the filter, it will skip the dialog display and apply the result immediately at the current dialog settings with a new random seed. Alternately, one may apply Photoshop’s “Run Last Filter” option at the top of the Filter menu.
The Preview panel is at the top of the dialog box. The Zoom selector below it controls how large the preview image is relative to the current Photoshop image/layer size. The Progress bar, just to the left of the Zoom buttons, updates as changes are made to the dialog settings.
The Turbulence Structure setting controls the smoothness (low values) or graininess (high values) of the patterns. The default value is 100, and typical values lie in the 50 to 200 range. Not much variation occurs above 400.
The Random Seed slider and the Randomize button both change the displayed pattern in a random, but repeatable, way. That is, if you find a particular texture interesting and want to come back to it later, the same seed value will regenerate the same base pattern. The slider simply provides another convenient method of changing the seed, but image results for nearby random seeds are not correlated, in general.
Output options include Invert, which simply inverts the grayscale image or each color channel as a convenience. The Gray checkbox is only available in RGB mode; it generates a single pattern, which is replicated in each of the RGB channels. The resulting grayscale image is similar to but has a different visual character than Photoshop’s Clouds filter.
The options include Midpoint displacement and Diamond square. The former algorithm was described in the Method section above. The latter algorithm is closer to the work by Fouriner et al. and it mitigates some of the line artifacts seen in some Midpoint displacement textures by including additional averaging over neighboring points on a “diamond” when calculating new rectangle corner values.
Plasma produces a color image texture in RGB or grayscale layers, channels, or masks in 8- and 16-bit image modes. The image mode is selected automatically from the current layer in Photoshop. It was tested on images as large as 2049x2049 pixels with a runtime of about eight seconds on a 2.4 GHz PC with 2GB of RAM running Adobe Photoshop CS6 Extended.
The midpoint displacement algorithm is an early approach at generating interesting, life-like maps. For its simplicity, it does an excellent job; but given the square/rectangular symmetry of the generation process, occasional line or square artifacts show up in the resulting images. These are expected. The Diamond Square algorithm amends the basic idea behind midpoint displacement in an attempt to mitigate the observed lines, but it does not succeed in eliminating them.
Unless otherwise stated, all content and images are copyright © 2013 Peter Ronhovde
Images of the Sun are from NASA archives.