LOS ANGELES — When British director Stephen Daldry first met his cast for “Extremely Loud & Incredibly Close,” he did not start by asking their thoughts about 9/11, the precipitating event in Jonathan Safran Foer’s novel on which the movie is based.

He skipped a presentation about how he planned to depict Asperger’s syndrome, the disorder affecting 11-year-old protagonist Oskar Schell, or how he intended to shoot New York City, as much a character in the film as anyone in the story.

Rather, he asked Tom Hanks, Sandra Bullock and newcomer Thomas Horn to cook lunch.

The request wasn’t a contrivance to find out how much bossing the actors would take from the three-time Oscar nominee behind “Billy Elliot,” “The Hours” and “The Reader.” Daldry wanted to see what kind of family these performers could construct before the film’s plot would tear them apart.

“We weren’t rehearsing the movie,” Hanks said of their impromptu cooking at the home of screenwriter Eric Roth, “but the relationships in the movie.”

The making and breaking of connections are at the heart of Foer’s novel, which follows an emotionally troubled boy’s quest for the lock that a mysterious key might open after his father dies in the World Trade Center.

And for Daldry, his producers, cast and crew, turning the time-shifting tale into a film was a wrenching journey, with professional ties formed and severed, ideas embraced and discarded, as they struggled to bring the narratively and emotionally thorny story to the screen.

Working with producer Scott Rudin and Daldry, Roth revised the film’s screenplay as many as 50 times. Along the way, a subplot involving Oskar’s mother’s budding romance was filmed and discarded after test audiences objected, meaning James Gandolfini’s part was excised entirely.

Composer Nico Muhly was replaced so late in the game by Alexandre Desplat that Desplat had only four weeks to compose and record a new score, finishing it just days before the “Extremely Loud” prints needed to be made.

Yet along the path of production, any number of wonders helped carry the movie forward, such as Rudin finding his leading boy on a teen version of “Jeopardy!” and the remarkable associations unearthed by the film’s inclusion of an actual 9/11 victim’s photograph.

“Extremely Loud” opened in theaters in limited release on Christmas Day, but the last-minute changes meant that the filmmakers had little time to screen the movie for critics groups, Hollywood award voters and other tastemakers whose endorsements can persuade multiplex-goers to take a risk on a film with such difficult subject matter and an unusual protagonist.

Despite largely favorable reviews, audiences did not particularly flock to the 9/11-themed films “United 93” by Paul Greengrass or “World Trade Center” by Oliver Stone. And while “Extremely Loud” focuses on the aftermath much more than the terrorist attacks themselves, make no mistake: The movie is psychologically wrenching.

“Love and grief on the most serious day of our lives — that’s not an easy thing to bottle up,” said Hanks. “It’s like marbles on the floor — you’re slipping and sliding all the time.”

Daldry and his filmmaking team, though, are convinced that this tale of individual and collective grief is ultimately optimistic and life-affirming, with a hopeful coda tied to a secret message and the reconciliation of an estranged couple — two elements that are not in the book. And even if the story’s family is ripped apart by the attacks, the film ultimately is focused on its reconciliation.

“The story has to be the child finding a way back to his mother as much as the mother finding a way back to the child,” Daldry said. “He now knows he can live without his father. And he didn’t know that was actually going to be possible.”

Seen from a distance, the film’s six-year path to theaters echoes a sentiment shared by Oskar and his father: “If things were easy to find, they wouldn’t be worth finding.”

HARNESSING NOVEL

Rudin and Daldry were together in London on Sept. 11, 2001, working on “The Hours,” and the experience of sharing the shock and sorrow of the attacks cemented their friendship. Years later, Rudin — a fan of Foer’s 2003 debut novel, the World War II story “Everything Is Illuminated” — encountered Foer’s manuscript for “Extremely Loud.” Rudin pictured it as a movie, with Daldry at the helm: “I thought he would understand it,” the producer said.

Rudin enlisted Roth to adapt the story. It was no easy task. The 368-page novel is essentially two separate but eventually intersecting stories.

The primary plot focuses on Oskar. While Foer never tells readers exactly what he suffers from, it’s clear Oskar is on the autistic spectrum — wearing only white, constantly tapping on a tambourine, his mind racing with strange thoughts and utterances. After his father, Thomas, a jeweler, is killed in the terrorist attacks, Oskar finds in the family home a key in an envelope labeled “Black.”

The boy decides, even though he struggles at being intimate with anyone, to locate every adult surnamed Black in New York City to see if he or she knew his father (played by Hanks) or what the key might open.

The novel’s secondary narrative is anchored by the World War II bombing of Dresden, and its silent protagonist — he communicates by writing in a notebook — ultimately turns out to have more relevance to the modern-day story than first imagined. The novel includes inventive flourishes, including photographs, illustrations, colored highlights and overwritten typography.

