Light Rays Filter

As a big fan of G’MIC plugins, I am wondering if there is a filter to do a light-ray effect like this:

rays

The G’MIC rays currently only doing this (or do I miss something?):

rays_gmic

Using this effect quite a lot for my art submissions, but always opening each image in a video editor just to add some nice rays is a bit annoying.

Using Krita, Gimp, G’MIC on Linux.

Thanks for any inputs on this…

1 Like

I don’t think there is something equivalent (yet).
Filter Degradations / Blur [Radial] gives something similar, but only for perfectly radial rays.

Anyway, I’m sure this is possible to write a filter that does what you want. I don’t have much time myself but maybe others could try ? @garagecoder, @Reptorian, @afre ?

Technically, this should be as simple as defining a diffusion tensor field with the ‘right’ smoothing directions, then use smooth.

1 Like

I was working on rectangular-polar transformation, this is actually another filter that can be made with it. That with a new axis_streak filter.

It probably won’t be as fast as diffusion tensor method (rectangular-polar takes .4 s on 500^2 image)

I recall us talking about this in several threads a while back. I don’t think we used the term motion blur, which I think is what we want of bright areas.

Blur 50px SE (convolve then blend; in other words, slow)

PS It’s ketchup on the wall, really ugly. Just brainstorming…

With another image.

Blur looks promising! (just missing ray length and maybe a Luma threshold)

Speed is not the most important part, important is that we could solve this with G’MIC since there is no FOSS or proprietary image editor with such an effect… :slight_smile:

This is the kernel I used for convolution. The fade is likely too strong; hence the weak rays.

blur

The problem is that the blur is uniformly in one direction for every pixel, which doesn’t appear to be the case in your example.

GIMP does have motion blur. Didn’t follow the code. Perhaps you could take a look.

That problem is resolved via these method.

  1. Diffusion-Tensor
  2. Rectangular-Polar
  3. Angle-based internal convolution.

Zoom Motion Blur in Gimp looks like this:

when I switch in the video editor effect to “Angle” instead of “from Location”
I get this:

So its some kind of Radial Motion Blur I guess…

A web search shows me there is also linear and circular motion blurs… My GIMP installation doesn’t have any of them so I can’t check ATM.

Just tested them in Gimp:

Linear Motion Blur

Circular Motion Blur

Still no effect to just do something like this:

:slight_smile:

Nearest I get with G’MIC Blur Radial,

then mode: “Addition” and original image one layer below:

Which is actually what I try to achive, but still making a shoutout for a new G’MIC Filter…
The name could be " God Rays"…

2 Likes

One weakness of blur_radial is that it increases outward: the outer edges are rather soft and the centre harsh, making it unnatural as a video effect. Here is an example:

Bonus I noticed a new filter Blur [Quad] was added a couple hours ago. You can control the 2 amplitudes; therefore the strength of the blur on either end. First impression is that the percentages in the extremes seem to be more sensitive. Perhaps it has to due with the (non)linearity of the command vs input image.

That was actualy a quick prototype I did, but it lacks in many ways, and I’m not sure I’ll finish this one. I have other ideas to allow more interesting “illumination shapes” (not only quad-shaped), with diffusion tensors and tunable perspective.
Not sure when I’ll have the time to do that, but it’s on the TODO list, for later.

I have other ideas to allow more interesting “illumination shapes”

I am curious :stuck_out_tongue:

That effect reminds me of Antonino Perricone’s Luce plugin for Photoshop.
There is also a GIMP version that is based on the source code for the Photoshop plugin.

2 Likes

This is exactly what I was looking for!!!

Thank you very much for the link.

luce

I ask @Carmelo_DrRaw to add this into the next .AppImage build of Gimp:

I can confirm that source code is available, so it should be theoretically possible to gardner knowledge from it to make a gmic version and make it available for many other image editors.

1 Like

And there is always room for improvement. From what I can tell, I think the GIF in the OP has the edge.