Writer and director Mike Mills. (Melina Mara/THE WASHINGTON POST)

Looking back, Mike Mills says, the signs were there.

Growing up in Santa Barbara, Calif., where his father, Paul, was the director of the Santa Barbara Museum of Art, Mills recalls that, as contented as his parents’ marriage seemed to be, “there were really hard-to-point-out, really hard-to-express voids, or holes.”

When he was 18, Mills’s oldest sister “sort of indicated that Pop was gay or had some relationships in the past,” Mills, now 45, recalled during a recent visit to Washington. “But then, in the way that families are sort of magically non-talking, that was it. I never said anything to my parents, because it would be just too destructive. But it wasn’t impossible to imagine. My dad bought all my mom’s clothes and wore nice little cravats.”

Twenty years later, Mills’s mother, Jan, died, an understandable blow to his father, who had known her since junior high school. Mills immediately feared that his father would be next. “He was 75, and he was a widower. He didn’t know how to cook. I was helping him figure out how to defrost food.” Then, suddenly, Paul Mills announced that he was gay and proceeded to throw himself with gusto into romantic relationships and the local gay community.

“All of a sudden — bang, he’s out,” Mills said. “And it’s like he’s younger and he’s totally different — totally more engaged, engaging, emotionally alive. And it was wonderful because it was like, ‘Okay, he’s not going to die.’ And not only was he not going to die, but he’s super alive . . . in ways that are messy and uncontained and in some ways more challenging but in all ways way more present.”

Then, in a supremely cruel irony, his father had lung cancer diagnosed just five years later, succumbing to the disease in 2004, the year before Mills’s first film, “Thumbsucker,” came out. In a crucible of grief, awareness of his own mortality and the desire to come to terms with his parents’ confounding emotional legacy, Mills began to write a screenplay while he was on the road promoting “Thumbsucker.”

The script — which encompasses the denial and frustrations of his parents’ story, his own thwarted attempts at intimacy, snippets of American social and political history and a telepathic Jack Russell terrier — became a vessel “for me to put anything that I felt an affinity with or anything that helped me understand, ‘Okay, this is who I am’ or ‘This is my dad, this man I’m deeply curious about and I’m really not done with.’ ” And it eventually became a movie: “Beginners,” starring Christopher Plummer as the fictionalized father figure, Hal; Ewan McGregor as Hal’s son, Oliver; and Melanie Laurent as Anna, a fetching actress Oliver meets soon after Hal’s death.

“Beginners” essentially follows two story lines, one featuring Oliver and Hal, the other with Oliver and Anna. (The film also includes flashback sequences with Oliver’s mother, Georgia, played by Mary Page Keller.) Mills decided to film the two segments separately, in chronological order, an approach that McGregor says made a surprising difference to his performance.

“I used to think it was a little bit of a gimmick and not really of value,” McGregor said in a phone conversation. “But I realized that it was really, really helpful. With Christopher, with that story and his passing away, we were working towards the moment when he dies. So when we finally played that scene, you had the whole story behind you. In the second part [of the movie], when Oliver’s looking back and remembering, I could actually . . . remember those scenes with Christopher. That’s the thing about Mike, he does everything he can to give the acting as much room as it needs to be deep and moving and real.”

Toggling between recollections of Mills’s childhood, the period just after his father came out and the time immediately after his death, “Beginners” is deeply inscribed with the material culture of his own life, from his parents’ fabrics, folk art pieces and Tiffany lamp that he used to dress the Richard Neutra house where Hal spends his final years to the drawings, graffiti and photo montages that evince Mills’s own early career as a graphic artist.

After graduating from New York’s Cooper Union, Mills pursued graduate studies at Hunter College and began working as a graphic designer. In 1988, he saw Errol Morris’s “Thin Blue Line,” and his vision shifted. “That movie was like, ‘Oh, Mike, that’s what you’re trying to do,’ ” he recalls now.

Making music videos for such musicians as Moby, Yoko Ono and Air, Mills perfected the spontaneous, observational technique that has come to be his signature. The approach reached its apotheosis in 1998 when his video for Air’s “All I Need” became a cult hit, overlaying documentary material of a young skater couple in Ventura to the band’s jazzy, ethereal love ballad. (He made a documentary in 2007 called “Does Your Soul Have a Cold,” about people taking antidepressants in Japan, that’s available on iTunes.)

Even when he’s working with fictional material, Mills says, he approaches it as a documentarian. “There’s something about. . . the empathy that’s required to be a documentary filmmaker that really suits my personality more than the draconian yelling narrative film director,” he notes.

One piece of nonfiction that isn’t in “Beginners” is Mills’s marriage to artist and filmmaker Miranda July (“Me and You and Everyone We Know”). Although observers will be tempted to see Oliver and Anna’s romance as an analogue for Mills’s and July’s relationship, Mills insists that the only person Anna is based on is himself.

“Anna’s emotional architecture is all stuff I know about intimately,” he says, adding that “it’s really easy for me to write female characters. As a slightly-more-emotional-than-most straight guy, I can put all my stuff on women, and no one questions it. If I put all my stuff on a straight guy, people would be like, ‘Is he normal?’ If you give guys too much emotion, they’re neurotic or they’re sad sacks. Or feminine.”

As deeply personal as “Beginners” is, it’s just as profoundly generational, chronicling the anxieties around intimacy and commitment that seem to have reached epidemic proportions in children of the 1960s and ’70s. Those issues, the film suggests, perhaps weren’t caused by but were at least connected to the repression and stiff-upper-lip stoicism that characterized the previous generation.

“I felt like I was doing a portrait of my people,” Mills says of Oliver and Anna’s approach-avoidance dance. “I hate that phrase ‘commitment problems’; it’s so diminutizing. I think these people love other people; they have no problem joining, starting, initiating and loving. But they don’t have the tools or the knowledge or the path through the forest that lets them get past all that turbulence and paradox and ambiguity that a real relationship requires. And that was definitely . . . something that my gay dad taught me a lot about and my straight dad didn’t really teach me that much about.”

Still, Mills stops short of claiming that “Beginners” gave him anything resembling closure. “People often ask, ‘Was this cathartic?’ ” he said. “It’s not like there’s resolution. I come out of this project as confused about my parents as I entered it. But I . . . did really enjoy having this strange extended time with them. And I do feel like maybe I understand them a little bit more from just writing from their perspectives. I think that should be Therapy 101.”

Beginners

opens Friday at Landmark’s E Street Cinema and Bethesda Row.