Is it possible to change the Niagara mesh material depending on the floor it spawned on top of?

I want to make it so it spawns debris rocks with the material it spawn on top of. Or something simular