It’s an old truism that an author is often too close to his own work to oversee its translation to the screen. One need only think of the screenplay that Vladimir Nabokov fashioned for “Lolita.” It’s a magnificent piece of writing, of course, but would have never worked on screen, and Kubrick was wise to shelve it and concoct his own. The same principle applies to this adaptation of Salman Rushdie’s 1981 novel. But here, it hasn’t stopped the author from being the guiding spirit behind “Midnight’s Children,” composing a screenplay which has apparently been dutifully followed by director Deepa Mehta. The result is a sprawling, lumbering epic that manages to preserve a substantial amount of the book’s content but achieves little of its magic.

And magic is a central element in “Midnight’s Children,” in terms of both story and style. And in a few instances the film manages to evoke it. One’s hopes are raised at the very start, when the sequence about a young doctor’s odd courtship of a beautiful patient, whom he’s allowed to examine only in part—through a hole in a sheet cordoning her off from him to preserve her honor—captures the wry, affectionate tone of the original.

But the descent following that scene is fairly precipitous. The focus soon shifts to the novel’s larger purpose of personalizing the failure of the promise of Indian independence through the story of individuals caught up in the often-tragic events of the new country’s (or more properly countries’) initial decades. Rushdie’s conceit is that children born in the first hour following the stroke of midnight on August 15, 1947, when British rule officially ended, were endowed with special powers, and that two of them—one a princeling from a fine family and the other a pauper from the slums—were switched at birth. The latter, well-heeled Saleem (Darsheel Safary), possesses the ability to hear the others’ voices in his head and to summon them for ghostly conferences. The former, surly Shiva, proves his nemesis at these meetings. But when his supposed father finds out that Saleem is not his true offspring, he banishes the boy to the household of his aunt, who’s married to Pakistani army officer Zulfikar (Rahul Bose), a martinet integral not only to the overthrow of the civilian government but, in time, to the war that led to the violent detachment of Bangladesh from Pakistan in 1971.

And the naïve Saleem (now played by Satya Bhabha) is caught up in all these events, as also is Shiva (Siddharth) , who has grown into a stern military man himself, a celebrated hero in the army of Indira Gandhi (Sarita Choudhury), portrayed as a tyrant whose belief in supernatural powers leads her to persecute midnight’s children. That brings about a direct confrontation between him and Saleem, who’s one of his victims.

There’s lots more incident and plenty of other characters in the film, but to catalogue them would be as wearisome as keeping them straight while watching the film. Some are lovably colorful (like the elderly magician who becomes a major player in the picture’s last section), but in the end all of them seem like pawns in a tale that in the last analysis has a strong streak of fatalism to it. Rushdie himself intrudes from time to time to deliver narration designed both to explain transitions and comment on events from a position of genially Olympian omniscience, but one gets the feeling that the real function of his interventions is merely to paper over defects of adaptation, a problem exacerbated by Mehta’s literalist approach to material that really needs a more fanciful spirit.

And though visually “Midnight’s Children” has a luscious look, courtesy of Dilip Mehta’s production design, Dolly Ahluwalia’s costumes, and Giles Nuttgens’ cinematography, the central performances are conspicuously weak. That’s especially the case with Safary and Bhabha, both of whom go to amateurish extremes in portraying Saleem’s naivete (a sign either of Mehta’s lack of directorial control or her misjudgment). There’s compensation in the witty turns by Bose, Rajat Kapoor (as Saleem’s doctor grandfather) and Charles Dance, who’s a marvel of imperial haughtiness as the man who turns out to be Shiva’s actual father. But the ineptness at the center is fatal.

One can appreciate Rushdie’s desire to introduce his novel to a larger audience by bringing it to life on the screen. But “Midnight’s Children” suggests that the book might well be, as many of its readers believed, simply unsuited to film adaptation. Whether or not that’s the case, Mehta’s bloated but tinny epic certainly doesn’t do it justice.