Entertainment

A great escape

Pixar Animation Studios has produced five movies I’ve described as masterpieces since 2001, so I’m not complaining too loudly that “Toy Story 3,” the second feature-length sequel in the studio’s history, is merely very good.

The studio has certainly earned the right to revisit the films that put Pixar and computer animation on the map with a vastly entertaining sequel that will doubtless pour untold hundreds of millions into Disney’s coffers.

GALLERY: The Best Animated Movies

After more than a decade’s absence from the big screen, Woody, Buzz and company return in style. Before the opening credits, there’s a rip-roaring fantasy train chase through Monument Valley that alternately pays homage to and skewers the work of Disney stable-mate Jerry Bruckheimer.

We then see a series of home-movie clips of the toys’ owner, Andy (John Morris), growing up that seems perhaps a tad too determined to tug at the heartstrings of several generations of moviegoers.

Andy, leaving for college in a few days, impulsively decides to take Sheriff Woody (delightfully voiced, once again, by Tom Hanks) with him — and throws the rest of the toys he hasn’t played with in years (including Tim Allen’s Buzz Lightyear) into a garbage bag bound for the attic.

After a narrow brush a trash collectors, Buzz and the rest — except for those little green soldiers, who go AWOL — decide being donated to a day-care center is preferable to sitting untouched in the attic.

Woody’s loyalties are torn between his master and his friends, and basically the themes of loss and transition so beautifully portrayed in the second film (which topped the original) are replayed.

Also replayed is the still-amusing concept of the blustery Buzz having multiple personalities — in this sequel, one of them speaks in subtitled Spanish.

This felt like a three-star movie to me until the last half-hour, when director Lee Unkrich (an assistant director on the second film) takes a delightfully dark turn that brings “Toy Story 3” closer in spirit to the more recent and sophisticated Pixar classics like “WALL-E” and “Up.”

The day-care center, Sunnyside, turns out to be more like a prison camp presided over by a seemingly jovial stuffed bear named Lotso (Ned Beatty), who has been twisted by loss in his past.

The writers — including Pixar honcho John Lasseter (who directed the two previous installments in 1995 and 1999) and Michael Arndt (“Little Miss Sunshine”) — have a truly inspired idea for Lotso’s chief henchman: Barbie’s Ken, portrayed as a preening closet case in Michael Keaton’s hilarious voice performance

Ken and Lotso are abetted by an ominous, damaged Betsy Wetsy knockoff straight out of a horror movie.

The film’s most inspired section is a brilliant, thrilling Woody-led version of “The Great Escape,” with a junkyard climax that may actually be too scary for sensitive little ones.

Although Little Bo Peep — the least interesting of the original characters — vanished in a yard sale, the filmmakers have not neglected to provide funny dialogue and moments for fan favorites.

These include feisty cowgirl Jessie (Joan Cusack), the dyspeptic Mr. Potato Head (Don Rickles), the neurotic dinosaur Rex (Wallace Shawn), the silly Hamm (John Ratzenberger) and the airheaded Barbie (Jodi Benson).

Timothy Dalton has a very funny cameo as a Shakespearean hedgehog, and Emily Hahn voices young Bonnie, who takes the same delight in her toys that Andy once did.

“Toy Story 3” (which is pointlessly being shown in 3-D at most locations) may not be a masterpiece, but it still had me in tears at the end.

lou.lumenick@nypost.com