A film can be bad in many ways.

There are lightweight films which fail to entertain and serious films which fail to illuminate. Some are betrayed by bad writing, while others are badly directed. Still others are marred by unfortunate casting or by a single performance grotesquely out of synch with the rest of the acting in the picture.

“I Am Sam,” a desperate piece of Oscar-bait, is the rarest of fiascoes – a film which manages to fail on all of these levels.

The movie is so cloying, phony and manipulative as to offend even those whose sensibilities have been dulled by a lifetime of would-be tearjerkers. It grates like a shredder.

It’s actually worse than that, because the picture isn’t merely schlock. It’s joyless, preachy schlock meant to teach us a thing or two about life.

Sean Penn plays the title character, a mentally retarded man who sues the government when his small daughter (Dakota Fanning) is seized by the Department of Child and Family Services for the protection of her welfare.

Is it so callous to believe that a man with no hope of earning a sufficient living – let alone helping with homework – shouldn’t have sole custody of a seven-year-old child? If you’re the pious, dutifully liberal producer who gave the green light for “I Am Sam,” the answer is yes.

Relentless in its single-mindedness, the movie depicts Sam as unfailingly sweet and benign, reading Dr. Seuss at bedtime and making ga-ga eyes at his daughter over pancakes. His care is contrasted by that of the Department of Child and Family Services, the representatives of which are manifestly cynical and out of touch.

The message implied in the plaintiff’s argument, which also happens to be the point of view of the film, is right out of a TV movie of the week. We’re led to believe that because he is retarded, Sam’s nonjudgmental outlook allows him to “connect” with his child in a way that most parents of incapable of.

To prove it, “I Am Sam,” lingers over scenes of dysfunction between other parents and children. Even the attorney who reluctantly agrees to take Sam’s case (Michelle Pfeiffer, doing a scatterbrained Diane Keaton impersonation) has a poor relationship with her son and “rediscovers” how to parent through Sam.

The movie dishes up this wretched stuff over and over, in an attempt to contrast Sam’s blank goodness with the hypocrisy of everyone else in the modern world.

In one unforgivable scene, Pfeiffer’s lawyer badgers an expert witness for the government, impugning her ability to judge Sam’s fitness as a caretaker by revealing to the court that the witness’ own son died of a drug overdose. The woman breaks down.

The scene is irrelevant and bellicose to begin with, but director Jessie Nelson – who doesn’t make a point so much as loiter on it – isn’t satisfied. Next, he cuts to a shot of a tear descending from the witness’ right eye. Not a close-up of her face, mind you, but a close-up of the tear.

This level of audience-pandering isn’t an accident. It’s a strategy. Nelson knows his movie lacks credibility and his stunts and emotional pleas are a back-door attempt at passing over a dubious message. If audiences are moved by the film’s ham-handed pathos, he assumes, they won’t question its politics.

Penn may have envisioned “I Am Sam” as a surefire Oscar darling – a sensitive message-movie in the “Rain Man” mold. Now 41, he’s still waiting for the role that secures his first Academy Award and places him among the ranks of Brando and DeNiro, who were to their generation of actors what Penn is to the current one.

“I Am Sam” isn’t that picture. It disgraces him. Now that the film has opened in wide release and the critics are having at it, Oscar seems farther away than ever.