Earlier this year, we wrote about the nightclub district in the German city of Hamburg that painted its alleyways with a hydrophobic substance to bounce pee back at public urinators. And now San Francisco in the US is following suit, using an ultraviolet coating to discourage people from going to the bathroom wherever they like.

Hydrophobic paint is inspired by natural materials, such as the lotus leaf, and works by chemically repelling liquid off its surface. That means whenever someone decides to urinate on a wall coated with it, the wall will effectively 'urinate' right back at them. It's pretty much the closest science comes to karma.

So far the San Francisco Department of Public Works crew has painted 10 frequently urinated-on walls in the city with the coating, and has shown that instead of letting urine stream down the wall, it bounces it back - potentially onto the public urinator's clothes or shoes. The goal is to encourage people to hold it until they get to a public restroom.

The local police already fines people up to US$500 for public urination, but this doesn't seem to have done much to discourage the act, with the Department of Public Works already having to steam clean 325 public areas this year because of urine damage, the department's director, Mohammad Nuru, told CNN.

No details have been released yet on exactly what kind of paint is being used on the walls, but if the German equivalent is anything to go by, it doesn't come cheap, with Hamburg officials telling Reuters that it cost around US$700 to spray a 6-square metre area.

However, when you compare that to the cost of the damage to public areas and clean-up crews required as a result of public urination, that's not too bad. "We saw this report on the Internet and thought it looked interesting," Nuru told the San Francisco Chronicle back in March. "It's costing us a lot to send teams out and do clean-up."

Nuru also admitted to CNN that they know the paint isn't a cure, but they hope it will at least get people thinking twice about where they go the bathroom. Here's the video on the Hamburg hydrophobic walls that started this whole thing:

We're just relieved that governments aren't turning to laser-etched hydrophobic materials just yet, because those things bounce liquid off their surface so aggressively, they could do some serious damage.