In the past decade, Danny McBride has perfected the art of portraying swaggering and cocksure meanies, all Type A males armed with ridiculous haircuts and memorable one-liners.

Despite their loathsome qualities, McBride’s characters aren’t one-dimensional meatheads. Hidden under the bravado are pathetic pranksters insecure about their lot in life, illustrated by the actor’s nuanced, empathetic performances.

“By embracing these obnoxious stereotypes, you can undercut and surprise people when you actually add depth to the characters,” says McBride. “Anyone who is a mother——, there is a reason, and it’s usually because they’re not happy. I think it’s probably more interesting to explore why they are that way, as opposed to shutting yourself off completely to them.”

The first bully he portrayed was Fred Simmons, a delusional martial arts instructor in “The Foot Fist Way,” the 2006 low-budget indie comedy that launched his career. On Sunday, McBride and longtime collaborator, writer-director Jody Hill, appear in a tribute to movie at the Castro Theatre in the second week of the 18-day SF Sketchfest.

Hill and McBride met at North Carolina School of the Arts, a conservatory in Winston-Salem. The film, written while they were both struggling in Los Angeles, is based on their own experiences exploring martial arts while growing up in small towns in the South.

“Jody actually ended up teaching martial arts in high school,” says McBride. “I made it to green belt and got moved into the advance class as a 13-year-old. I started getting my ass kicked by the older kids, so I quit.”

“The Foot Fist Way” — McBride’s first starring role and Hill’s directorial debut — follows Simmons as he teaches a ragtag group of students while dreaming of a more grandiose life. It has an appealing amateur touch and several memorable performances from young local actors, and its three writers — Hill, McBride and Ben Best — had lead parts.

“We wanted to get a Chuck Norris-type for the film, but we realized that no one had any interest in working on a low-budget martial arts film,” says McBride. “That’s when we started turning to each other.”

The sleeper film eventually found its way to Will Ferrell and Adam McKay, who liked it so much that it became the first movie their production company released.

McBride and Hill, who are set to release “The Legacy of a Whitetail Deer Hunter” on Netflix this year, haven’t looked back since the release of the cult classic.

“Never in a million years did I have any designs of a career path where I would end up acting in films,” said McBride. “This movie was a Hail Mary for us. This experience changed our lives, and I think we are all so grateful for this film.”
IF YOU GO The Foot Fist Way TributePresented by SF SketchfestWhere: Castro Theatre, 429 Castro St., S.FWhen: 8 p.m. Jan. 21Tickets: $25Contact: (415) 621-6120, www.sfsketchfest.com