As images of Princess Diana and James Dean float by, Heath Ledger utters, “Nothing is permanent, not even death.” In the moment, Ledger’s character is embodied (in an alternate reality) by Johnny Depp, but the eerie resonance lingers just the same. In the end, “The Imaginarium of Dr. Parnassus” is as much a meta film about Heath Ledger’s death as anything else. The narrative simply isn’t strong enough to distract from the “was this changed or not?” game, as the movie falls apart in the last hour.

The story centers around Tony, a young man found with no memory at the brink of death by the magical Dr. Parnassus (Christopher Plummer), his daughter and his two trusty followers. Tony is portrayed by Ledger, except for three extended scenes that take place within the ‘imaginarium’ — a Tim Burton-esque world created by the Doctor’s imagination. In those scenes, Depp, Colin Farrell and Jude Law, who signed on to the film after Ledger’s passing, play Tony.

Director and writer Terry Gilliam claims that, besides the re-casting in the imaginarium scenes, the plot remained unchanged by Ledger’s death, but that is simply not possible. Tony’s changing appearance is made essential to the story, and the final twenty minutes were clearly rewritten so they could take place in the imaginarium rather than the real world (where Farrell, instead of Ledger, could embody Tony). Unsurprisingly, the film falls apart under the strain into nonsense.

What makes this so frustrating is that the film shows much potential early on. The concept is fresh and whimsical: the stage is set clearly and cleverly, as Dr. Parnassus makes a gamble with the devil to save the soul of his daughter. The stakes are clear and exciting, the daughter’s love triangle sizzles and the imaginarium scenes delight. Yet, suddenly, about an hour into the two-hour film (right after the mall scene, for those who have seen the movie), everything devolves into confusion. Characters stop acting logically, the plot stops making sense and the imaginarium sequences begin to feel self-indulgent. The first half of the film is full of Ledger, while he rarely appears in the second.

The performances are strong throughout. Plummer does his best Dumbledore impression with a twist as the wise magician. Depp, Ledger and Law all bring charisma and spark to their scenes, and Andrew Garfield and Lily Cole refuse to get lost in the mix as the young lovers. Garfield is rumored to be in the running to play Peter Parker in the “Spiderman” reboot, and he certainly has the chops for it.

But despite the performances, it is Ledger, of course, who remains the most transfixing. Alternatively charming and mysterious, Heath’s final performance is certainly not his best, but the film might be a fitting end to his career. Much like his life, “Imaginarium” is full of talent, determination and potential, but does not develop in the way anyone would hope, ultimately incomplete.