An illustration of the Spongesuit bikini top created by the team of engineers and designers.

When most people swim in the ocean, they're likely not thinking about how they can mop up pollution as they splash around, but a team of researchers has created a 3D-printed bathing suit that could do just that.

Engineers from the University of California, Riverside, teamed up with designers from Eray Carbajo, an architecture and design firm based in New York City, to design a bikini that can absorb contaminants from water while a person swims. The suit keeps the materials locked up in its fabric.

The bikini is molded from a 3D-printed, netlike structure made of synthetic rubber and a reusable and recyclable padding made from a material called Sponge. [Gallery: Futuristic 'Smart Textiles' Merge Fashion with Tech]

Sponge is a new material that engineers at UC Riverside started developing four years ago. Researchers were trying to create a useful technology to help clean up oil or chemical spills, or desalinize water. The engineers created Sponge from heated sucrose (a compound found in sugarcane) that was modified on the molecular level. The material is highly porous, which means that it can easily absorb other substances but it is also hydrophobic, which means that it doesn't absorb water. This means if you put Sponge in an oil and water mixture, it will absorb the oil but will not absorb the water.

"This is a supermaterial that is not harmful to the environment and [is] very cost-effective to produce," Mihri Ozkan, a member of the research team and an electrical engineering professor at UC Riverside's Bourns College of Engineering, told UCR Today, the school's online news publication.

Sponge can absorb up to 25 times its own weight. The contaminants are trapped in the inner pores of the sponge material, so they don't touch the skin, and the suit doesn't release any substance it absorbs unless heated to temperatures exceeding 1,832 degrees Fahrenheit (1,000 degrees Celsius).

The material can be reused up to 20 times before it begins losing its absorbency. At that point, it can be replaced with new Sponge padding, and the old padding can be recycled, so that the contaminants can be safely extracted and dealt with, the researchers said.

It was the partners at Eray Carbajo who decided to incorporate the new material into wearable technology by creating a swimsuit. The final product, dubbed Spongesuit, won this year's Reshape 15 contest in September, an international wearable-technology-design competition. The team was awarded a 1,500-euros prize (about $1,700.00).

"Spongesuit is a preliminary effort to create an actively eco-conscious wearable technology," the team told 3ders.org. "We aim for a future where everyone, with any shape and form of swimming outfit, can contribute to the cleanliness of the seas by a sports activity or simply a leisurely summer vacation."

Follow Elizabeth Newbern @liznewbern. Follow Live Science @livescience, Facebook & Google+. Original article on Live Science.