sparkfish / augraphy

Augmentation pipeline for rendering synthetic paper printing, faxing, scanning and copy machine processes
https://github.com/sparkfish/augraphy
MIT License
334 stars 43 forks source link

Add Color Shifting / 3D Blur Effect #296

Closed jboarman closed 1 year ago

jboarman commented 1 year ago

This effect involves a sort of double or triple printing of the ink layers, printed from different channels that are shifted and blurred.

The color shifting / 3D blur effect involves these steps:

  1. split channels from original source (either RGB or CMYK or HSV)
  2. randomly keep color or convert to grey scale or recolorize to a different shade
  3. shift split channels to randomly adjust placement, shifting X/Y positions by random offset and random directions for each channel; most often, channels will go in opposite directions from each other, but might not
  4. most often, reduce intensity of split channels (Poisson-likely to reduce intensity); often adding in a mild blur to one or more split layers
  5. most often, retain the original layer and blend with other split layers; otherwise, print only the split layers

Some additional inspiration might come from tutorials like this one on how to do the similar "glitch effect" in photoshop step-by-step: https://pixelbuddha.net/journal/tutorials/how-to-create-glitch-effect-in-photoshop

image

image

kwcckw commented 1 year ago

From this pull request: https://github.com/sparkfish/augraphy/pull/302, this should be added now.

jboarman commented 1 year ago

@kwcckw Can you demo how we can apply this augmentation to reproduce the image above where the colors are like shadows echoing the text above and below the line in slightly different shades?

kwcckw commented 1 year ago

@kwcckw Can you demo how we can apply this augmentation to reproduce the image above where the colors are like shadows echoing the text above and below the line in slightly different shades?

The shadow like effect is only applicable for grayscale image only since those displaced color will be in grayscale now and hence creating a shadow like effect. Some grayscale examples:

image image image

jboarman commented 1 year ago

Thank @kwcckw. After we finish the other 2 new augmentations (#304 and #303), then we can come back and do the channel splitting so that we can get that effect on black/grey ink layers.