On the monitor screen, Tom Hanks’s eyes, in extreme closeup, flickered through a complicated sequence of emotions: hatred, fear, anger, doubt. “Cut!” Lana Wachowski shouted. The crew on Stage 9 at Babelsberg Studio, near Berlin, erupted in a din of professional efficacy, preparing for the next shot, while Hanks returned to his chair to sip coffee from an NPR cup. Lana and her brother, Andy, who are best known for writing and directing the “Matrix” trilogy, were shooting “Cloud Atlas,” an adaptation of David Mitchell’s 2004 best-selling novel of the same name.

The novel has six story lines, and the Wachowskis and their close friend the German director Tom Tykwer, with whom they’d written the script, had divided them up. They were shooting at Babelsberg, using the same actors, who shuttled between soundstages, but Tykwer had an unplanned day off. Halle Berry had broken her foot while on location in Mallorca and he needed to wait for her full recovery to shoot a chase scene. And now there was another problem: the actor Ralph Riach, who played a small but crucial role in one of the story lines that Tykwer was working on, had fallen ill and been hospitalized, and his state was progressively worsening. Tykwer had been on the phone with Riach, and the prognosis was, at best, unpredictable. Tykwer, with a bad cold and a large scarf around his neck which resembled a Renaissance millstone collar, had stopped by the Wachowskis’ set to discuss the situation.

The filmmakers huddled near the monitor and in low, concerned voices debated whether to wait for Riach to recover or to hastily find a replacement and reshoot the scenes he’d already appeared in. The decision: they would wait, even if it meant prolonging the shooting schedule. “The rocket ship is falling apart,” Lana said afterward, shaking her head. “We’re sitting in this capsule, can’t get out, only one engine working—and we have to make it to the end.”

In the Wachowskis’ work, the forces of evil are often overwhelmingly powerful, inflicting misery on humans, who maintain their faith until they’re saved by an unexpected miracle. The story of the making of “Cloud Atlas” fits this narrative trajectory pretty well.

In the spring of 2005, Lana and Andy Wachowski were at Babelsberg running the second unit for the director James McTeigue’s “V for Vendetta,” which they also wrote and co-produced. Between scenes, Lana (who is transgender and, until 2002, was called Larry) noticed that Natalie Portman, the star, was engrossed in a copy of “Cloud Atlas.” Portman raved about the book, so Lana began reading it, too. She and Andy, who is two and a half years younger, have retained a childhood habit of sharing books, and soon both of them were obsessively parsing the novel and calling friends to insist that they read it.

Mitchell’s book is not a simple read, with its interlocking stories and a multitude of characters, distributed across centuries and continents. Each story line has a different central character: Adam Ewing, a young American who sails home after a visit to an island in the South Pacific, in the mid-nineteenth century; Robert Frobisher, a feckless but talented Englishman, who becomes the amanuensis to a genius composer in Flanders, in the nineteen-thirties; Luisa Rey, a gossip-rag journalist who rakes the muck of the energy industry in nineteen-seventies California; Timothy Cavendish, a vanity-press publisher who finds himself held captive in a nursing home in present-day England; Sonmi~451, a genetically modified clone who gains her humanity in a futuristic Korea, ravaged by consumerism; and Zachry, a Pacific Islander who struggles to survive in the even more distant future, after “the Fall,” which seems to have endangered the planet and eradicated much of humankind. These characters are connected by an intricate network of leitmotifs—a comet–shaped birthmark crops up frequently, for instance—and by their ability to somehow escape the fate that has been prepared for them. The book’s dizzying plot twists are infused with lush linguistic imagination. For the Zachry sections, Mitchell constructed post-apocalyptic mutations of the English language, which effectively force readers to translate as they go.

“As I was writing ‘Cloud Atlas,’ I thought, It’s a shame this is unfilmable,” Mitchell told me. But the Wachowskis found themselves instantly, and profoundly, attracted to the idea of adapting the book for the screen. They were drawn to the scale of its ideas, to its lack of cynicism, and to the dramatic possibilities inherent in the book’s recurring moments of hope. They also wanted to work on something with Tykwer, whose 1998 movie, “Run Lola Run,” they’d loved (“our long-lost brother,” Lana called him), and “Cloud Atlas” seemed like the right project to unite their cinematic sensibilities.

In 2006, at the Wachowskis’ prompting, Tykwer took the German translation of “Cloud Atlas” with him on a vacation to the South of France. “It was a mistake,” he told me, with a laugh. He sat on the beach reading for days, “stressed and inspired” by the book; when his wife finally persuaded him to go on a day trip, he made her pull the car over so that he could finish a chapter. The moment he was done with the novel, he called Lana in San Francisco, where it was the middle of the night, and breathlessly declared his commitment to the plan.

He and the Wachowskis, who were in the middle of other projects, had to wait a couple of years before turning to “Cloud Atlas.” But finally, in February, 2009, they met in Costa Rica, where they had rented a secluded house near the ocean. Before they began to work on a script, they acknowledged that it might prove impossible to make “Cloud Atlas” into a movie, and that they might not be able to work together. “Writing is the most intimate process in the artistic development,” Tykwer said, and there was no way to anticipate how things would go. Then they got started: boogie-boarding in the morning, working the rest of the day, then preparing dinner together. Andy’s “world-famous” chicken roasted on a beer can was often the main dish on the menu. “It was like a childhood camp,” Lana said.

The main challenge was the novel’s convoluted structure: the chapters are ordered chronologically until the middle of the book, at which point the sequence reverses; the book thus begins and ends in the nineteenth century. This couldn’t work in a film. “It would be impossible to introduce a new story ninety minutes in,” Lana said. The filmmakers’ initial idea was to establish a connective trajectory between Dr. Goose, a devious physician who may be poisoning Ewing, in the earliest story line, and Zachry, the tribesman on whose moral choices the future of civilization hinges, after the Fall. They had no idea what to do with all the other story lines and characters. They broke the book down into hundreds of scenes, copied them onto colored index cards, and spread the cards on the floor, with each color representing a different character or time period. The house looked like “a Zen garden of index cards,” Lana said. At the end of the day, they’d pick up the cards in an order that they hoped would work as the arc of the film. Reading from the cards, Lana would then narrate the rearranged story. The next day, they’d do it again.