‘Swimming Pool’ treads water

A movie that relies on a trick ending better have two things going for it:

1. The story is so compelling that even if the trick doesn’t work, the picture is still enjoyable.

2. The ending is so clever that it makes any prior weaknesses easy to forgive.

“Swimming Pool,” an ominous ditty from French art-house director François Ozon, fails in both respects. The thriller never capitalizes on the intrigue of its setup, and its slow, methodical pacing hardly makes for edge-of-your-seat viewing.

Most frustrating is that the payoff is so murky that audience members will recognize they have been fooled, but not with what that trick actually means.

At least there is enough delightfully gratuitous nudity to distract one from having to think too hard.

The film stars Charlotte Rampling as Sarah Morton, a renowned British mystery writer in her mid-50s who is experiencing career burnout. Tired of recycling the same character in different settings, she accepts an offer from her publisher John Bosload (Charles Dance) to spend a few weeks at his country estate in France.

At first, the secluded, wooded setting is perfect for clearing away her literary cobwebs, and she begins banging out new material on her laptop. But then John’s teenage daughter Julie (Ludivine Sagnier) shows up uninvited. A rebellious hedonist who brings home a different creep to bed every night, Julie provokes instant contempt from Sarah. Initially, the girl tries to make friends with her housemate, but the author’s icy demeanor causes the strained feelings to become mutual.

“You’re just a frustrated English woman who writes about dirty things but never does them,” Julie tells her.

That all changes when a waiter from a nearby restaurant who’s been flirting with Sarah becomes Julie’s latest invited guest. Soon the situation has magnified into something more menacing, and Sarah begins mimicking the behavior of the detective heroine in her books.

For his first English-language effort, Ozon casts two of his favorite leading ladies (Rampling starred in the filmmaker’s “Under the Sand” and Sagnier in “8 Women”). He draws distinct performances from the pair, and their relationship is what gives the picture its primary potency.

Rampling, a rather fearless actress who has been part of British cinema since the mid-1960s, offers her most memorable outing since 1982’s “The Verdict.” Her Sarah is a bitter, condescending woman whose success in one genre has become her own personal cage.

As her publisher remarks when she suggests a different approach to her work, “I don’t think writing about feelings is your strong suit.”

What possibly caused her to end up like this provides one key to solving the film’s central mystery.

Equally good in her own way is the alluring Sagnier. Even though the actress is really a 24-year-old, she effectively evokes that post-high school age where a girl’s emotional maturity hasn’t yet caught up with her physical development.

Ozon (and co-writer Emmanuele Bernheim) use the locale’s swimming pool as a metaphor for Sarah’s own emotional/sexual state. At first, we see it covered with tarp and filled with leaves. Sarah wants no part of this “cesspool of living bacteria.” But Julie gradually undrapes and cleans the pool — a move that mirrors Sarah’s transition from raincoat-clad prude to naked seductress.

Eventually, the swimming pool starts to represent something more sinister.

It’s hard to discuss the film’s ending without being a spoiler. Like the equally frustrating “Identity” from earlier this year, the perspective presented here is overly manipulative. So let’s just say the movie can be viewed as a literary revenge fantasy as seen through the eyes of a jilted lover. (Perhaps that’s one cinematic reason Ozon chooses to focus only on Rampling’s face when Julie has a long monologue.)

Even that explanation doesn’t completely hold water if all the pieces of the plot are scrutinized.

“Swimming Pool” wants to make viewers believe it’s deep, but beneath the surface it’s still rather shallow.

Charlotte Rampling, right, and Ludivine Sagnier star in the twisty thriller Swimming