In the low-slung hills of El Salvador, building a house is not an easy task. The land is vulnerable to earthquakes, flooding, volcanic eruptions. The roads are rugged, electricity sparse. For the past several years, New Story—a housing charity based in San Francisco—has built over 150 homes there, replacing tarps and scrap metal shelters with houses that have proper roofs and floors. It's slow, painstaking work in a country where nearly a third of the population is without shelter.

About a year ago, the company wondered if there was a better way to build. In the three years since it launched, New Story had gathered the funding to construct 1,300 homes and had completed 850 of them—but that felt like a drop in a bucket. "There are over 100 million people living in slum conditions in what we call survival mode," says Alexandria Lafci, New Story's cofounder and COO. "How can we make a big dent in this instead of just solving incrementally?"

The idea they landed on: 3-D printing.

Using traditional building methods, it takes New Story eight months to build a community of 100 homes, like this one in Leveque, Haiti. Adam Brophy/New Story

For the past 10 months, New Story has tinkered away with construction technology company ICON to design a 3-D printer for building homes in regions of the world that lack the economic resources to house their poorest citizens. Today, the companies are showing off the fruits of their labor: a 350-square-foot structure in Austin, Texas, and the first 3-D-printed house in the country built to local housing code.

The Texas house is just a prototype of the fast, cheap, and sustainable home design the company hopes to bring to El Salvador, Bolivia, Haiti, and Mexico. Using current traditional methods, it takes New Story eight months to build a community of 100 homes, which cost about $6,000 each. With a 3-D printer, it says it can build one home a day at a cost of $4,000 per structure. If New Story succeeds, the first people to live in a 3-D-printed town won't be the technologists or the futurists of Silicon Valley. They'll be people in the world's poorest regions, who most need a roof over their heads.

Open House

A decade ago, when 3-D printing promised to usher in a second industrial revolution, many saw the potential of using 3-D printers to make buildings. An architect could make a tiny model of a new home design using the resin or plastic filament in a desktop 3-D printer, then employ a similar but much larger machine to spit out a life-size version of that same design using concrete and other familiar building materials. The method looked to be cheaper and faster than traditional building, and it used fewer resources—you only print the materials you need, down to the drop.

Architectural features like curved walls, normally expensive and difficult to build, become effortless with a 3-D printer. "You could print a house in the shape of a Fibonacci spiral if you wanted to," says Jason Ballard, cofounder of ICON. "It's just as simple as printing a square."

In 2013, the world of 3-D-printable buildings belonged to WinSun, a Chinese construction company that successfully printed 10 houses in a day with a proprietary mix of cement, sand, and recycled materials. It would later print a six-story apartment, an office building, and a 11,000-square-foot mansion. (The company also suggested it could print Donald Trump's border wall between the US and Mexico.) Since then, other companies have joined the race to print buildings, creating tiny houses and apartments and tree houses with specialized 3-D printers that extrude mortar like an inkjet.

Last year, the Russian company Apis Core showed off a printer that could build a house on the spot. That house, painted orange and shaped like an igloo, cost about $10,000 and took less than 24 hours to fabricate. Like New Story, Apis Cor hopes its technology can address housing shortages in poor areas. "Using our technology we can build houses faster, cheaper, and qualitatively enough with a small number of people involved," says Anna Cheniuntai, Apis Cor's head of marketing. "It allows us to provide affordable housing for a lot of people in short period of time."