Jennifer Aniston strays far from her comfort zone to play an acid-tongued woman afflicted with chronic pain as a result of a car accident in Daniel Barnz’s “Cake.” But while one has to admire the commitment she brings to the character of Claire Simmons, the film eventually veers off in a direction that conventionalizes the story—and her—in a drastically manipulative way.

Aniston has done impressive work in small, independent films before—her performance in Miguel Arteta’s “The Good Girl” remains one of her best—and again the departure from sitcom-quality romance does her a world of good. In the first reels of the film she presents a pitch-perfect portrait of a woman whose astringent personality has driven away her attentive husband (Chris Messina) and alienated the other members of a support group headed by Annette (Felicity Huffman), who are astonished at Claire’s dismissive attitude toward the suicide of Nina (Anna Kendrick), another sufferer. Her increased drug dependence and inability to make the effort to improve even frustrate her long-suffering but utterly devoted housekeeper Silvana (Adriana Barraza).

Still, Claire remains active in certain respects, enjoying painful but gratifying sessions in bed with the yard man. And her attitude toward Nina isn’t quite so heartless as it seems, especially after the dead woman begins appearing to her (in sequences that, quite frankly, don’t achieve the sort of hallucinatory quality they’re aiming for). The visions induce her to extract Nina’s address from Annette under the threat of a lawsuit, and she visits her house, where she encounters widower Roy (Sam Worthington) and his young, now motherless son Casey (Evan O’Toole). It doesn’t take a genius to predict that Patrick Tobin’s script will involve a closer relationship between Claire and those Nina left behind than she might originally have intended.

In fact, it’s that new connection that leads “Cake” into a plot turn that explains Claire’s psychological (as opposed to her physical) suffering in a fashion that’s frankly a bit too straight-on. (A brief appearance by William H. Macy, at all too coincidental a moment, is part of the equation.) From that point, the picture grows increasingly manipulative, and the symbolic meaning of the title heavy-handed, especially when it’s connected with an episode involving a runaway Idaho teen and a final appearance by ghostly Nina. To some extent it feels as though Tobin and Barnz had lost their nerve and decided to take the story in a direction that would pluck at the heartstrings rather than simply provide a portrait of a difficult, hard-to-like woman who might decide to follow in Nina’s footsteps off a highway overpass. As Claire becomes less caustic, she grows more familiar and frankly less interesting.

There’s compensation, however, in the lovely rapport between Aniston and Barraza as Claire and Silvana. Aniston’s performance is good, but studied and very clearly calculated. Barraza’s is more natural and unforced, even in those rare moments when her character explodes, and she frankly brings out the best in the star in their scenes together—particularly a sequence in which the two travel to Mexico to secure the drugs that Claire has become so dependent on. By contrast Worthington has apparently been instructed to act as quirky as possible, which does him no favor. The rest of the cast fulfill their functions decently without adding much that’s special, with Kendrick in particular coming across as badly underused. The picture is clearly a modest work from the technical standpoint, but Rachel Morrison’s cinematography adds a touch of grittiness to the locations that helps give the film an authentic feel.

Many fine ingredients—not least the performances of Aniston and Barraza—have gone into making this “Cake,” but it leaves one wishing that the end result had been more uncompromising.