How to create mesh shape-based gradient?

I am new to UE4 and cannot find find any info about material gradients, which can follow mesh shape. Is there any way to imply somrthing like this on the picture?
I would like to create emissive material, based on such hexagon-mesh gradient mask.


You can do this through vertex painting such a mesh and applying a vertex color node in the material, or some smart uv-unwrapping and a little math in the material editor. both are fairly cheap and easy to do.