When humans at last reach the surface of Mars, one of the first things they may need to do is dive beneath it.

WATCH: HOW CAN A NATIONAL MONUMENT HELP US LIVE ON MARS? Researchers are mapping lava tubes at the Craters of the Moon National Monument in Idaho in hopes that their findings might help the explorers use lava tubes on the red planet for shelter.

Their work not only helps us better understand our planet’s geologic past, but it will also allow scientists to learn more about potential subterranean living on other worlds. (Find out why Elon Musk thinks a million people could live on Mars by the 2060s.)

The team created the new scans using LIDAR, or light detection and ranging, which uses laser pulses to scan an environment and create a three-dimensional view of the terrain. The team’s powerful laser scanner can detect the detail and texture of a surface down to millimeters without requiring external lighting.

Such scanning is data-intensive, requiring several tens of gigabytes of storage, and mapping a single location can take several days. But the more scientists can discover about the features and hazards that are common among lava tubes, the better mission planners can decide how to explore and exploit them on the moon, Mars, or elsewhere.

"Part of the ultimate goal is to get a collection of lava tubes mapped,” says NASA planetary volcanologist W. Brent Garry. He eventually hopes to mount similar scanning equipment on a small rover and remotely map alien lava tubes.

With the Craters of the Moon project, “we’re showcasing what LIDAR can do,” he says. “It’s both a ground truth and a reality check.”

Entering the Underworld

On my first day with the NASA team, I joined Garry on a mapping expedition inside Indian Tunnel. Like other lava tubes, this natural cavern formed when a lava flow cooled on top, insulating the river of hot rock underneath. After the lava had run out, it left behind a roughly circular tunnel.

With 30-foot ceilings and an 800-foot expanse, Indian Tunnel seems like the entry hall to an underworld realm. But it is also relatively accessible, which may have encouraged members of the Shoshone and Bannock tribes to use it centuries ago for temporary shelter, to locate water, or to store meat in a cool place. Two large Native American-made rock rings still sit near the tunnel’s entrance, possibly used as campsites or in ceremonies.

During my visit, a young girl appeared at the skylight-like entrance to the cave. "It’s huge! We gotta go in!" she shouted to her family. (Park visitors are encouraged to explore these caves, provided they have the right permits and safety gear.)

Once inside, the power of flowing lava can still be seen in the rocks. The floor is a ropy, uneven texture, and cooled dribbles of lava hang from the ceiling and walls, as if someone had smeared on too much paint.

Scientists have found signs of an extensive network of lava tubes underneath the Martian surface, too. Some mission planners are betting these will be just the thing to keep early settlers safe.

The red planet is a punishing place for life as we know it, and visitors will need protection from intense radiation, dust storms, and temperature extremes. The ancient Martian caves may come with additional perks, such as reservoirs of water and traces of microbial life.

That’s assuming they can find caves on Mars that are easily accessible.

Indian Tunnel isn’t too hard to climb in and out of, but even for people in hiking boots carrying only a notebook and a camera, it requires some scrambling. Four people helped carry the mapping equipment from the car. This is clearly not the setup that will be brought to explore another planet.

“How’d you like to do this in a spacesuit?” Garry asks me.

“No, thank you!” I reply.

Rover Risks

The next day, Garry is accompanied by Steve Squyres, principal investigator of the Mars Exploration Rover mission, and Angela Latona, a math and science teacher from Boston. The main entrance to Boy Scout Cave, which they’d wanted to scan, is barred with a metal gate. Several valiant attempts to belly crawl their way in don’t work.

The team surveys the sinuous pāhoehoe lava around them, searching for something to scan. Viewed from a distance, this relatively young volcanic landscape is not obviously beautiful. It looks tarred, as if scorched by dragon breath. Yet up close it is stunning, iridescent, and sculpted like cake frosting.

A short distance away, Garry spots a large pit. At well over a hundred feet across, it is similar in size to some pits seen on the lunar surface, though not as deep. Garry is upbeat as he sets up the scanning equipment.

“Alright! Science time!” he calls. “This should be a good exercise to see what you can get from scanning at the surface.”

View Images W. Brent Garry, Steve Squyres, and Andrea Jones discuss the challenges of exploring space in between taking scans. Photograph by Danielle Venton

Sending astronauts into unmapped lava tubes on the moon or Mars would be unsafe, so rovers, perhaps connected to the surface by a tether, will likely be sent ahead of them.

Squyres, who has overseen the Spirit and Opportunity rovers, imagines trying to send a robotic scout around the jumbled, rocky rim of this pit. He doesn’t like the odds.

“There’s a huge difference between equipment that you can get to work in the lab and what you can deploy and rely on in the field. It’s an enormous gap,” he says.

On the moon or Mars, “you’d really have to pick the right target and give a lot of attention to safety. I’m sure it’s a problem that will eventually be solved, but it’s a difficult one.”

Blazing a Trail

Still, solving the logistics of how to explore other planets is why analog studies exist, says Brian Shiro, because “everything becomes harder when you’re encumbered by space equipment.”

Shiro is a researcher with the Hawaii Space Exploration Analog and Simulation, or HI-SEAS, project, a Mars simulation supported by NASA. He’s also done two simulated Mars missions in habitats run by the Mars Society.

In the HI-SEAS simulation, perched on a Hawaiian volcano, “astronauts” use a nearby lava tube to take shelter during emergency simulations like mock solar storms. Since tunnels vary widely in shape and texture, it’s good to be near one that’s easy to walk into, Shiro says. (Find out what it’s like to spend a year in the HI-SEAS habitat.)

Someday on the Martian surface, finding those easily accessible shelters may be lifesaving. And that’s where Garry’s LIDAR maps can come in handy. The resulting scans can now be shared with engineers and designers planning future Mars missions, so they can study the best possible paths in detail.