2D GLSL ripple filter for mouse clicks.

A shader/filter for adding a ripple effect when you click your mouse.
It’d be good for a menu or options screen just to add a bit of glamor to your project.

mouse_click_ripple.blend (413 KB)

nice work, I can use this for wrectified, in assemblies so you get visual feedback if the part is reconfigurable or not.

Sure, if you want the ripple to activate on something other than a mouse click just update the mouse position and reset the timer to zero. There are some parameters in the script you can change too if you want to change the ripple size.

Hello. That looks great! Unfortunately I can’t test it because I work on a PC without GPU for the moment. But next week, I’ll have my another PC to make real tests. Good day and go on with your nice works!

EDIT: Shaders from Martins Upitis work on my PC (intel HD 4000). I don’t know why your shader don’t work.


EDIT2: Ok that works when I replaced:

vec2 powers = pow(deltaTexCoord,2.0); line 30

by

float power1 = pow(deltaTexCoord.x,2.0);
float power2 = pow(deltaTexCoord.y,2.0);
vec2 powers = vec2(power1, power2);

Nice effect!

Thanks, I guess not having a GPU was why you were using the older version of Blender. I was too for a long time, I preferred the single texture mode because of increased compatibility. I’m no expert on shaders or filters, I can see when they are working or not on my own computer, but guessing if they would work somewhere else is beyond my powers, so thanks for finding the fix.

I’m just messing around with them at the moment to get an idea of how they work. I think they could be useful for some effects, but I don’t want to sink a lot of time in to them.

I actually combined functions from three different shaders to make this one, so there’s probably other stuff that’s not perfect as well.

Quite an interesting shader. Is it possible to make it so that if you spam click it doesn’t wait for the next ripple effect and instead adds another one?

I’m sure it is, but I’m not sure how. :slight_smile:

My mother-in-law has a similar thing on her phone when you unlock the screen by swiping, so I wanted to make it like that, it leaves like little trails of ripples on screen…

However, I’m having trouble finding an easy way of stacking effects in a shader, I’ve seen examples where people use a kind of texture buffer, but that’s beyond me right now. Maybe with a bit more research I can find a way, or maybe I’ll spend another 2 days not doing anything useful. :slight_smile: Well, I guess as long as I’m learning a new skill it’s always useful.

that effect (ripple wave) could be a nice telekinetic blast wave or similar effect.

Hello! I tried to play with your ripple shader to make rain splash in the pool…

http://www.mediafire.com/download/cqbz2g3msnt0q5h/testShaderPluie2.blend

The result is not very convincing, but if someone have some ideas to make it better (add randomness…), that’s fine!

And congratulations for your second kid Smoking_mirror!

I’m looking for this kind of effect that can be used in the Video Sequence Editor. Will it work there, or can it be adjusted to work there?

Hi Youle, I missed this post until now. Thanks for the congratulations! :slight_smile:
I tried the raindrops filter but it had a very low frame rate on my computer. I’m not sure how to improve it though…

The principles would probably be the same, but unfortunately I don’t know anything at all about the Video Sequence Editor. I should probably learn, as I’ve been using Microsoft movie maker to make my movies and it’s not very good. :slight_smile: