As stars Mark Duplass and Joshua Leonard admitted during the post-screening LAFF Q&A on Friday night, Lynn Shelton’s improvisational comedy “Humpday” was “reverse engineered” from a premise that a lot of straight guys, at least, will no doubt have a hard time swallowing. However, if you take the film as it goes, it develops its premise believably.

The film opens from the point of view of Duplass’s Ben, a happily married guy trying for his first baby with wife, Anna (Alycia Delmore). At 1:30 one morning he is greeted with a surprise visitor, Andrew, an impetuous artsy type who has been traveling the world and having various sorts of bohemian adventures. The film sets up two simple ideas that, in a more normal world, should not come into conflict: Ben and Anna love each other quite a bit as husband and wife; Ben and Andrew love each other quite a bit as best friends.

The problem is that Ben may not be quite as thoroughly comfortable in committing to a lifelong domestic role as he might first appear. The following night, a party with Andrew’s cute new hook-up, her lesbian girlfriend, and various bohemian friends of various sexual preferences leads to a discussion of Seattle’s real-life amateur art-porn video contest, Hump Fest. In turn, that leads Ben, attending without Anna, to an inspiration. With pretty much everything under the sexual sun already committed to video, the only thing left with which you can make any kind of statement or push any envelope would be the spectacle of two straight guys somehow managing to have sex with each other.

Instead of dying the death you’d expected an idea like that to die once the booze and the pot wears off, it takes on a life of its own as Ben pushes Anna to the margins and winds up in the most humorously counterintuitive macho pissing contest ever committed to film. During a rough basketball game, he and Andrew nearly come to blows, and the issue somehow turns out to be who has the artistic/creative gumption to actually commit to the “project.” It’s an inherently funny premise for exploring the old issue of competition between close male friends, explored to more dramatic effect in “Jules and Jim,” Joachim van Trier’s “Reprise,” and probably a bunch of other movies I can’t remember right now. It’s also more poignant than you might think, because, for all his artistic aspirations, Andrew hasn’t actually completed any projects yet.

For an improvised film, this is a nicely-acted, witty, and thoughtful piece of work with plenty of laughs, even if Ben’s beyond-shabby treatment of the very tolerant Anna stretches believability for a guy who’d perhaps like to stay married.  The only real problem with “Humpday” is that this is a story with no satisfactory resolution. If the guys go ahead and do the deed, then we’ll likely always question whether they were both really all that completely hetero to begin with, and we’re left with no premise. If they don’t do the deed, it’s a bit of a cheat.

I won’t give it away, but it’s telling that, in a film where the plot points were laid out in advance but the dialogue was generally improvised with actors Leonard and Duplass (one half of the improv-comedy filmmaking Duplass brothers) effectively acting as writing collaborators, the decision was made to improvise the resolution as well. Naturally, the result was a let down. Like the rest of the film, however, it is funny and feels fairly real in its disappointment, which might actually be the point.

[Note: If you happen to be reading this on Monday afternoon, 6/22, at about 2:30 p.m., PDT, you have just over two hours to get to Westwood to see the second and final LAFF screeening of “Humpday.” Hurry.]