Philip Metzger has been playing with mud. Experimenting, you could say, as he’s a planetary scientist at the University of Central Florida and co-founder of NASA’s Swamp Works lab. In any case, his lab has been stuffing Martian clay into cupcake decorating bags and extruding it into what Metzger himself admits sometimes look like an “animal dropping.”

But one man’s cupcake decorating with mud is another man’s prototyping of 3D-printing on Mars. And 3D-printing could solve the single biggest hurdle to a crewed Mars expedition: the cost of transporting everything humans need to survive on the red planet.

It’s a mass problem. The more mass you have to take, the more expensive it is to escape Earth’s gravity and get to Mars. And some of the heaviest cargo will be material to shelter astronauts from the radiation zipping through Mars’ thin atmosphere. With 3D-printing, you don’t need to bring shelter. You build it out of dirt or ice already on Mars.

NASA is all aboard the 3D-printing train. Last year, it unveiled winners of its first 3D-printed Mars habitat design challenge, and the architectural renders of the winning entries were all sleek and futuristic, as renders of unbuilt buildings always are . In reality, the current state of the art for Martian 3D-printing looks more like the clay logs Metzger has been documenting on Twitter.

If the technology looks low-tech, it’s deliberate. “We’re rethinking how to do space technology by taking cues from less developed parts of world,” says Metzger. The logic goes like this: If a valve breaks in a complex machine on Mars, an astronaut can’t go online to order a replacement with next day delivery. (It’s more like nine months, assuming Mars and Earth are in their most favorable alignment.) So the idea is to start simple and slowly build up technological capabilities: clay to metal to plastic to electronic equipment. Eventually, Mars will have the refineries and factories to make complicated machines itself. This is “bootstrapping,” and it’s Metzger’s vision for space exploration.

* * *

Should you ever find yourself doubting human ingenuity and persistence, spend a few minutes with the mesmerizing YouTube videos of Primitive Technology.  In each video, a man—unnamed, silent, dressed only in shorts—goes out into the Australian outback with his bare hands. He might dig up some clay, make a coiled pot, and fire it in a small fire. He then goes back to the clay pit with his pot, this time able to carry more clay, and gathers enough material to build a kiln. He gets even more clay, makes tiles, and fires them in the kiln. Eventually, weeks later, he has an entire tiled hut, complete with mud walls and an underfloor heating system.

Each individual step is slow and unremarkable, but their cumulation—a tiled hut out of bare hands!—is awesome. This is bootstrapping, on the scale of one man.

American colonists, argues a 2011 NASA paper on space exploration, also bootstrapped their way through North America. They arrived with a few tools   and scrabbled out a living in the harsh, unforgiving environment of New England. Simple pools begat more sophisticated tools, and over time, North America built up the shipyards and ports that turned it into a trading power. “Like colonial America, the growth process is a very slow and methodical,” the paper reads, “It will take years to evolve but in the end a very permanent infrastructure will emerge that will change how humans explore and develop space.”

In space—an environment where “harsh” is an understatement—bootstrapping might start with more sophisticated technology: robots. Robots are easier to send than humans, with their finicky needs for oxygen, food and water. But these robots, like the man in the Australian outback, will likely start with extremely simple tasks like digging up dirt. Dirt that could be turned into roads, blast walls, or shelters with enough 3D-printing ingenuity.

Metzger became intrigued by the idea when he realized Mars may have the same clay minerals as Earth. (The same is true for asteroids, which could be used as depots for interplanetary travel.) No one and nothing has ever returned to Earth with Martian dirt, of course, but probes and rovers of the decades have picked up chemical signatures hinting at the clay minerals.

So to test whether 3D printing clay could ever even work on Mars, he had to figure out how to simulate Martian clay on Earth. It helps that laws of chemistry and physics are the same. “You have chemical interaction on the surface of Mars that produce some fairly predictable products, like clays and sulfides,” says Daniel Britt, a collaborator and geologist at the University of Central Florida. “ And you know there’s environments on Earth that do the same thing.” The team called around to state geologists’ offices to find the mines with the different kinds of clay minerals to make Mars “simulant.”

With Mars simulant in hand, Metzger’s team wanted to test it in a vacuum chamber to mimic Mars’ thin atmosphere. Clay shrinks as it dries. And things dry very quickly in Mars’ thin atmosphere, which means the Martian simulant shriveled into shapes with little structural integrity.

This is a problem on Earth, too, though to a lesser degree, and Metzger points out, humans have come up with a solution. We don’t usually build walls out of big slabs of clay. Instead, we make bricks, fire them, and then lay them together with grout. “What we’re doing is investigating other methods to handle shrinkage,” says Metzger. “We don’t have to have a complicated grouting process.” That could mean adding soft squishy material—on Earth, this is usually straw; on Mars, it could be recycled spaceship material—to deal with the shrinkage. The key, again, is simplicity. The fewer different machines necessary, the fewer parts that can potentially break, and the easier it will be to keep construction on Mars humming.

By Metzger’s own account, this work is extremely early stage—as in extruding with a cupcake decorating bag rather than a 3D-printer early stage. This fast, cheap prototyping is the ethos of NASA’s Swamp Works lab, which Metzger co-founded and is still collaborating with after he retired from the space agency to work at the University of Central Florida.

Another disadvantage is the clay is that it requires water, which is frozen underground on Mars. Behrokh Khoshnevis at the University of Southern California has come up with a waterless method of 3D-printing on Mars. “We’re using material that is abundant on Mars. That is sulfur,” says Khoshnevis. His method uses sulfur as the binding agent in concrete; the catch is that the sulfur needs to be liquid (melting point 239 degrees F) and that requires a lot of energy via solar panels.

Whichever method ends up working, bootstrapping is about more than exploring space. Implicit in the argument for bootstrapping is an argument for colonizing space. The Apollo missions to the moon were “sorties”—in and out, everything you need is on the spaceship. If humans are actually going to build colonies or mines in space—and Metzger very much wants to—bootstrapping provides the technological blueprint for doing so. After all, bootstrapping is an accelerated version of technological development on Earth.