As I reflect on “Dogville,” Lars von Trier’s pretentious 3-hour dark fable, I’m excited by its ideas. Such theatricality! Such social commentary! Such drama! Why, someone could make a great movie out of these ideas.

Someday, maybe someone will. Von Trier has made a mediocre one, a film that feels too long given how little it actually has to say, but that nonetheless burrows into the viewer’s mind and nestles there for a while. It is a mixed bag, to say the least.

The manner in which it is staged has already made it famous. It’s set in a small Colorado town circa 1920, but it was filmed on a sparse sound stage with the entire town represented by painted lines on the floor. Ma Ginger’s gooseberry bushes are indicated by the words “gooseberry bushes”; even someone’s pet dog is just an outline of a dog painted next to the outline of the owner’s house. (This is a dog that doesn’t move around much, obviously.) With no doors (or even walls), characters mime opening them, with appropriate sound effects added.

Von Trier’s motivation for the odd staging is probably twofold. First, it is an homage to Bertolt Brecht, the playwright whose works deliberately and constantly remind the viewer that he is only watching a play and is never truly “there.” “Dogville” is based loosely on a story from Brecht’s “Threepenny Opera,” so the homage is appropriate.

In addition, however, the stage will remind audiences of “Our Town,” Thornton Wilder’s play about a small town in the early part of the last century. It, too, has a narrator, sets indicated by lines and simple props, and characters who are quaintly old-fashioned. “Dogville” begins like a variation on “Our Town,” then skews the formula to show the evil that lurks within people’s souls. Furthermore, “Our Town” is the quintessential American play, about good ol’ American life and values. “Dogville,” on the other hand, takes a distinctly dim view of America.

That fact will be a turnoff to many people, who don’t like foreigners (von Trier is Danish, and has never even been to this country) telling us what’s wrong with us. I can sympathize with that point of view, but I suspect the Americans who would be most bothered by it aren’t the type to go watch a 3-hour minimalist experiment anyway.

Now to the story. Nicole Kidman plays Grace, a willowy beauty who stumbles into Dogville on the run from gangsters. She hides in the old silver mine until she is found by Tom Edison (Paul Bettany), a shiftless, underemployed young man whose father (Philip Baker Hall) was the town doctor before retiring. Tom is willing to let Grace hide out in Dogville, which is secluded enough to keep her safe, but first must get approval from the other 14 adults in town. They agree, tentatively, suspiciously.

Grace slowly ingratiates herself with the town, committing herself to working an hour a day at each home as a means of proving her loyalty and sincerity. She gets old Jack McKay (Ben Gazzara) to finally admit he’s gone blind, and she describes the world to him. She helps dim-witted Bill Henson (Jeremy Davies) get better at checkers. She helps Ma Ginger (Lauren Bacall) run her mercantile.

People warm up to her, except for Chuck (Stellan Skarsgard), the gruff husband of homemaker Vera (Patricia Clarkson). Possibly it is because he has a crush on Grace that he wants to subvert that he treats her roughly, but things come to a boiling point in what the film calls Chapter 6: “Dogville bares its teeth.”

We discover that as Grace’s staying in town becomes riskier — the gangsters come through now and then, and seem to suspect she’s around — the town requires more of her in exchange for staying. It’s simply capitalism, of course: The more you want something, the more they’re going to charge for it. Dogville won’t hide Grace out of the goodness of its heart, because when push comes to shove, there is no goodness in its heart.

The film indicts America’s treatment of foreigners, not in terms of policy (because we’re actually pretty lenient about who we let in), but in terms of how the average American regards outsiders. There’s some criticism for the arrogance of America, too, the sense of entitlement we have, the idea that we’re big and bad and everybody better do what we say.

And so it goes. Von Trier is entitled to make his points, of course, and they are not without merit. He’s smart enough to keep the criticisms fairly low-key, and couched in metaphor, to prevent the film becoming just a lengthy tirade … until the last hour or so, when it becomes a loud anti-American screed.

Its problem is that while its concepts are interesting, its content is only marginally so. The film feels too subdued and stagy, the dialogue stilted and unreal, the performances mannered. Some of this may be intentional, again paying tribute to Brecht — but I don’t like Brecht, either, so I’m not surprised that I don’t care much for things done in his style. It seems counterproductive to make a film that alienates its audience, whether the alienation is intentional or not.

C (2 hrs., 57 min.; R, some nudity, some strong sexuality, brief violence, a little profanity.)