For “Chef,” actor-director Jon Favreau, center, with John Leguizamo, left, got help from celebrity chef Roy Choi, right. (Merrick Morton) For “Chef,” actor-director Jon Favreau, center, with John Leguizamo, left, got help from celebrity chef Roy Choi, right. (Merrick Morton)

Judging from “Chef,” you might think that Jon Favreau has a problem with critics.

In the film (which Favreau wrote, directed and stars in), he plays Carl Casper, a chef at a nice, safe restaurant who longs to do more innovative things but finds himself locked in a prison made of filet mignon and molten lava cake. When a powerful food critic (Oliver Platt) calls Carl out on his lack of creativity, Carl freaks out at him.

It’s easy to see “Chef,” out locally Friday, as a metaphor for filmmaking itself, examining the struggle between wanting to pay the bills with crowd pleasers versus remaining true to oneself as an artist, as well as the newfound power of social media to build up or tear down nearly anything on the planet. Favreau says, though, that the expletive-laden spew of shout that comes from Carl isn’t a reflection of any distaste for critics.

“Food and movie critics, especially the ones who are educated in the field, they care as deeply as the artist on the art form they’re commenting on,” says Favreau, who rose to prominence by writing and starring in the 1996 indie “Swingers” and lately is best known for helming “Iron Man” and “Iron Man 2.” “But with reviews, it’s all chefs have — it’s their Michelin stars that defines them because there is no box office.”

For the film, Favreau learned how to live a chef’s life from Roy Choi, the founder of the Kogi BBQ food truck in Los Angeles, which is largely credited for starting the modern food truck craze.

“I wrote [the script] and the people I worked with said, ‘You should talk to this guy.’ He basically lived out all the different steps” from a comfortable career as a chef to a big downfall to finding success in the back of a van, Favreau says. “He trained me, he came up with the menu, it’s all his food.”

Choi’s personality shows through in the cubanos he made for El Jefe, Carl’s food truck in the film, but the chef had to restrain himself at times.

“The hard part for him was making food that wasn’t supposed to look all that good,” like the rather pedestrian dishes Carl serves at the restaurant, Favreau says. “Those dishes were all good food, but they weren’t meant to be as vibrant and exciting,” Favreau says. “[Choi] is very quick to say to all the chefs who see this movie, ‘You understand that’s not me, right?’ Chefs are the most impatient perfectionists I’ve ever met and people love them for it. That’s what leads to perfection and pride.”