Create a fictional family of four. Visit them once a year, filming them as they grow older and more self-aware over a period of 12 years. Then edit the material into a feature film that runs close to three hours and borrows its title, “Boyhood,” from Tolstoy.

It sounds like a stunt. But the result is the year’s most captivating narrative experiment, and possibly the most engrossing coming-of-age movie in the history of the genre.

Perhaps the key to Richard Linklater’s new film is his generosity, which has been evident in many of the movies he’s directed over the past couple of decades, beginning with “Slacker” and continuing with “School of Rock,” “Bernie” and the trilogy of romantic movies “Before Sunrise,” “Before Sunset” and last year’s “Before Midnight.”

Ethan Hawke, who grew up on-camera in the trilogy, is back, growing up again but in a very different context. He plays the kind of character who might easily be dismissed as a deadbeat dad, but Linklater’s script lends him a grace that rescues him from stereotypes.

Unlimited Digital Access. $1 for 4 weeks.

Patricia Arquette’s role as his ex-wife is given a similar complexity. While she starts out as a divorced woman who makes dubious choices in men, she grows up to embody the role of encouraging matriarch. When we see the life-changing impact of one of her seemingly casual remarks, Linklater could be quoting “It’s a Wonderful Life.”

He gets away with it because the moment is earned. There are no conventional melodramatic flourishes, no corny or contrived touches, no simplistic villains. Even an abusive second husband is given a shocking gasp of self-hatred that raises the whole movie to another level.

None of it would have worked if Linklater had not chosen the right actor to play Mason, the dreamy youngest child of the family who starts out as a first-grader and ends up headed for college. (The director’s daughter, Lorelei Linklater, has the smaller role of their other child.) Ellar Coltrane could have dropped out at any point. He might have been unequal to the scope of the project. He could have gone in another direction entirely. But Linklater gambled with a still-forming talent and filmed the process with an intimacy that feels miraculous.

John Hartl: