Director Terry Gilliam said he hoped Heath Ledger would be proud - Film clips courtesy of Metropolitan
Director Terry Gilliam has said he would never have completed his fantasy film The Imaginarium of Doctor Parnassus without Heath Ledger.
"The closing credit says 'By Heath and Friends' because the film changed with his death," Gilliam said as it premiered at the Cannes Film Festival.
"He forced me to make changes and we wouldn't have finished it if it wasn't for Heath."
Ledger died of an accidental overdose in 2008 halfway through filming.
Gilliam said that Ledger had inspired everyone else on set.
"Heath was enjoying himself so much and he was ad-libbing a lot, which I don't normally allow... but Heath was just brilliant at it and he got everybody else going," he told AP.
"Everybody was just energised by Heath. He was extraordinary. He was almost exhausting because he had so much energy."
Terry Gilliam (second from right) celebrated his film's premiere
Gilliam's career has been marked by setbacks, including prolonged battles with studio executives over his films Brazil and The Brothers Grimm (also featuring Ledger).
In 2000 Gilliam's fantasy epic The Man Who Killed Don Quixote folded after a few days after a series of mishaps.
And when Ledger died during Gilliam's latest venture the director said his first thought was to give up.
"Fortunately, I was surrounded by really good people who insisted that... we had to go out and find a way of finishing the film for Heath," he said.
Gilliam went on to cast Johnny Depp, Jude Law and Colin Farrell to play Ledger's character in the remaining different episodes of the movie.
In the film Ledger's character is the mysterious and no-good Tony.
He joins Doctor Parnassus's extraordinary travelling theatre after the troupe save him from death by hanging.
Many critics gave the film a warm assessment after a press screening on Friday.
However, The Imaginarium of Doctor Parnassus was being shown out of competition at the festival.
For those films vying for Cannes's coveted Palme d'Or prize the wait is almost over to find out this year's victor.
The movie showcase ends on Sunday night - but only after the awards ceremony has revealed the big winner.