It’s not every fine artist who is inspired by the “Three Little Pigs.” But it happened to Zachariah O’Hora. An artist who was hijacked into writing, O’Hora created a new animated series, “Carl the Collector,” which recently premiered on PBS Kids. And Carl, an energetic raccoon, is no ordinary raccoon. He’s autistic and just loves collecting things. O’Hora got the idea from observing autistic kids at his sons’ unorthodox school.

So, what that has to do with the “Three Little Pigs” goes back to O’Hora’s high school. “Growing up I loved comic books and superheroes, and I was just drawing all the time,” he said.

“And whenever I was bored, I was drawing whatever it was and was doodling whatever it was around me — which got me into trouble with drawing in schoolbooks. I like to tell my parents that now I get paid to draw in schoolbooks.”

But that paycheck was a long time coming.

“In high school, I had a really great art teacher who brought in a picture book one day by Jon Scieszka and Lane Smith called ‘The True Story of the 3 Little Pigs.’ And the art was so amazing! And it was the first time I’d seen a fairy story flipped on its head because in that book, the wolf is telling that story from jail. ... That was when I thought, ‘Oh, if you can do this, I can do this for a living!’ ”

But it took O’Hora, 50, a long time to earn that living. A rebel as a teenager, he moved out of the family home at 16.

“I lived with different friends on my own through my junior year because I just needed my space,” he says.

“As the oldest of five kids, it was a very strict household, and that was the first time I realized I could be really independent.”

That freedom meant that he didn’t immediately follow his artistic dream. He hitchhiked across the country first. “I read ‘On the Road,’ followed the Grateful Dead around — so I kind of had a circuitous route,” he admits.

He landed in San Francisco where he suffered a litany of odd jobs.

“I worked for the San Francisco Jazz Festival as an equipment person — basically a roadie,” he recalls.

“And I love jazz, so that was probably the best job I ever had. I got to drive all my jazz heroes around and pick them up at the airport, I mean McCoy Tyner and Charles Lloyd and Elvin Jones and Lou Rawls — amazing people.

“I spent a few months working at a vitamin factory working on the assembly line like Laverne and Shirley at 5 in the morning. I worked at a sign shop for years. I was a sign painter, not as artistic as it sounds — kind of industrial.”

But San Francisco offered him more than a job.

“I grew up in New Hampshire originally and moved to San Francisco for a decade. It really opened my eyes to the world — everything from using chopsticks to having gay friends — all the things that as a kid in New Hampshire I didn’t know existed. The different cultures and different experiences and people with completely different world views changed me,” says the bearded O’Hora, who’s wearing a black T-shirt emblazoned with an image of Carl.

But he also finally buckled down and earned a bachelor’s degree in illustration from the California College of Arts and Crafts.

He married, and he and his wife moved back East to the Brooklyn borough of New York City, O’Hora hoping to find work there. “I was trying to figure out how to write and illustrate picture books, and it’s a very opaque business and I fumbled around for three or four years just submitting story ideas with paintings and stuff I was making.”

One of his first was about a Dachshund who played the drums. “I thought it was really funny, this little dog with short legs trying to be a drummer. And that got rejected by every single publisher ever. But one publisher, they were, ‘Hey, we really like your artwork. If you have any other ideas, hit us up.’

“That was three or four years of rejections. One of the first big stories on YouTube were these two otters from the Vancouver aquarium who were holding hands as they slept. And I watched that video 100,000 times, and it was the cutest thing. My wife told me, ‘If you’re having trouble writing, write about what you know.’ And she wrote a bunch of things about me — a lot of it was annoying things I did, like snoring.”

His first book, ‘Stop Snoring, Bernard!’ is about a sea otter who annoys all the others with his pernicious snoring.

“I sent this new idea to the people who’d sent this nice note to me. ... They bought it, which was good timing because we were about to have our first child. And so the pressure was on to get my act together, to have a career. And since then, I’ve written at least a dozen books, and there must be 20 books out there because I illustrated other people’s books.”

His two sons, Oscar, 17, and Teddy, 15, are inspirations for his work, as is his own childhood. “Being the oldest of five kids in a family that was struggling, I equated having children with poverty,” he says.

“And as the oldest kid, I had a lot of responsibility. So it seemed like having kids was a terrible idea. And I’m so glad I did end up having kids. My partner had the opposite idea, she wanted kids, and we met in the middle. And it’s the hardest and best thing I ever did and made me live for something other than myself.”