How to create chromatic abberations / RGB shifts

Hi,

I would like to achieve the effect that is in the image when I apply it to white objects (like the text).

image

ideally, I would like to go to the “Channels” section, and move the red channel left and the green one right… but I cannot seem to move the color channels as “layers”…
image

Any advice?

Thanks!

Make two copies of the original layer

Use curves to leave only one channel by turning off both others (set the curves of the other channels to zero).

Here only red channel is active. Green and blue are set to zero:

You can also do this with channel mixer. In this example, only the green channel is active:

At the end you have three layers with three color channels:

Now you have to use the “addition” blend mode to put the color channel layers back together to form the image:

Now you can move the color channel layers individually and get the desired effect:

Here’s an example with white text:

If you have G’MIC extension for GIMP, you can also use “Chromatic Aberration” filter for it:

The advantage of G’MIC filter is that you can choose different types of CA. Here, for example, is radial:

3 Likes

Thank you very much! :pray:

1 Like

Another way

Colors → Components → Decompose to create a new image with RGB masks.

In that image, choose a layer and Layer → Transform → Offset Use a small ‘x’ value (this wraps the layer and keeps image size)

Choose a second layer and apply that twice Filters → Repeat Last (and again)

Colors → Components → Recompose to write back into the original image.

40 second demo of that.

https://i.imgur.com/YBtOUib.mp4

Also, the ofn-layer-decompose script that will decompose your layer into 3 groups, one for each channel (you can flatten these if necessary). You then move the groups (or the image layers)

Awesome, thanks!

AWESOME! (I added it to the plugins dir)

Exactly what I wanted… :slight_smile:

Can it do CMYK and such :wink:


YAY !!!

1 Like

Other colour modes ? You can if you use the Gimp Decompose filter, but remember, at the end of the day Gimp is a RGB editor.

example Decompose → shift two layers both x and y → recompose

1 Like

Yes, but it’s a bit more complicated. Starting with the RGB decomposition you have,
change a few things:

Thanks!

I’ll see if chat gpt can help me change the script :wink:

Follow up question…

Why don’t the RGB colors show up (and instead the “subtraction” is shown (yellow, pink, cyan)
For example, the shifted blue layer does not show up as blue.

This is done by taking a white object and shifting the RGB layers.
I tried with background and without…

It is how the RGB masks are moved. Try moving in opposite directions.

This white circle,
R is moved right giving the red band
G is moved left giving the green band
The R +B and G + B combination of course are additive and give CMY as shown in the inset.

Edit: Remember that there is a also a transparency mask in operation in your example.

But notice how the original shifted color disappears on the upper left image - leaving only the original circle shape.
I would like it to stay in its original color (e.g., the blue circle) when it extrudes, like in the lower right image - even when it is on a transparent background…

I found that there is sometimes a difference if I do the shifts on a black background and the crop - or crop and then shift on a transparent background)

for example, in the shark image, there are no GB colors. only red because it’s last on the layer stack or something…

This is black background + Shift + Remove Background

Maybe, it is not a chromatic abberation you want, you can get there with a simple stack of layers.

stack

An alterative to the other procedures is the gimp_gmic_qt plugin

In the degradations section, a chromatic abberation filter. As other ways it uses two channels but you can choose the colours. Maybe apply more than once will work.

Thanks,

Yeah, I tried the GMic.

I am looking for color decomposition - e.g., RGB channels.
I just expect the blue channel, when I move it away from the white - to appear as blue. When on transparent background, it doesn’t appear at all (I’m guessing it’s the behavior of the addition blend)

Yes, it is the interaction of the layer modes. This using an old script-fu from Saul Goode sg-decompose.scm for you to play with - attached, unzip and put in your User Profile scripts folder. You can do this with Ofnuts plugin, this just easier to see.
old

Move the blue layer and on the opposite side the Red and Green of course combine to Yellow Edit - you do need that black background layer for blue to show.

sg-decompose.zip (1.4 KB)

The Ofnuts Script is amazing for me :slight_smile:

However, like in your example, only the bottom layer shows.
The red offset layer that is jutting out is not shown as red… (why not? It is Red+Transparent (addition)… I would expect it to be red… In Normal blend mode it shows of course.)

Because by default, in most modes (about all except Normal) the top layer is clipped to the contents of the image blow (in other words, it doesn’t apply to transparent pixels under it). If you want to see the blue, you have to set the layer’s composite mode to Union:

Sweet! Thanks!!

This is amazing and excavation what I wanted. Thanks!

I am trying to add it to the decompose layers script… But Chat GPT it’s failing me… :nerd_face:

Is there an option to set it to union via a script /API?