A new trend in sustainable brewing that I hadn't heard about: turning wastewater, or gray water, into beer. The Bay Area's Half Moon Bay Brewing already tried this trick last fall, in an effort to show how the brewery could reduce its drinking water consumption. Now researchers in Belgium have come up with a solar-powered machine that, through a very simple process, turns urine into drinkable water, which they then want to use to make beer.

As Reuters reports, University of Ghent researcher Sebastiaan Derese and his team have built a machine that can operate off the grid to provide a new source of drinking water in developing countries. It uses a solar-powered boiler to heat the urine which is then passed through a membrane to separate out any potassium, nitrogen, phosphorus or other minerals — which can then be used as fertilizer.

NASA has developed a similar device that's been used on the International Space Station to recycle urine and sweat into drinking water, but Derese's machine is being employed in a more fun and useful capacity: turning about 1,000 liters of urine from attendees at a music and theater festival in Ghent, much of it likely derived from beer drinking, back into beer. The beer hasn't been made yet, but Derese is trying to find a brewer willing to try it, using all this recycled water.

"We call it from sewer to brewer," Derese says.

CNet points out that this machine is almost exactly like what Kevin Costner's character rigs up in Waterworld to recycle his pee.

It may sound gross — yep, I agree! — but a blind taste test of two versions of the Half Moon Bay beer last fall, one brewed with gray water and the other with normal drinking water, proved the recycled-water version passed muster and even tasted less hoppy and bitter. And it could be a good solution for beer-makers when it comes to water usage, since it typically requires three or more gallons of water to make one gallon of beer.

It's currently illegal in California, however, to reuse gray water in taps or to sell any products made with it.

Related: The 15 Best Beers From Local Bay Area Breweries