Animated gradient curve along path

Hey Folks,

I’m a absolute beginner!
I am trying to show the following effect: along a curve, a kind of pulsating gradient should run at certain intervals. This should look like current pulses. These should also have a small bloom effect.
Can someone give me some hints or a code example. Unfortunately, I am already failing with the gradient along the curve.

Many thanks in advance!

Any chances of sharing a picture or video that shows what you are looking for?

Hey Mugen87, thanks for the anwser.
I like to create somthing like this:

Hard to see on a white background. better on dark… sorry for bad png

One way to add gradient is via vertex colors. You will have to add vertex colors as buffer attribute to the line geometry.

As a short demo, here is what I get when I add vertex colors:

1 Like

Pretty much exactly what I need! Could I please get the code?
Thanks a lot!

In your first post you asked for hints or code. I feel bad that my hint did not help you.

It might be better if you try vertex colors by yourself – this will give you the power to update the code later on and to introduce new modifications. Anyway, here is the code:

Off-topic details

Considering your first post, my humble advice is this.


First of all, thank you for your post! Also for the off-topic, maybe I even learned more. :slight_smile: I never thought about it before. I didn’t want to be rude, but now I won’t use it anymore.

Also thanks for the code example. I’ll expiriment a bit with it and study it. Normally I would have preferred to come up with a solution myself to connect a few more synapses, but I needed this solution very badly and your solution helped me a lot.

Thank you very much,

1 Like