Gradient material along spline

And where is the difference between this and solution I proposed?

The same you assign material instance to every spline mesh and adjust its values. But in this case you use DynamicMaterialInstance which is little bit expensive than simple MI )))