CAPTAIN UNDERPANTS: THE FIRST EPIC MOVIE (David Soren). 89 minutes. Opens Friday (June 2). See listing. Rating: NNN

The words “poo” and “underwear” are treasures for my seven-year-old. We discourage potty language in our house but make an exception when he’s reading Captain Underpants, Dav Pilkey’s popular series that includes some of the most banned books in the U.S.

Like its source material, the Captain Underpants movie has a superhero dressed only in briefs and a cape who slingshots underwear at a mad scientist named Professor Poopypants. Just those names had my son rolling in his seat. And despite the lowbrow gags, or perhaps because of them, I cracked a few grins, too.

The title doesn’t let on, but the books are actually witty, inventive and visually adventurous, featuring stories within stories and pages dedicated to humorous flip-o-grams. The movie does a decent enough job trying to keep up.

Kevin Hart and Thomas Middleditch voice Harold and George, the grade school pranksters who hypnotize their mean principal Mr. Krupp (Ed Helms) into believing he’s the comic book hero they invented.

The ensuing slapstick antics mix elements from the first four books. A dance party is added because it’s a go-to for every middling animated flick nowadays – and middling is what the Underpants movie becomes whenever it strays from Pilkey’s material.

Thankfully, it rarely does, and often finds amusing ways to translate Pilkey’s graphics for the big screen, flip-o-gram included.