Grammy Award-winning artist Pharrell Williams has a huge affinity for cartoons.

“I love Bugs Bunny, Daffy Duck, [the] Smurfs, and SpongeBob is one of my favorite all-time cartoons,” says the singer-songwriter who has written and produced songs for musicians like Gwen Stefani, Justin Timberlake, Usher, Shakira and Madonna.

Williams, part of the beat-making duo the Neptunes, has been interested in scoring music for feature films for some time and jumped at the opportunity to compose several original songs for Despicable Me. A 3-D animated cartoon, it centers on the bizarre world of Gru, a “super villain” whose plans to pull off the biggest heist of all time are complicated when three orphaned girls come into his life.

“What I like about the philosophy of this movie is that the filmmakers don’t make children’s films,” says Williams. “They make films for humans that use some of the tricks and treats of youthful entertainment, but at the same time there’s an amazing storyline.”

Working with music producer Hans Zimmer (The Dark Knight), Williams was inspired by the whimsical narrative of the lyrics from “Annie” and wanted to write his own that were as kid-friendly as the musical, but also as moody as Gru’s character.

“I’ve never made a song about having a bad day and being in a super bad mood, and so I thought about it from the perspective of someone who was sitting in traffic and with the crazy, crazy traffic that you have in L.A., I can just see anyone getting out of their car with a rocket launcher,” he says. “When you look at Gru, who has this Grinch-type feel, you understand that he is a guy that has issues.”

“It’s an amazing film,” continues Williams. “It’s smart, and the characters are great. When 3-D first came out, there was a ‘Gilligan’s Island’ episode that was in 3-D. I remember you had to go to 7-Eleven to get the 3-D glasses and the angles were so poor, so having that in the back of my mind and seeing where technology is and how far it’s come, I was so blown away by it. There are a lot of 3-D films out right now, but only some of them are smart about the angles and making sure it feels right.”