This post details how a simple black and white rough sketch effect was created using MSG. MSG stands for modular synthesized graphics and is Studio Artist’s modular image processing architecture. MSG presets are created by combining together different individual processors that work together to build up an overall effect.
The processor chain used to create the black and white rough sketch effect shown above is shown below in a screen snap of the MSG Advanced Editor. Nine different MSG processors were used to build the sketch effect.
The gallery at the top of the post shows the output of some of the individual processors that work together to build the overall final sketch effect (shown int he first image in the gallery). The second image in the gallery shows the output of the TexFV processor, which is an edge map where edges and areas of high texture energy are displayed as white and non-edges and non-textured areas are displayed as black.
The edge-texture energy map output is then input into 2 different Hough Adapt Line processors. The third gallery image shows the output of the first Hough Adapt Line processor, and the 4th gallery image shows the output of the second Hough Adapt Line processor. Note that this processor generates a really rough sketch composed of straight lines in localized grid areas. By adjusting the user editable parameters associated with this processor you can change the scan grid and sensitivity of the straight line approximations it generates.
The Hough Adapt Line processor is trying to represent white curved edges in it’s input image (the output of the TexFV processor) with a small number of straight lines. We use the Hough Adapt Line processor twice to generate 2 different sketch approximations into 2 different image streams. These 2 images then need to be combined together into a single sketch image.
We use the 1C_Composite processor to combine 3 image streams into a single image stream. 1C stands for 1 channel, and you should be familiar with the word composite from our previous discussions on layers. Compositing is a way to take 2 different input images and combine them together in some algorithmic way into a single output image. We’re compositing 1 channel black and white images in this particular case. If we had wanted to composite 2 different full color images together we would have used the 3C_Composite processor.
The particular compositing algorithm we want to use is Max compositing, which can be generated by setting the 1C_Composite processor’s Comp Alg editable parameter to 1. The result of max compositing the 2 sketch outputs from the first 3 Hough Adapt Line processors is shown in the 5th image in the top gallery.
The processor chain then uses a 3rd Hough Adapt Line processor to generate a third straight line sketch approximation of the TexFV processor output. We then use the DisplaceMod2D processor to add a small amount of 2 dimensional displacement modulation to this final straight line sketch. The displacement modulated sketch is shown in the next to last image in the top gallery.
The displacement modulated sketch is then max composited with our previous 2 component sketch image using a second 1C_Composite processor (last image in the top gallery). This final composited sketch image is then inverted using the Invert processor so that it is composed of black lines on a white background. A 1to3 processor is used to convert the 1 channel black and white image into a black and white color image for output from the MSG preset.
The MSG generic Editor settings are shown below for this preset. Note that we’re using an IP Source set to the Source Image and simple Replace compositing into the canvas. So the MSG preset processes the source image as opposed to the canvas.
The individual IO (input0output) routing connections for the various processors used to build up the complete sketch effect are shown in the gallery below.
Note that i’m able to build this complete effect by using the individual RGB output buffers are temporary buffers to store intermediate image output that is combined together to build up the final effect.
The green source input channel is processed by the TexFV processor and the result is stored in the green output channel. That output is then used as input for all 3 of the Hough Adapt Line processors. The red and blue output channels are used to store the different straight line approximation sketches, and those 2 image channels are then composited into the red output channel.
If you look at the IO connections for all of the individual processors that make up the effect in the gallery above you can see how I programmed the IO routing to put this effect together. When editing a MSG preset, you need to think about how individual image streams are routed through the various MSG processors that make up the preset effect.
In a later post we’ll use this MSG black and white sketch effect as a component in a paint action sequence (PASeq) to build a more elaborate colored sketch effect.
The screen shot above shows what happens when I clicked on the current MSG preview image in the MSG Advanced Editor. Note that the Evolution Editor preview images were filled with mutated variations of my black and white MSG preset.
Since the Max Compositing steps are essential to this particular effect working properly, I set the Lock options for both 1C_Composite processors to On. Doing this insures that the internal parameter set to generate mac compositing is locked and does not change when the mutated variations are generated in the Evolution Editor. You can see the locked processors in the second image in the above gallery. Note that all of the other processors have Lock set to Off. This insures that they will be allowed to freely mutate in the Evolution Editor when I click on the MSG Advanced Editor preview image.