What “Beautiful Boy” (Amazon) captures best about the raw pain of drug dependency is the sheer randomness of it.

Addiction is not only not a moral failing, it happens in what used to be called “the best of families.” Unfortunately, this very legitimate insight translates here into a tone of smugness.

Nor is the storyline entirely realistic — no one in the film is in financial straits, and insurance, addiction care and support groups are perpetually available. Still, the unrelenting pattern of narcotics use, rehab and relapse will be familiar to anyone who’s ever been caught in the maw of it.

And that’s the point. There are no solutions offered in this drama, no speeches and no moralizing. Addiction doesn’t care about that. It’s an unceasing trudge through a perilous landscape.

There are some discussions about brain damage from crystal meth and how that affects judgment. But this is not by any stretch of the imagination a “message” picture.

The film is based on a pair of memoirs: “Beautiful Boy: A Father’s Journey Through His Son’s Addiction” by journalist David Sheff (Steve Carell) and “Tweak: Growing Up on Methamphetamines” by Sheff’s oldest son, Nic (Timothee Chalamet). Nic became addicted to crystal meth while in high school with occasional later forays into heroin use.

David and Nic’s mother, Vicki (Amy Ryan), are divorced. David lives in in San Francisco with Nic, his new wife, artist Karen (Maura Tierney), and two younger children. Vicki’s based in Los Angeles.

As directed by Felix Van Groeningen from a script he co-wrote with Luke Davies, “Beautiful Boy” establishes Nic’s addiction from the outset. And a series of flashbacks to his childhood show that his father has always been both emotionally available to him and supportive.

David always says all the right things. No matter how he racks his memory, there’s no point at which he realizes he’s gone wrong. Karen is supportive up to the point where she realizes that David is ignoring his other parental obligations.

Nic isn’t trying to compensate for something he feels he has lost. It’s just that drugs make him feel that his world goes “from black and white to Technicolor.” And that’s about as much of his inner life as the movie reveals.

Nic begins to steal from his family to support his habit. There are many confrontations, although few scrapes with law enforcement, a nearly fatal overdose by Nic’s girlfriend, Lauren (Kaitlyn Dever), many trips to rehab, and just as many relapses until David realizes that his interventions only prolong the ordeal and Nic has to figure out being clean for himself.

Those suffering as real-life loved ones grapple with a similar situation may find at least some of these elements relatable. And that’s the moral of “Beautiful Boy,” to the extent that it has one, that no one should have to endure all this alone.

The film contains frequent drug use, a scene of implied non-marital sexual activity and pervasive rough language. The Catholic News Service classification is A-III — adults. The Motion Picture Association of America rating is R — restricted. Under 17 requires accompanying parent or adult guardian.