Jokester Louis C.K. is a filmmaker in training

You couldn’t blame the average working stiff for envying comedian Louis C.K.’s résumé, which includes staff writing stints with late-night hosts David Letterman, Conan O’Brien and Chris Rock. But to C.K., these high-profile gigs are mainly a way to subsidize his preferred career: filmmaking. The part-time stand-up comedian (who performs on Letterman’s show tonight) showed his short film “Ice Cream” at the Sundance Film Festival in 1994, and his first feature is set to screen at the festival this month.

C.K.’s Sundance entry, “Tomorrow Night,” is a black comedy about a cranky camera store owner. The film cost some $180,000 to make and was partly financed by the 30-year-old writer’s earnings during two seasons with HBO’s “The Chris Rock Show” and a turn as writer/producer for Dana Carvey’s short-lived 1996 sketch show. “I’m betting everything I have on this film,” says C.K. “I have no life savings anymore.”

Last April, in the midst of shooting “Tomorrow Night,” C.K. found himself running out of money. Then he made a guest appearance on “Late Night” (he had been one of the show’s original writers), showed a clip of his film-in-progress and made a tongue-in-cheek entreaty for funds to finish the project. The guest spot helped win over a few previously reluctant investors and earned C.K. enough cash to carry on.

When C.K. returns to “The Chris Rock Show,” which starts a new season in July, he’s likely to find stability on late-night that he never found with “Tomorrow Night.” “We had a bad first week of shooting,” he recalls. “The first day, someone loaded the wrong kind of film in the camera, and the first three days we shot, we couldn’t use for other reasons. It was a nightmare. But we also had some breaks. Some of the bad stuff we shot was on dirty film, and we had negative insurance. So in the end, it came out fine.”