Unfinished Symphony.

The second installment of Friday’s triple-threat, Terry Gilliam’s The Imaginarium of Dr. Parnassus is an often meandering, occasionally magnificent beauty, and a film that I expect will satisfy Gilliam fans, and those with a tolerance for his indulgences, more than it does people just looking to take in Heath Ledger’s last curtain call.

To be honest, this motley extravaganza ends up running a bit too long. And Parnassus is a ragged carnival at that, becoming more inchoate as it spins its wheels. Plus, Ledger’s final performance, alas, is mostly just set-up without the follow-through — Other actors play the meat of the character. Still, despite the movie’s very visible faults, Imaginarium nonetheless feels like a loving throwback to the days of Gilliam’s “Trilogy of Imagination,” particularly Time Bandits and The Adventures of Baron Munchausen. (In fact, Gilliam now argues that this film replaces Brazil in that trilogy.) And, if, like me, you have any fondness for the old-school, crazy-cartoonist, anything-can-happen Gilliam, Imaginarium is a very worthwhile experience nonetheless.

True, Parnassus is nowhere near as good or as perfectly formed as Brazil, which remains Gilliam”s magnum opus. (Although one reason this movie may have that “classic” Gilliam feel to it is the presence of co-screenwriter Charles McKeown, who helped pen Brazil and Munchausen, and appeared in the former as “Harvey Lime,” Sam Lowry’s desk-mate.) Nor is it as taut and self-contained as the three quality entrants in Gilliam’s “Trilogy of Americana” — The Fisher King, 12 Monkeys, and Fear and Loathing in Las Vegas. All that being said, Parnassus is the best movie Gilliam has made in over a decade, and it definitely allows him the chance to let his freak flag fly.

For Imaginarium centers on a portal — a magic mirror — that keeps leading into a “world of pure imagination,” one that bears some unmistakable glimmers of the old Monty Python scrapbook-cartoons. Kept in the possession of an immortal sage named Dr. Parnassus (Christopher Plummer, in the plummiest (Plummiest?) role he’s had in years), this mirror has been used as a field of not-so-friendly wagering between he and the Devil (Tom Waits, a casting coup) for thousands of years. Through this garden of Gilliamesque delights wander the unknowing souls who happen upon Dr. Parnassus’ roadshow and walk through the mirror. And, more often than not — people being people — they make lousy decisions and end up in the bad company of Old Nick.

Now, thanks to another ill-advised bet with the Devil, the eternal soul of Parnassus’ only daughter, Valentina (Lily Cole), is at stake. And, given that this good Doctor only has two allies in the world — Percy, his diminutive and long-suffering #2 (Verne “Mini-Me” Troyer), and a young orphan lad named Anton (Andrew Garfield) — it doesn’t look like there’s much help on the horizon. (Troyer, by the way, [a] cannot act worth a damn and [b] seems game for pretty much anything. But Garfield is really good. I kept thinking “Who is this guy? he’s solid” throughout. And, unlike Sam Worthington, he actually seems deserving of some of the Next-Big-Thing hype he’s getting right now.)

Anyway, as the tarot cards predicted, Dr. Parnassus’ troupe encounters a hanged man underneath a bridge (Ledger — yes, this intro is more than a bit eerie now.) Once revived, this fellow — Tony, formerly a charity organizer who ran into trouble — is something of an X-Factor in the age-old battle between Parnassus and the Devil. Whose side is he on? Well, as it turns out, he’s on Tony’s side. And, once he gets wind of the mirror, and the world that lies on the other side, he finds himself contemplating, almost despite himself, how he might best take advantage of the situation…

So, the elephant in the room — Heath Ledger. As it turns out, The Imaginarium of Doctor Parnassus represents both an amazing stroke of luck and a mild disappointment. The stroke of luck is that very few stories out there could accommodate Ledger’s unfinished turn as well as this one. Here, the fact that Tony’s appearance changes every time he steps into the mirror-world — he becomes Johnny Depp, Jude Law, or Colin Farrell — feels almost intuitive and organic, as if it could have been written this way in the first place. But that being said, most of Tony’s major character-beats happen in the mirrorverse, and so Ledger’s role in “our” world — which is mostly just set-up — feels unfinished all-the-same.

In fact, “unfinished” is a good way to sum up both the weaknesses and the strengths of Imaginarium. About 20 minutes in and after several early mirror-world reveries, right as we venture into the past to witness the Doctor’s first Faustian wager, I was thinking this was turning out to be easily one of Gilliam’s best films. But the movie loses its way in the muddled middle going, and by the time, late in the show, when Valentina dances with the Devil in the pale mirrorlight, I had sorta emotionally checked out of Parnassus. (Even then, it’s still fun to watch random items well up from Gilliam’s mindscape — say, the upscale shopping mall and dowdy, pearl-clutching madam of Brazil (“My complication had a little complication“), or the fantasy-on-the-social-fringes aspects of The Fisher King. There’s even a random musical number — sung by policemen in fishnets, no less — which just about screams Monty Python.

So, yes, Ledger’s performance seems only half-there, and the rambling story at hand could’ve probably done with some screw-tightening. But, Imaginarium also feels “unfinished” in a happier sense. Whether this was a strange example of kismet or the script was tinkered with after Ledger’s passing, several of the scenes — most notably Johnny Depp’s — seem to comment directly in tribute to the fallen actor. (“Nothing is permanent, not even death.“)

And in a sense, the whole movie works like that too. As we find out in flashback, Dr. Parnassus once headed a devout order of shamans committed to the Tinkerbellish proposition that, so long as somebody was telling a story, the universe would always continue to exist. Similarly, so long as people keep watching The Dark Knight or The Patriot, I’m Not There or Brokeback Mountain, Ten Things I Hate About You, or, yes, The Imaginarium of Dr. Parnassus, so too will Heath Ledger.