Hollywood studios have recently been pillaging the literary canon of beloved children’s literature, digging up fodder for animated feature films. The best of these, like the “Paddington” movies, successfully meld nostalgia with modern and exciting filmmaking, while the more questionable ones, like the recent “Ferdinand” adaptation, manage to muddle the source material with too many pop songs and dirty jokes. The new “Peter Rabbit” adaptation manages to land right in the middle — the animation technology is top-notch, but the gentle spirit of Beatrix Potter’s books is subsumed into a chaotic, violent mayhem, manically soundtracked to the day’s hits.

Will Gluck directs and co-wrote with Rob Lieber this adaptation of “The Tale of Peter Rabbit,” the story of naughty rabbit Peter (James Corden), who can’t help but snack from Mr. McGregor’s garden. This version ups the ante significantly in the Garden Wars, especially when Mr. McGregor (Sam Neill) dies, and his fastidious nephew Thomas (Domhnall Gleeson) comes to Windermere. Thomas, hoping to sell off his uncle’s property to fund his own toy shop, finds the “vermin” have moved in.

The photorealistic animation by Animal Logic is truly breathtaking, especially in the first few moments of the film. The rabbits are extraordinarily lifelike, with their individual strands of soft fur and shiny eyes.

But those whiz-bang tracking shots are all put in service of a shockingly savage and brutal war between Peter and his crew (Flopsy, Mopsy, Cotton-Tail, Benjamin Bunny) and the fussy Thomas. At first, Peter just wants to get at those sweet, sweet fruits and veggies. Then it’s simply a matter of proving he can.

The impish Peter takes the feud entirely too far, and “Peter Rabbit” descends into a truly sadistic display of violence, as poor Gleeson is pounded, pummeled, battered, bruised, electrocuted and exploded at the paws of the brutal bunnies.

There’s a clever little meta streak that runs through “Peter Rabbit,” especially among the wildlife, who snark and joke and talk about their “character flaws,” make war movie references, and “pour one out” for their fallen homie Mr. McGregor, all while bopping along to endless pop and hip-hop tunes.

Ultimately, after the dust has settled, the lesson at hand is one of peaceful coexistence with the environment. The more you try to shut something out, with gates and fences and dynamite, the more it will try to fight back. There’s also a message about owning your actions and taking responsibility… even if you are a tiny talking bunny wearing a blue jacket. But when a bunny misbehaves like Peter does, apologies are necessary all around. Perhaps even to the audience of the film.

MOVIE REVIEW

“Peter Rabbit”

Grade: C+

Starring James Corden, Domhnall Gleeson, Rose Byrne, Sam Neill. Directed by Will Gluck.

Rated PG for some rude humor and action. Check listings for theaters. 1 hour, 33 minutes.

Bottom line: What starts as a sweet tale turns into violence