We all love bowtie pasta—or farfalle, for you fancy types. The only problem with pasta like bowties, elbows, and rigatoni: Their convoluted shapes mean that when they're shipped, they take up a lot of room.

On average, even if you packaged something like rigatoni perfectly, over 60% of the volume you’re shipping will be air. That can be a big deal when dealing with the rising costs of transporting goods.

So some researchers at MIT decided to solve the problem with some creative food chemistry: They created shape-shifting food that starts off flat and then pops into 3D form when boiled.

For their research project, which was presented at the Association for Computing Machinery's 2017 conference, scientists created a film of gelatin with two different layers, each of a different density. The top layer is denser, which allows it to absorb more water. As the different layers expand at different rates, the formerly flat pasta ribbons curl up to form a 3D formation.

To make consistent pasta shapes, the scientists had to figure out how to control the curling—so they came up with a way to 3D-print strips of cellulose in different patterns onto the top layer. These pieces won’t suck up much water, which makes it keep parts of the top from curling. The result? The ability to make all sorts of designs.

"We did many lab tests and collected a database, within which you can pick different shapes, with fabrication instructions," said study co-author Wen Wang, Ph.D., a research scientist at MIT’s Media Lab. "Reversibly, you can also select a basic pattern from the database and adjust the distribution or thickness, and can see how the final transformation will look."

Besides the transforming noodles, the researchers also suggested that people could reproduce comparable effects with more common methods, such as screen printing. "We envision that the online software can provide design instructions, and a startup company can ship the materials to your home," said lead author Lining Yao, Ph.D. "With this tool, we want to democratize the design of noodles."