You may feel more than a little queasy when Heath Ledger makes his first appearance in Terry Gilliam’s picture—the one the actor didn’t live to complete—as a corpse dangling from a noose over the Thames. The sense of unease may further increase when Christopher Plummer, playing the supposedly immortal doctor of the title, asks the members of his theatrical troupe who haul Ledger down, “Why are you fishing dead people out of the river?” It’s a question that really haunts “The Imaginarium of Doctor Parnassus,” another of those failed Gilliam fantasies in which anything goes but nothing matters. Why did they bother salvaging the scenes Ledger shot by rewriting the script to allow other actors—Johnny Depp, Jude Law and Colin Farrell—to take up the role in his place, when what existed hardly represented his best work? It would have been better to allow the film to remain unfinished and the footage unseen, since the result does no appreciable service to his memory, and for “The Dark Knight” to have remained the young actor’s swan song.

Still, it must be said that “Imaginarium” isn’t like “The Trail of the Pink Panther,” in which Blake Edwards callously patched together mere outtakes of the late Peter Sellers with newly-shot material to fashion a crass continuation of the popular series. It turns out that Ledger had filmed a considerable portion of the part of Tony, a con-man whom Russian mobsters had tried to execute because he’d stolen a pile of their money in a charity scam. Resuscitated from his near-death experience, he joins the company of wizened Parnassus—the old fellow’s daughter Valentina (Lily Cole); young Anton (Andrew Garfield), the master of ceremonies who’s infatuated with the girl; and dwarf Percy (Verne Troyer). They travel about the crummier sections of contemporary London in a horse-drawn cart on which they offer weirdly archaic performances to an uninterested public; their act involves Parnassus going into a trace that allows people passing through a “mirror” on stage to experience an alternate reality conjured up by the doctor’s apparently very active imagination.

All of which is connected to a bargain Parnassus made with the devil, Mr. Nick (Tom Waits), the elements of which are doled out gradually over the course of the movie, but without adding up. It appears that Parnassus was given immortality—and presumably his abilities—by Nick as part of a wager that stipulated if the doctor couldn’t make five converts to his cause through his mirror apparatus by the time his daughter turned sixteen, he’d have to surrender her to the devil. Apparently in all his thousand years, Parnassus hasn’t succeeded in getting a single soul on his side, since he still needs five as the girl’s birthday approaches. That’s where Tony proves useful; he suggests some strategies to make the theatre more successful. In the process, however, he goes through the portal himself three times. And each time his appearance is altered (something that happens arbitrarily—to another fellow in the prologue, but to nobody else).

In the first transformation, Depp takes Ledger’s place, leading an elderly but rich lady through a shopper’s extravagant paradise to a motel where romance perhaps awaits. In the second, Law plays Tony, escaping the Russian mobsters who tried to kill him and finding promise of enormous financial success atop a high ladder. And in the third, Tony becomes Farrell, in whose form he achieves his ambition to turn his charity scam into an incredible success but must ultimately accept his just deserts.

The picture, however, isn’t concerned with coherent plot; the script instead just serves as a springboard for Gilliam’s flights of bizarre, and pretty much random, visual fancy. His penchant for the peculiar predominates even in the London street sequences, but it’s given full rein in the “behind-the-mirror” episodes, which are riots of color crammed to the brim with his typically outrageous imagery. But all the phantasmagoric stuff is terribly arbitrary, and most of it is pretty ugly—odd all right, but hardly attractive to look at. And it does go on, piling effect on effect until in the end the result becomes tiresome rather than exhilarating.

The actors are little more than pawns against this backdrop, and none of them, Ledger least of all, fare especially well. Plummer comes across like a touring-company King Lear, while Garfield—so impressive in “Boy A”—is reduced to incessant mugging and running about. Waits just does his cooler-than-cool shtick, all costume and cigarette holder without anything behind them—he’s surely no match for Walter Huston’s Mr. Scratch—while Troyer reads his (admittedly rather poor) lines with all the animation of an automaton and Cole proves a curiously colorless damsel in distress. As for Ledger, he certainly acts up a storm, but it’s a generalized sort of performance, with some of the mania but none of the distinctiveness of his Joker. (It must be said, though, that it was courageous—and extremely loyal—of him to work with Gilliam again after the disaster of “The Brothers Grimm.”) Of his stand-ins, it must be said that they were good sports to step in, but only Farrell—who has the most screen time—makes much of an impression. At least he plays it straight, rather than winking at the audience as Depp and Law do.

But the cast’s indifferent work isn’t entirely their fault. Gilliam doesn’t really exhibit much interest in the humans, who play distinctly secondary roles to the director’s oversized visuals and remain largely in their shadow. Nor are they assisted by Nicola Pecorini’s cinematography, which under Gilliam’s guidance favors flamboyance—strange angles, jagged movements, lots of shadows—over concentration on the actors. But one does have to give credit to the behind-the-scenes crew—production designer Anastasia Masaro, art directors Denis Schnegg and Dan Hermansen, set decorators Caroline Smith and Shane Vieau, and costume designer Monique Prudhomme, along with effects supervisors John Paul Docherty and Richard Bain—for realizing Gilliam’s vision so effectively.

Unfortunately, it’s the vision that’s the problem. Like most of Gilliam’s earlier efforts, this one proves that one can have too much imagination, especially when it leaves little room for logic or taste. You might leave “The Imaginarium of Doctor Parnassus” thinking that the fact it’s backed in part by Poo Poo Productions seems oddly appropriate.