Kung Fu Panda marked a turning point of sorts for DreamWorks Animation, and not just because it was the studio’s highest-grossing animated film without Shrek in the title. The studio might be Pixar’s leading rival, but until the coming of Po, they were getting by largely on the strength of their big green computer-animated superstar, and their prior roster of non-Shrek computer-animated products was a lineup of unmemorable one-offs: Bee Movie, Flushed Away, Over the Hedge, Shark Tale, Antz. (Madagascar was followed by a post-Panda sequel, presumably on the strength of the crowd-pleasing penguins, but both were as mediocre as movies can be.)

But then Kung Fu Panda charmed family audiences and kung-fu fans alike, largely on the appeal of three things: (a) Jack Black’s wide-eyed fanboy mugging as Po, a roly-poly panda who loves kung fu and is improbably chosen to become the Dragon Warrior; (b) Dustin Hoffman’s gruff but vulnerable mentor, the tiny red panda Master Shifu; and (c) a witty, occasionally inspired send-up of kung-fu movie conventions.

Kung Fu Panda was followed by Monsters vs. Aliens, How to Train Your Dragon and Megamind — all more high-concept, flamboyant and, well, franchise-ready than prior DreamWorks offerings. (I’m not a fan of Monsters vs. Aliens, but I acknowledge it’s a more ambitious and striking film than, say, Shark Tale, even though I preferred the latter.)

DreamWorks has learned to make sequel-worthy films — but can they follow through with worthy sequels? They’re certainly excited about the prospect: There are apparently plans for as many as sixPanda movies and at least three Dragon movies. First, though, they must learn to take their kung fu to the next level.

Returning screenwriters Jonathan Abel and Glenn Berger recognize that what’s needed is deeper emotions and darker themes, as well as more action and higher stakes. Po, fighting alongside his boyhood heroes, the Furious Five, learns that technique alone is not enough: He must achieve inner peace. Yet a new enemy has arisen that threatens all of China as well as kung fu itself. Somehow linking these two issues is a third: Po — the only panda in the Valley of Peace — finally realizes that Mr. Ping (James Wong), the noodle-selling goose who raised him, is not his biological father, and he becomes preoccupied with the question of his origins.

Master Shifu, in an early scene, expounds thoughtfully on inner peace. “The day you were chosen as the Dragon Warrior was the worst day of my life,” Shifu tells Po, still shuddering and twitching at the dark memory. “Yet when I realized that the problem was not in you, but in me, I achieved inner peace.” That’s probably the wisest thought in DreamWorks’ entire library of computer-animated films. (That’s not counting the biblical masterpiece The Prince of Egypt, which is mostly hand-drawn.)

Po approaches the quest for inner peace with the same gung-ho enthusiasm he brought to learning kung fu. “Inner peace, you’re going down!” he crows. Oh dear. That’s not how it works, is it? Po has to come to the end of himself, and Kung Fu Panda 2 credibly takes him there. I like the way the film visualizes the quest for inner peace in an almost poetic set of ritual moves involving catching a single drop of water. I even like the conceit of morphing Po’s black-and-white markings into the yin-yang symbol, though that may be a concern for some parents.

In some ways, the sequel goes beyond the original. The Furious Five are better utilized this time around, as action icons if not as characters. It’s nice to see Po fighting alongside them, particularly in an opening action set piece, choreographed as a musical number, with Po and the Five defending a peaceful village against evil raiders. A hilarious sequence with a dragon puppet is even better. The animation is gorgeous, and director Jennifer Yuh (the first Asian woman director of a major animated film and probably the first woman of any ancestry with a solo director credit for a big-studio film) makes good use of sweeping landscapes and fantastical architecture.

Unfortunately, the movie makes three key mistakes.

First, a beautiful, economical opening prologue, depicted as a Chinese shadow play with puppets on sticks, gives away too much of the story. We learn that China was once ruled by aristocratic peacocks, one of whom, the villainous Lord Shen (Gary Oldman), figured out how to turn the same technology of China’s lovely fireworks into a terrible weapon capable of defeating kung fu. We also learn in the shadow play that it was prophesied that Shen would be defeated by a panda — and that, Herod-like, Shen responded by exterminating all the pandas he could find.

The revelations that Shen’s secret weapon is gunpowder and that Po, the chosen one, is a lone survivor of a slaughter of innocents should have been the key revelations at the second and third-act transitions. Instead, the movie spills its secrets up front, and too much of what follows feels like it’s spinning its wheels waiting for Po to figure out what we already know.

Second, the filmmakers sideline Shifu, whose relationship with Po was central to the first film —and the rest of the cast remains underutilized, so there are no meaningful relationships this time around. There’s some effort to establish a rapport between Po and Tigress (Angelina Jolie), the natural leader among the Five, but she’s barely more fleshed-out than in the original, and it doesn’t work. Oldman is an enjoyable villain, and it’s nice to hear Michelle Yeoh’s voice as an imperturbable caprine soothsayer who predicts Shen’s downfall. But Po is the only character who matters.

Third, the filmmakers paint themselves into a corner by building up the game-changing power of gunpowder to such a degree that there is no satisfying way for our heroes to win. In the climactic conflict, the Five use all their skill to block Shen from carrying out his plans, and he brushes aside all their efforts with a single blast from his cannon. “How can kung fu stop something that stops kung fu?” Po asks at one point. There’s no good answer to this question.

I can accept a lot in the service of a kung-fu story. I can accept that a flabby panda chosen by the universe can take a crash course in kung fu and become a worthy opponent for an unstoppable snow leopard capable of defeating the panda’s own teacher as well as the teacher’s five greatest students. I can accept that kung-fu masters can fling themselves off mountains and land running or extinguish a roomful of candles with a gesture. I can even accept the original movie’s wushi finger hold, which is apparently so powerful that the devastating effects of flexing one’s finger can’t be shown in a PG-rated film.

But gunpowder is a game changer, as Kung Fu Panda 2 spends its entire runtime establishing. In this one respect the filmmakers permit too much hard reality to backtrack at the end. Yet that’s exactly what they do. It’s textbook deus ex machina, and it’s a letdown.

More resonant than the showdown with Shen is Po’s coming to terms with the reality of his origins. The affectionate if implicit depiction of Po’s adoptive home life was one of the nice touches in the original, and the sequel explores the questions that many adoptive children have, while ultimately affirming Po’s relationship with the loving parent who raised him. I like this a lot, and I’m not sure how adoptive families will feel about a last-minute zinger that threatens to blow the question open again in Kung Fu Panda 3.

Register film critic Steven D. Greydanus blogs at NCRegister.com.

CORRECTION: Content advisory: Much animated action violence and menace, some fairly intense; family themes that could be disturbing to sensitive children (e.g., death of mother).