If you're going to make camouflage, may as well copy from the best, and one of the best the world has to offer is our peculiar eight-armed pal the octopus.

Engineers have been inspired by the cephalopod's ability to change the texture and colour of its skin to create a new, programmable material that can morph from 2D to 3D and blend in with its environment.

Cephalopods such as octopuses and cuttlefish are the true masters of animal disguise (we've included some videos down the end for your enjoyment).

Thanks to colour-changing chromatophores in their skin, as well as light-reflecting iridophores and leucophores, they can alter their colour in a second, which is useful for menacing predators as well as hiding.

Their other trick is changing the shape of their skin. Their skin has highly muscular sections called papillae that can be deformed to change the texture of the animal's skin, even drastically altering it and appearing to change its shape.

By expressing their papillae, octopuses and cuttlefish can blend into rocks and corals, and even mimic other sea creatures. For the soft and squishy cephalopods, it's their primary defence mechanism.

It's the work of these papillae that engineers from Cornell University, led by James Pikul and Robert Shepherd, have drawn on for their new material.

"Lots of animals have papillae, but they can't extend and retract them instantaneously as octopus and cuttlefish do," said cephalopod biologist Roger Hanlon of Woods Hole Oceanographic Institute, who collaborated with the engineers.

In the European cuttlefish, he explained, there are at least nine sets of these papillae, each of which can transform from a flat two-dimensional skin to one of about a dozen different shapes, all controlled individually.

The team's material, shown in the image below, consists of a fiber mesh embedded in silicone rubber. This mesh is layered in such a way that sections are constrained during the transformation process, allowing some parts to expand when activated when inflated with air - much like the muscles in the skin of an octopus.

materialShepherd et al., Science

"Engineers have developed a lot of sophisticated ways to control the shape of soft, stretchable materials, but we wanted to do it in a simple way that was fast, strong, and easy to control," said lead researcher James Pikul, now of the University of Pennsylvania.

"We were drawn by how successful cephalopods are at changing their skin texture, so we studied and drew inspiration from the muscles that allow cephalopods to control their texture, and implemented these ideas into a method for controlling the shape of soft, stretchable materials."

The team created two iterations of their idea: one that can form into the shape of grey pebbles, and another that forms into the shape of the succulent plant Graptoveria amethorum.

But it could be scaled up quite easily, and implemented with any pair of materials that have the stretching response, the team wrote in their paper. These could include hydrogels, for instance.

As to applications for the material, it could be used for transforming 3D displays, or to help study animals in the wild while disrupting their environment as little as possible.

Doubtless there are also potential military applications for the material, given that the research was funded by the US Army Research Office and the US Air Force Office of Scientific Research.

That's a way into the future, though. Although we know the mechanisms whereby octopuses and cuttlefish can change their shape and colour, it turns out replicating those mechanisms is a very tricky thing to accomplish indeed.

The research has been published this week in the journal Science.