How do I create a dynamic material that retains information after being interacted with?

I need to create a material (I assume dynamic) that when you’re playing in the world, every time that my character touches it with his feet, it needs to leave a footprint behind. Plus, I need that the footprints remain on the surface with the material until the game stops. Do you have any ideas of how to achieve this?

I appreciate any advice on this. Ty!

https://www.youtube.com/results?search_query=ue4+footprints