From the time Whitney Houston was 18, everyone wanted a piece of her.

By the time the beloved, troubled, once-in-a-generation talent died at 48, she was IN pieces — a broken, tormented soul exhausted by the pressure of decades in the brightest of spotlights, troubled romantic and family relationships, and years of drug abuse that ravaged her body and chopped up her voice.

But when all was right, Lord could Whitney sing, and she could light up a room, an arena, a universe with her breathtaking beauty and her megawatt smile and her effortless charisma.

In the alternately exhilarating and heartbreaking documentary “Whitney,” the Oscar-winning director Kevin Macdonald (“Touching the Void,” “The Last King of Scotland”) does a magnificent job of taking us through the paces of Houston’s life and times, from her childhood in Newark to her rocket-ship ascension to international superstardom to myriad personal ups and downs to the shocking, crack-fueled descent that destroyed her career and led to her leaving this world far too soon.

It’s been more than six years since Houston died in an overflowing bathtub at the Beverly Hilton Hotel. Her story has been told in countless TV segments, a forgettable Lifetime biopic in 2015 and Nick Broomfield’s solid, downbeat documentary “Whitney: Can I Be?” from last year — but “Whitney” offers the most comprehensive and intimate portrait yet, thanks in large part to Macdonald’s unprecedented access to Houston’s family members and close associates.

(Notably absent from the roster of interviewees: Houston’s best friend, longtime employee and rumored love interest, Robyn Crawford. However, more than one interview subject confirms their lesbian relationship. One close associate describes Houston’s sexuality as “fluid.”)

Interviews with various relatives and close family friends, and with Houston’s infuriatingly obtuse and arrogant ex-husband Bobby Brown, add a new layer of understanding and insight into some of the pivotal moments in Whitney’s life — most of those moments dark and damaging.

Macdonald takes us through the well-known touchstones of Houston’s career, from the adolescent Whitney finding her voice as a gospel singer in church and learning to develop her instrument under the tutelage of her mother, Cissy Houston; to Whitney’s meteoric rise as a recording and touring artist in the mid-1980s; to adding “movie star” to her resume in the 1990s; through the highlights such as the concert to honor Nelson Mandela in South Africa and the national anthem Super Bowl performance, to the infamous lowlights such as the Diane Sawyer “crack is whack” interview and the disastrous comeback tour of 2010.

We get goose bumps watching Houston’s performances on comically dated MTV shows and in concert, and we see how it easy it was to fall in love with her when we see home-movie style footage of Whitney backstage, Whitney joking around with family and friends, Whitney in relatively unguarded moments.

At one point a drained Whitney is backstage after another sold-out performance. Her mother tells her to ignore the recent successes of Janet Jackson and Paula Abdul and to keep being Whitney. Houston agrees but says of Abdul, “Mama … they brought her into the studio … and she’s STILL off-key mama.”

Macdonald expertly drops in snippets of sometimes extraordinarily candid interviews with Brown, Cissy; Whitney’s half-brothers Michael and Gary (aka Gary Garland, former DePaul basketball stalwart); Kevin Costner, Whitney’s co-star in “The Bodyguard”; and her sister-in-law Pat (executor of Whitney’s estate and a producing partner on the documentary), among others.

Houston’s half-brothers acknowledge they didn’t do all that much work but they did a whole lot of partying while spending years on Whitney’s payroll. Costner talks about how extraordinary it was at the time for a black woman to be the movie star who runs down the stairs and kisses the hero at the end of the movie.

Brown, on the other hand, comes across as a giant pile of … denial, as he refuses to answer questions about Whitney’s addictions and says drugs had nothing to do with her life.

And yet they had everything to do with her death, buddy.

The most shocking revelation comes late in the film, when we’re told Houston was molested by a (now deceased) relative when she was a little girl. This makes it all the more tragic when we hear the details of Whitney and Bobby essentially abandoning their daughter for long stretches at a time, or partying in front of her. Little wonder the teenage Bobbi Kristina Brown wanted to get high and higher and higher. Although there’s no evidence or suggestion they physically abused their daughter, the neglect and carelessness is unquestioned and devastating.

Three years after her mother’s death, Bobbi Kristina Brown was found face down in a bathtub in her home. She passed away after being in a coma for nearly six months. Watching “Whitney,” you feel as if the girl never had a chance.

After I saw this doc, I went home and cued up “The Bodyguard.”

It’s borderline camp. It is NOT a good film. Some of the dialogue is cringe-inducing and some of the supporting characters are ridiculous clichés. But Costner is Costner, doing his low-key everyman antihero thing, and Whitney Houston sparkles like a star throughout.

She was beautiful. She was magnetic.

And when the demons were at bay, my but could she sing.

★★★1⁄2

Roadside Attractions presents a documentary directed by Kevin Macdonald. Rated R (for language and drug content). Running time: 120 minutes. Opens Friday at local theaters.