Colonizing Mars, once an impossible dream, is slowly getting closer to reality, thanks to successes such as NASA’s recent landing of the Insight robot. 3-D printing will be an important part of making that happen. The International Space Station (ISS) has been using printers for years to make special tools, and NASA is hosting competitions for the best printed habitats.

Those uses, however, are only the beginning of how 3-D printing, or additive manufacturing (“additive” for short), can support Mars missions. Thanks to recent advances, additive can now do a lot to make colonization safe and economical, including perhaps the biggest challenge of all, protecting settlers from cosmic radiation.

Unlike conventional production lines, which are customized for each product, 3-D printers can easily switch from one product design to another. That versatility is why printers are so valuable at the ISS. But it also enables printers to generate complex structures impossible to make with injection molding or computer numerical control (CNC) cutting.

Take, for example, the support struts that go into airplanes to keep cabins from breaking apart as a result of the pressure differences in altitude. As Boeing is finding, 3-D printers can make these with honeycomb structures that are just as strong as conventional struts but with much less material. That translates into a lighter aircraft, which saves airlines on fuel. Similar technology is now being studied for satellites and rockets.

Indeed, General Electric just announced that additive-made parts were robust enough for its new GEnx jet engine. That’s a good sign that 3-D printing can handle the rigors of space. The more lightweight parts in a spaceship that we can make with additive, the more stuff we can haul to Mars, and the greater our chances of success there.

Additive manufacturing is about to get even better at weight savings, thanks to what’s called generative design. Additive is an entirely digital process, which means that printers work from digitally-specified design files. If you want to adjust the printed product, you can just tweak the files. But as we’re learning in many areas of life, if an activity can be reduced to digital code, then a computer can probably do it better than humans.

Dassault Systèmes, Autodesk and other industrial software houses are now releasing applications that shift most of the design work to the computer. The human product developer inputs the key constraints and goals for the product, and the computer uses artificial intelligence to generate optimal designs. Because computers aren’t limited to the human imagination, and because 3-D printers have enormous flexibility on shapes, generative design can come up with true breakthroughs.

We might need that design creativity to solve the radiation problem. On the several-month voyage, and then on the planet’s surface, colonists will be bombarded by solar and other cosmic particles. Unless we can figure out protection, we’ll doom them to an early cancer death. Basic structures printed from soil may not be enough, and building underground has its own problems. Another possibility is to envelop the spaceship and habitats with compartments of water. But structures that seal the water and handle the fluid dynamics, while also being space- and Mars-proof, are going to need complex designs indeed.

We’re a long way from making these ideas a reality, even in the 10 years before the first possible manned Mars mission. Fortunately, additive manufacturing is going to attract a lot more investment and development in the next few years. The most important recent advances in additive are currently about making it economical for mass production. Printers can now generate tens of thousands of units at the same cost as conventional manufacturing.

As a result, we’ll see additive spread far beyond aviation into all sorts of industries, including those oriented to basic life systems. And that’s going to help future Martian settlements make customized solar panels, air purifiers, heat exchangers, specialty vehicles, agricultural tools and some items we haven’t realized yet.

No matter how many probes we send in advance, Martian colonists will face surprises and need to improvise with flexible 3-D printers. We’ll have to figure out the feedstock: polymers, metals, binders and other ingredients to send along to go with Martian materials for the broadest possible scope of products. Once we do that, we’ll give settlers the best possible chance at thriving on the Red Planet.