A general formulation approach for the fabrication of water repellent materials: how composition can impact resilience and functionality