A new waterproof fabric developed by bioengineers at the University of California, Davis, could help prevent embarrassing sweat stains even during the most intense of workouts and hottest of days.

According to the inventors, unlike more common fabrics such as cotton, which wicks away sweat during light exercise but becomes soaked and clingy as the tempo increases, their fabric works like human skin in that it forms excess sweat into droplets that drain away by themselves.

To do this, the textile uses hydrophilic, or water-attracting, threads stitched into a highly water-repellent fabric in patterns that then suck the droplets of water from one side of the fabric, transport them along the threads and expel them from the other side.

This system, in turn, enables the researchers to change the direction the water is channeled simply by changing the thread patterns.

However, it’s not just the threads conducting the water: the water-repellent properties of the surrounding fabric also help to drive water down the channels.

What’s more, unlike fabrics available today, the water-pumping effect keeps working even when its fibers are saturated – a feat accomplished by the sustaining pressure gradient produced by the surface tension of droplets.

By directing the flow of moisture, the engineers are then able to keep the rest of the fabric dry and breathable.

Eventually, the researchers hope to see the fabric put to use by manufacturers of exercise clothing lines.

“We intentionally did not use any fancy microfabrication techniques so it is compatible with the textile manufacturing process and very easy to scale up,” Siyuan Xing, the lead graduated student on the project, said.

The study was published in the journal Lab on a Chip and was funded in part by the National Science Foundation.