“The hardest thing to do was harness the secondary story,” said Roth, the Oscar-winning writer of “Forrest Gump” and veteran author of scripts for “The Insider,” “Munich” and “The Curious Case of Benjamin Button.” “The book is like two movies.”

Early on, Roth decided to solve the problem of the two narratives by creating a composite character: He melded the grandfather (played by Max Von Sydow) with a retired journalist who accompanies Oskar on his outings.

Roth tried to turn some of Oskar’s eccentric inventions — he imagines pneumatic tubes connecting all of New York’s boroughs, an ambulance that notifies onlookers if you know the person inside, among countless other creations — into cinematic reality. But eventually he abandoned those. “They were all great ideas,” Roth said. “But the movie would have been completely magical realism. I’m not sure that was in keeping with what we wanted to do.”

About a year and a half after he finished work on “The Reader,” Daldry read Roth’s draft and Foer’s book, and committed to the project.

The 51-year-old Daldry launched his career in the theater — he was the artistic director of London’s Royal Court Theatre and Gate Theatre. It was good training for “Extremely Loud,” because the work is intrinsically more theatrical than cinematic and has at its center that rare literary being: An unreliable narrator who, thanks to his autistic traits, expresses sentiments most everyone else keeps bottled up.

“The boy is willing to articulate his anxieties,” Roth said, “which are the fears that we all have. He says exactly what comes into his head. There’s no subtext — and that literal quality makes him believable.”

In one way of looking at him, Oskar is a younger, modern-day Holden Caulfield of “The Catcher in the Rye,” but instead of being expelled from Pencey Prep, Oskar is sent into an emotional wasteland by a terrorist attack.

The danger in using such a seminal historical event as a narrative linchpin is that a false step in one direction can yield a movie glib and insincere, while a slip-up the other way can produce something maudlin and melodramatic.

“The material is treading a very fine line between sentiment and sentimentality,” Daldry said. “You’ve got to be very, very careful about allowing the emotion to be as true and as respectful as you can.”

In their quest to make the movie accessible, Roth and Daldry measurably scaled back Oskar’s autistic traits, while making his mother, Linda (played by Bullock), more sympathetic, less impaired by her own mourning than she is in Foer’s telling. “We didn’t want to make this a disease-of-the-week story. I thought that would diminish the whole tragedy of the piece,” Roth said.

NEOPHYTE ACTOR

Because Oskar appears in nearly every scene of “Extremely Loud,” casting the role was critical.

Early in the process, Rudin stumbled upon Thomas Horn, who at age 12 won more than $31,000 on a kids version of “Jeopardy!” The son of physicians, Horn is fluent in Croatian and speaks Spanish and Mandarin.

“He’s a very, very smart boy,” said the producer, who was struck by Horn’s intelligence and poise.

But unsure that Horn was the right choice, especially considering he had never acted before, the film’s casting department considered hundreds of other boys before finally coming back to Horn, now 14 and a freshman in high school.

Casting the part was only half the battle — Daldry still had to find a cinematic language to convey Oskar’s telescoped worldview. He consulted with Los Angeles autism therapist Wayne Tashjian in trying to figure out how best to depict Oskar and how he interpreted the world.

“There were two things we wanted to look at,” said Daldry. “One of those has to do with focus — to get the feel of what he’s looking at, what he manages to block out and what he focuses on. And the other is audio — how his mind races sometimes and there’ll be more than one voice in his own head.”

Daldry’s research carried in many other directions as well — including phone calls made from inside the twin towers before they collapsed (answering machine messages from Thomas play a key part in “Extremely Loud”). But sometimes happenstance shaped the production as well, particularly in how a picture was chosen of a 9/11 victim.

In the film, there’s a fleeting but distinct glimpse of a missing-person poster of Daniel McGinley, a 40-year-old father of five whose office was on the 89th floor of the south tower. (One of McGinley’s relatives was a member of the film’s art department, and McGinley’s family approved the use of his image in the movie.)

“Extremely Loud” researcher Anne Mulderry had a son, Stephen, who also died in the south tower. When Daldry showed Mulderry the film, she gasped when McGinley’s image came up. “He died in the same room as my son,” Mulderry said. The very next day, Daldry showed the movie to Terry Sears, whose organization, Tuesday’s Children, works with relatives of those killed in the attacks, and she too knew McGinley and his family.

Finally, Daldry heard from one of McGinley’s brothers that McGinley, who was considering becoming a priest, might have been leading a prayer meeting during the attacks — a gathering attended by Stephen Mulderry. At the last minute, the filmmakers added what the service might have sounded like to the background of one of Thomas’ answering machine messages.

In a way, such seemingly random connections are what “Extremely Loud” is trying to address. We may experience grief alone, but bereavement can in some forms — especially as it relates to 9/11 — be communal and dramatize the ties that bind us.