When it comes to midlife crises, we are all walking clichés. "Completely – and I'm a part of it," says Thomas Vinterberg, the 47-year-old Danish filmmaker behind the new drama The Commune. "I feel guilty about it, but I'm one of them. So all of that, I explored [here]."

Based on the German play he wrote before directing the 2015 adaptation of Thomas Hardy's Far from the Madding Crowd, The Commune looks at what happens after Erik and Anna (Ulrich Thomsen and Trine Dyrholm) and their teenage daughter, Freja, form a commune with friends at their sprawling mansion in tony mid-1970s Copenhagen. Uneasy open relationships become love triangles and squares; enter Emma (Helene Reingaard Neumann), a young woman who is a mirror version of Anna. Spoiler: The social experiment envisioned as a glamorously louche, never-ending cocktail party devolves.

The exploration of group dynamics is anchored by Dyrholm's riveting performance as a famous television news reporter, unravelling as the complications in her marriage precipitate her simmering career crisis (picture Persona and Opening Night).

Story continues below advertisement

"I found it interesting to make female leads. After having done Submarino and The Hunt, which were both very sort of testosterone," Vinterberg says; both projects, like The Commune, were developed with co-writer Tobias Lindholm; he says he "felt curious about diving into huge female characters."

Vinterberg is currently filming the Russian submarine-disaster drama Kursk, with Colin Firth, Léa Seydoux and Matthias Schoenaerts. Autopsy results, a few notes and forensic evidence provided the underlying source material for that film; his previous original film The Hunt was constructed with the help of psychological reports and police transcripts; in The Commune, it's memories and hard truths.

The premise is borrowed from his own personal history, in that he grew up in an urban collective from the age of seven. When his parents divorced and left the commune they wanted him to come with them, Vinterberg recounts.

"I said, 'wait a minute, I love this place, this is my family,'" and stayed on until the age of 19 – in an already unconventional childhood, an empty nest in reverse. When he finally left to marry his wife, the director Maria Walbom, it was a reaction against the chaos. "I got married in a church and moved into a nuclear family and found myself calming down. A classic reaction against what I was brought up to do."

Story continues below advertisement

He consulted his parents and "a lot of the old hippies from the commune" about what turned them on at the time. "It was this feeling of doing something almost illegal, so much against the system by moving in together and yet still doing it first-class, in a wonderful, beautiful house in the richest area of Denmark. They put it like: 'We felt so sexy, doing it.'

"That vibe, I recognized from Dogme," he says of the influential filmmaking movement he started with fellow Dane Lars von Trier in 1995 (the manifesto imposed 10 rules known as the "Vows of Chastity").

"That was also very vain, very self-obsessed to some extent, pretty arrogant. But, you know, we felt pretty sexy doing that thing. Because there was a risk to it. And I understood that."

Vinterberg says the movement's underlying principles ("the sense of nakedness") still resonate. "'I'm still into the same thing, I'm still looking for the purity, the presence. The truthfulness of every moment, and I learned that from doing Dogme," he adds. "And I think that's the more important part of it."

Story continues below advertisement

The relationships of the actors on the German theatre scene (where the story was originally performed as a play) also provided fodder.

"They had all gone through their midlife crises and had been divorced or had been left for some young woman, or whatever. It's a very cynical but very systematic thing that happens in life, all the time," he says.

But "I want to make it personal, but not private," Vinterberg cautions of the emotional terrain. If you make it private, he says, "you start censoring. There's a loyalty to people that you have to sort of obey. But it was complicated – very complicated – to figure out that path and still is, to some degree."

When Vinterberg showed The Commune to the commune, for example, he says their first reaction was complete confusion. "Because they recognized things in the details – for example Freja's room was a complete copy of my room. Then again, everything else didn't look like it was; then again, the feeling was exactly the same. But yet not. So they had to orientate themselves."

Story continues below advertisement

And since Danish tabloids don't travel far, he volunteers another autobiographical detail.

"I can give you a hint – I married the young woman! So I thought, I have to be fair to the women of this film, I have to be … sharing with them, and deliver the ugly sides of being a man."

Vinterberg wrote the part of Emma specifically for Reingaard Neumann, and is now married to her. "Helene in real life, by the way, studies philosophy and is now writing her thesis on eternity and Kierkegaard," he adds.

"So we talk about that a lot. I don't understand that we're not going to be here forever. I can't accept that. Time has passed. The problem of aging. The impermanence. And I find that so difficult to deal with, myself.

"And the film is very much the result of that, looking back at my childhood, yearning for it. And it's looking at the fact that I was once married [to my first wife] and now I'm no longer married [to her].

Story continues below advertisement

"I chose that myself but it still doesn't make sense," he adds, "that people fall out of love."

The Commune opens May 19 in Toronto.