A tent that blocks light on a sunny day and becomes transparent and waterproof on a dim, rainy one could be an outcome of work by US scientists.
The new material can change between two states when stretched, altering both its transparency and its roughness.
The team from Harvard's Wyss Institute have published their results in the journal Nature Materials.
The work was inspired by tears, which, when grouped together, form a coating over our eyes with multiple functions.
Joanna Aizenberg and her colleagues produced an elastic thin film material with nano-sized pores. This material is then coated and infused with liquid.
At rest, the material is smooth, clear and flat; droplets of water or oil on its surface flow freely off it.
But when it is stretched, the liquid coating the film recedes into the expanded pores, exposing their edges and reducing lubrication, causing it to become rougher. This rough surface also makes the material more opaque.
The researchers were able to make every droplet of oil or water placed on the material to run or stop in its tracks (a response which the team describes as "pinning"), simply by flexing the material or letting it relax.
A video demonstration can be seen here.
"The new material is a liquid-infused elastic porous surface, which is what allows for the fine control over so many adaptive responses above and beyond its ability to repel a wide range of substances," Prof Aizenberg explained.
"A whole range of surface properties can now be tuned, or switched on and off on demand."
In addition to the tent idea, the researchers say another possible application of the research could be highly precise, self-adjusting contact lenses that also clean themselves.
Another might be pipelines that can optimise the rate of flow depending on the volume of fluid coming through them and the environmental conditions outside.
The new material was inspired by tears, which perform many functions in the eye.
Individual tears join up to form a dynamic liquid film that helps maintain optical clarity, while keeping the eye moist, protecting it against dust and bacteria, and helping to transport waste away.
The latest work builds on a system developed by the team called Slippery Liquid-Infused Porous Surfaces, or Slips. This is a coating that repels liquids such as oil, water and blood.
However, Slips was rigid, whereas the new elastic surface allows for fine control over its function.