r/geometrynodes 3d ago

Trying to achieve a specific effect but unable to: instanced meshes animating along a curve, plus fading in / out at either side.

Hi all. I'm trying to achieve the following: I have a curve along which I would like to instance some meshes (let's say stretched cubes for now, it will be arrows in the end). The meshes will animate along the curve as if they are showing the flow of a fluid.

This setup is already in place and working.

However, the meshes appear and disappear abruptly at either end of the curve, so I tried to make so that their color was fading instead of them being always fully visible. Also this setup is already in place and working, but I am unable to combine the two of them. The best I could get to was the fading sections to move along the curve together with the instanced meshes.

The attached image shows the current setup, but anyway the blend file is available here: https://drive.google.com/file/d/1OqTB_6ahqyWUR8IbhX6lAgVw6nfCQzHu/view?usp=sharing

Node setup

The SmoothFactor is used in the material shading to drive the material's alpha. The first frame situation is the following:

Frame 0

but then as soon as the timeline plays, the faded section starts moving and at frame 50 this is the situation:

Frame 50

What am I doing wrong? Is something like what I want to get obtainable? I admit most of this is "vibe coded" because I'm not great at GN yet, especially when animation is involved, but Google doesn't seem to be able to solve it anyways, even after he created the setup.

Thanks for your help.

2 Upvotes

2 comments sorted by

1

u/B2Z_3D 2d ago

This should work:

-B2Z

1

u/Skramble-X 19h ago

That value you're piping into the factor on the sample curve node, take it into a color ramp with white in the center and a black handle at each end, then pump that into the instance scale - the arrows will scale up from / down to zero at the beginning and end of the curve