As a child, David Sedlak was inspired by Frank Herbert’s sci-fi novel Dune, which depicts a desert world where people wear “stillsuits” to capture their water waste and distill it for reuse.

Today, as a UC Berkeley expert on water — Sedlak is the author of the 2014 book Water 4.0 — he says that cities may soon have to develop their own version of the stillsuit to recycle wastewater, from storm runoff to household sewage, for drinking.

Some cities are already doing that. By passing water through a material called a reverse osmosis membrane, adding a small amount of hydrogen peroxide and exposing it to ultraviolet light, engineers in Orange County, California, have been turning what used to be considered useless wastewater into drinking water for more than 25 years.

The practice, called potable water recycling, is spreading, despite the yuck factor. Sedlak’s research team at Berkeley has developed technologies to improve the treatment processes. They can detect and further treat trace amounts of chemical contaminants that might make it through the recycling process.

But more must be done, he says. By investing in our neglected water infrastructure and replacing large, centralized treatment plants with more dispersed, automated plants, we could move a long way toward making the most of what is becoming our most precious resource.

In this five-minute video, recorded in May at the Cal Future Forum, Sedlak describes what the future may look like as our planet’s water resources become more unpredictable because of a changing climate.