Material follow path

Hi,

I want to create a material that change material following a path.

For example, the black part is rock, the red path is rock too, but by the time, the path change is material from rock to light following the path.

Legend:
Black = Rock
Red = Path that change from rock to light
Blue = Light

Thank you very much!

Is it possible to animate a vertex color change in matinee?