Sooner or later, we were bound to have a superhero, animated or live action, wearing just underwear. The main characters of “Captain Underpants: The First Epic Movie” tell the audience how superheroes typically look like they are in their pajamas, so they have created one who is wearing little to nothing. Most of the time, superheroes are wearing things we would never wear to the office, and there are others who look like they are barely dressed as it is. With Captain Underpants, we now have a heroic character who wears underwear as well as a cape, and he shows no shame in his appearance. Why should he anyway? He’s a superhero, and one look at him will confirm whether he prefers boxers or briefs.

“Captain Underpants” is a series of children’s novels written by Dav Pilkey who channeled his class clown behavior and learning disabilities into them, and now it has been adapted to the big screen by Dreamworks Animation. I had no idea what to expect from this “First Epic Movie” as I am unfamiliar with these books, but I am delighted to say the filmmakers have created an animated film which appeals to both kids and adults. While kids can revel in the adventures these characters have, the adults will get a kick out of the subversive comic elements which remind us of the problems we Americans experience with our malfunctioning education system. Just keep in mind, a lot of these problems began occurring before Betsy DeVos became Secretary of Education.

Anyway, we are quickly introduced to the main characters, George Beard (Kevin Hart) and Harold Hutchins (Thomas Middleditch), a pair of fourth-graders and best friends who revel in entertaining their classmates with pranks and creating comic books in their treehouse which they have branded as the headquarters for their company, Treehouse Comix Inc. Their friendship, however, is threatened by the evil Mr. Krupp (Ed Helms), the elementary school principal. After one prank too many, Mr. Krupp, decides to tear them apart by putting them into separate classrooms. But our young heroes quickly turn the tables by hypnotizing him with a 3D Hypno Ring they got out of a cereal box, and this allows them to turn Mr. Krupp into their most popular comic book creation, Captain Underpants.

I loved how this movie touches on a child’s view of elementary school to where I was reminded of the years I spent there. The thought of being in a separate classroom from your best friend was a real fear as recess time never seemed long enough to hang out together. And yes, school did seem like a prison at times where the teachers, the bad ones anyway, look determined to suck the fun out of anything and everything while making us learn facts and dates, some of which will escape our minds in the distant future. Heck, the teachers need textbooks to be reminded of these same things.

But moreover, “Captain Underpants” reminds us of how powerful our imaginations were at that age. We had such vivid fantasy worlds playing in our heads, and we went to places and experienced adventures where we were always the hero. Seeing George and Harold bring these adventures to life in comic books should make you remember when your imaginary worlds were infinite in what they promised. While the forces of schoolwork and conformity loom large in their lives, and they will loom even larger as they get older, we root for these two kids to persevere as we are reminded of how children need time to play and create. I feels like, in this day and age, the fun of childhood has given way to preparing kids for those damned SATs even before they graduate from pre-school.

Okay, maybe I’m making “Captain Underpants: The First Epic Movie” sound more serious than it has any right to be. In the end, this movie is all about fun as George and Harold try their best to keep their hypnotized principal in check even as his alter-ego of the Captain keeps him bouncing all over the place as he attempts to save those who don’t necessarily need saving. Seeing these two kids switch Mr. Krupp into Captain Underpants and vice versa makes for one of this movie’s funniest moments.

Of course, there proves to be an even bigger threat than Mr. Krupp here as the movie’s main villain, Professor Poopypants (Nick Kroll), comes to the elementary school as the new science teacher. His plan? To eradicate laughter from the planet as he has long become impatient with everybody not taking him seriously. Then again, how can anyone be taken seriously with a name like Poopypants? Just wait until you hear his full name.

Directed David Soren (“Turbo”) and screenwriter Nicholas Stoller (“Forgetting Sarah Marshall”) have given us a tale of good versus evil which is largely predictable, but they keep throwing left turns at us which keeps this movie feeling less so even when the climax is never in doubt. Not all the jokes work, but there are some which are priceless, and Professor Poppypants statement on the state of education is dead on. And yes, there are some fart jokes, but the ones here are far more creative than any which begged for your laughter in the abysmal “Diary of a Wimpy Kid: The Long Haul.”

Both Hart and Middleditch have loads of playing the two fourth graders, and they remind you of the benefits of doing voiceovers in animated movies: you can get away with playing children even when you’re in your 30’s! As for Helms, you can always count on him to make a superhero sound so confident even as said superhero has yet to learn of his limits, of which there are many. Kroll has fun playing around with supervillain clichés as Professor Poopypants as he exploits the bad guy conventions which come with crazy hair and an all too thick accent. Jordan Peele, riding high on the success of “Get Out,” has a blast voicing the tattle tale we all love to hate, Melvin Sneedly. Kristen Schaal also co-stars as Edith, the school lunch lady whose shyness and closeted affections for Mr. Krupp she makes all the more palpable.

“Captain Underpants: The First Epic Movie” may not go down as an animated classic, and its animation does pale in comparison to what Pixar typically comes up with, but it is filled with an abundance of imagination and cleverness which I did not expect to find. The filmmakers clearly have a great affection for the books of Dav Pilkey, and if this is to become Dreamworks’ next big animated franchise, it will be lots of fun to see where it goes from here.

By the way, does it really make sense that Principal Krupp would just turn right into the hero George and Harold created from their imaginations? Oh wait, it’s an animated movie. Who cares?

* * * out of * * * *