Movies

‘Captain Underpants’ author writes his books in a Japanese cave

For 20 years, Dav Pilkey has been writing his “Captain Underpants” books — 12 in total — delighting kids and, sometimes, dismaying their parents. His hugely popular series is about two clever boys, who, using hypnosis, turn their cruel principal into a nearly naked superhero.

But as wild as Pilkey’s books can be, the conditions he writes in are even more wild — literally. The author, who, with his wife, divides his time with between Bainbridge Island, Wash., and Japan, often pens his works in a Japanese cave.

“The cave sort of came about out of necessity,” Pilkey, 51, tells The Post. “I like to be outside when I write. I just kind of get inspired by nature. And I used to go down to the beach near our house [in Minamiizu, Japan]. But there’s these monkeys who live down there.”

At first the cute primates were respectful neighbors, but they soon turned nosey.

“They’d come running over, and they’re climbing all over me. And they’d take my hand, my sunglasses — you know, just really obnoxious.”

So, Pilkey hopped in his trusty kayak and ventured north seeking peace and quiet. That’s when he found his favorite spot to work.

“The monkeys can’t get to that cave,” he says.

Captain Underpants, a character that has been a part of Pilkey’s life since he was 7 years old in Ohio, has finally made it into a film. “Captain Underpants: The First Epic Movie,” just hit theaters — but it’s been decades in the making.

“From the very beginning, I thought that [the characters] would be pretty good on the silver screen,” Pilkey says. “But I just wanted to make sure that it wasn’t live-action, because I didn’t think anybody really wanted to see that … in all its glory.”

Part of what convinced the author that the time was right for a movie adaptation was the types of movies he’d seen and liked, such as “How To Train Your Dragon” and “Kung Fu Panda.” Those had just the right blend of humor and sweetness that the author wanted.

Pilkey says that he and the filmmakers “had some conversations very early on about how true I wanted them to stick to the books. To me, the most important thing was they stay true to the characters,” he says. “I really see the story of Captain Underpants as all about empathy.”

And Pilkey was thrilled with his top-notch voice cast, too, including Nick Kroll, Jordan Peele, Kevin Hart and Ed Helms.

“[Director David Soren] said often they were actually in the same [recording] room, which doesn’t usually happen with animated movies,” Pilkey says. “They would bring two or three actors together and they’d play off of each other as they were being recorded.”

Like the cast, Pilkey grew up a funny guy.

‘I was always a goofy little kid. I was getting in trouble. I had ADHD before they even had a term for it.’

 - Dav Pilkey

“I was always a goofy little kid. I was getting in trouble. I had ADHD before they even had a term for it. I was diagnosed with extreme hyperactivity. That’s what they used to call it before they called it ADHD. And I also had dyslexia, so I wasn’t doing so well in a classroom environment,” he says. “So my [second-grade] teacher would send me into the hallway, and just being alone and isolated with my pencils and my papers, that’s where my imagination came to life, and my sense of humor came out of that, I think.”

That’s also when everybody’s favorite tighty-whities superhero was born.

“I wanted to have this relationship with my classmates, so I would make these comics and bring them in. That was almost 45 years ago — and I think [kids] are still laughing at the same stuff now.”

That kids are rolling on the floor at potty humor, Pilkey says, is A-OK.

“I don’t think of them as subversive, truly. I think it’s really an ode to childhood.”