Before taking on the role of Elton John in “Rocketman,” Taron Egerton met with Jamie Foxx and Rami Malek, who played Ray Charles and Freddie Mercury in musical biopics. (David Appleby/Paramount Pictures)

“Rocketman” is the first big-screen adaptation of the life and music of singer-songwriter legend, Sir Elton John. The film, which opens Friday, was executive produced by . . . Sir Elton John.

It was also co-produced by John’s husband, Canadian filmmaker David Furnish, and the songwriter had a say on everything from the script to the daily footage, which was sent to him from the set while he was on his Farewell Yellow Brick Road tour.

John’s involvement came with unrestricted access to the source material, but it also raises the question: How do filmmakers make a movie that has both creative and historical integrity about a music legend who’s still alive — and, what’s more, involved?

Dexter Fletcher, who directed “Rocketman” from a script by Lee Hall (“Billy Elliot”), had two advantages from the start. First, he had a mandate from John to “be honest,” which he took almost as a dare. He recalled his first meeting with the artist, who has racked up five Grammys, an Oscar and is in the Rock-and-Roll Hall of Fame, over lunch in Las Vegas, where he began peppering John with basic questions.

“And then I touched on something that was maybe a little bit darker, in terms of his own personal battles and demons,” Fletcher said. “And he was really open, and said, ‘Oh, let me tell you about this!’ — and spoke very candidly. And he didn’t know me!”

Even though John was keeping a virtual eye on the production over Fletcher’s shoulder, “I never received a phone call saying, ‘Uh, you can’t do that — that’s not allowed,’ ” the director said.

Fletcher’s other benefit was that he didn’t set out to make a biopic. Instead, he made a musical — a fanciful fantasia in which John, played by Taron Egerton, recounts the formative moments of his life through song, recontextualizing the semi-autobiographical lyrics by John’s longtime collaborator, Bernie Taupin. This liberated Fletcher from the constraints of biographical precision. Even though all of the film’s stories “have a foot in reality,” Fletcher favored emotional honesty over accuracy.

“Anyone recounting the story of their life — you know, there’s things that we get wrong, or that we misremember,” Fletcher said. “That gives it a freedom, creatively and imaginatively, to start then bringing in songs where they’re appropriate for the story, rather than where they actually happened chronologically.”

That approach heeds the advice of Oscar-nominated screenwriter Oren Moverman, who wrote “I’m Not There” and “Love & Mercy” — unconventional portraits of Bob Dylan and Brian Wilson, respectively. Both artists had the power to squash or censor the final products, but they essentially gave Moverman free rein. His modus operandi: Simply listen to the music.

“You have to really make that your guiding principle,” he said. “I’m of the belief that, in making a biopic about a musician, what you’re trying to do is create a musical structure for a movie. And in doing that, you try to unpack and understand and interpret the music, and find what is the best sort of concept that fits that particular artist.”

In “I’m Not There,” six actors — including Christian Bale, Heath Ledger and Cate Blanchett — portrayed seven personas from Dylan’s career and catalogue. In “Love & Mercy,” Moverman focused on two Wilsons — the “Pet Sounds” genius battling with mental illness in the 1960s, and the sedated Wilson under the thumb of a tyrannical psychotherapist in the ’80s. Paul Dano played the former, and John Cusack played the latter.

“The mistake that you can make, and we do make all the time,” Moverman said, “is that your instinct is for impersonation, and for telling a story that’s really rich because these are big lives that have so many details to them. So, in a way, it’s almost a more sane approach to start with the reason this person has the spotlight on them — and that is the creative part of their life.”

“What makes me excited,” he added, “is because their music is a creative invention, the movie can be an invention.”

Even when inventive, though, these films have to present unflattering or unpleasant facts about their subjects — from addiction to adultery — if they’re to be honest. Moverman always meets with his subjects first and asks them what they’re afraid of having included, not to whitewash their past, he emphasized, but to respect the artist and to get at the real truth of their life.

“I was very nervous, but I was also very thrilled and honored,” Brian Wilson said, by email, of “Love & Mercy.” “How many people get a movie told about their life? I wasn’t worried, because I trusted them.”


John and Egerton on the red carpet before the film was screened at the Cannes Film Festival. (Stephane Mahe/Reuters)

Taylor Hackford had the trust of Ray Charles, with whom he was in constant dialogue during the 15-year development of Hackford’s biopic, “Ray.” The writer-director said he often had to pry details and psychological truths from Charles — such as Hackford’s thesis that Charles was fueled by “surviving son syndrome” after the tragic death of his little brother — but that the soulster never asked him to bowdlerize anything about his life.

“He said: ‘Taylor, you just tell the truth. I can live with the truth. It may not be pretty, but I can live with it,’ ” Hackford recalled. “I didn’t want to do an exposé, but I did want a warts-and-all kind of portrait of him, because I think those are the most interesting.”

Hackford knows he was lucky to receive such faith. But he also argues that it’s actually worse when the subject is dead — “because the legacy is usually controlled by children, or lawyers, or people in the estate,” he said. “And they never want to tell the truth.”

Both scenarios were present in last year’s Queen biopic, “Bohemian Rhapsody,” which Fletcher completed after director Bryan Singer was fired mid-shoot. The star figure, Freddie Mercury, died in 1991, and his portrayal was overseen by his living bandmates, Brian May and Roger Taylor.

The result was a massive crowd pleaser that earned more than $900 million and four Academy Awards — but was also harshly criticized for sanding off the hard-rocking band’s rough edges and mischaracterizing Mercury’s sexuality. That can also occur when the artist is living: Cary Grant played Cole Porter in 1946 while the celebrated composer was still kicking. “Night and Day” isn’t held in high regard — among other things, it obscured Porter’s homosexuality and watered down his lyrics.

“Rocketman,” on the other hand, is rated R, and far more forthcoming about John’s foibles and his sexuality.

“It’s harder for Freddie to defend himself, and so he has to be approached, maybe, in a particular kind of way,” Fletcher said. “Whereas Elton’s here, and if people have issues with certain aspects of how the story’s told, he can stand up and tell us the truth. He can defend himself.”

As for the challenge of playing a musical legend, Egerton did his homework. He met with Jamie Foxx, who played Ray Charles, and Rami Malek, who won an Oscar for his performance as Freddie Mercury.

The actors didn’t offer any advice, only encouragement.

“I was nervous, because I was very keenly aware that I wanted to make some of the darker moments quite raw, and quite” — Egerton paused — “unflattering, to be totally honest. I think I had some trepidation about whether [John] would tolerate that. But he’s not precious, and he’s not vain in that way. He’s very at peace with his struggles, and he recognizes that they form part of who he is.”