The Wallace Collection, on Manchester Square, in central London, contains art works that were gathered in the eighteenth and nineteenth centuries by successive Marquesses of Hertford. The museum, occupying a Georgian mansion, opened to the public in 1900, and is particularly known for its fine eighteenth-century French paintings—among them a small and delicate work by Jean-Honoré Fragonard, which is known in English as “The Souvenir.” It shows a young woman carving an initial into a tree trunk. She is wearing a gown of pink satin, its color enhancing the blush of her cheek. At her feet lies a letter that, presumably, was written by the lover whose initial she is inscribing. She looks dreamy yet determined: the woman is caught in a reverie, but she is also making her mark.

Joanna Hogg first saw “The Souvenir” in 1980, when she was twenty years old. She was taken to see it by a man with whom she had a charged acquaintance, which soon developed into a consuming love affair. At the time, she was living in Knightsbridge and working in Soho, as a photographer’s assistant; she aspired to become a filmmaker but didn’t quite know how to go about it. She wasn’t sure what to make of the Fragonard, or why the man wanted to show it to her. Hogg had spent her teen-age years at a boarding school deemed suitable for the less academically inclined daughters of the affluent and titled, and she had not gone to college. Her companion, who had studied art history at Cambridge University and at the Courtauld Institute, in London, struck her as immensely more knowledgeable. Nine years her senior, he was brimming with the confident, ironical charm bestowed by élite English schools. He wore double-breasted pin-striped suits and bow ties, and he had pronounced aesthetic preferences: Symbolist opera, the movies of Powell and Pressburger, a brand of Turkish cigarette with an elliptical shape.

During the next several years, Hogg enrolled at film school while her lover continued introducing her to his tastes and reshaping her sensibilities. He also exposed her to a less elevating aspect of his personality: a ravaging addiction to heroin, of which there was an epidemic in London in the early eighties. The drug came to dominate their relationship, and the relationship came to dominate Hogg’s life.

Hogg, who is now fifty-nine, recently made a movie, “The Souvenir,” about those years; it will be released on May 17th. The character who stands in for Hogg, named Julie, is played by Honor Swinton Byrne, the daughter of Tilda Swinton (who plays Julie’s mother). Hogg’s lover, named Anthony in the film, is played by Tom Burke. “The Souvenir” is an unsparing depiction of what now would be called codependency but was then simply understood as anguished first love.

The film is obsessively autobiographical. It was shot on an inch-by-inch reconstruction of Hogg’s elegant student digs—a pied-à-terre that her parents kept in Knightsbridge. The set was furnished with objects from Hogg’s youth, including an ornate antique French bed that she and her lover had bought, for a hundred pounds, at auction in 1982. Hogg found old letters and incorporated them into the film. “The vile beast knows itself and miserable he is with it,” Anthony writes to Julie, as Hogg’s lover once wrote to her. “It is you who has power over the beast; to cheer, to encourage, to reprimand, to forgive.” Stretches of dialogue replicate conversations that have been inscribed in Hogg’s memory for decades. Even some of the footage comes from the eighties, when she toted around a Super 8 camera, filming friends and her environs. The production designer of “The Souvenir,” Stéphane Collonge, painstakingly reconstructed the views from the Knightsbridge apartment by digitally combining photographs taken by Hogg. When Julie goes to the window after hearing a nearby explosion—the bombing of Harrods by the I.R.A., in 1983—she looks out on the exact same skyline that Hogg saw when her apartment was shaken by the blast.

The film also offers a moving depiction of Hogg as a would-be artist, delineating the kinds of inhibition that can hinder even a person born to privilege. She began taking notes for “The Souvenir” not long after emerging from the relationship with the man who took her to the Wallace Collection, the traumatic conclusion of which is shown in the movie. (Hogg declines to name the man publicly.) In an entry from 1988, Hogg wrote, “Everyone congratulates her on how well she is coping with it. Ironic because she isn’t ‘coping’ with it at all—she won’t allow herself to.” But Hogg didn’t tell that story, or any story, for years. She didn’t release her first feature film until a decade ago, when she was forty-seven, and “The Souvenir” is only her fourth movie. This summer, Hogg is shooting “The Souvenir: Part II,” a continuation of the story of Julie’s early adulthood. Together, the films will implicitly tell another story: that of a female artist’s belated emergence in middle age, and her discovery that she could create art out of experiences that had once seemed like lost time.

In the short period that Hogg has been making movies, she has established strong visual signatures: she prefers long, often distant takes with a fixed camera, and tends to work with available light. She has become known as a precise and compassionate observer of the British upper middle class, a segment of society that is often either caricatured or glamorized onscreen. Her films have the layered psychology and narrative depth of a nineteenth-century novel; while working on “The Souvenir,” she reread Henry James’s “The Portrait of a Lady.” Hogg’s films examine the world she comes from without embarrassment. “Archipelago” depicts a young man who feels burdened by the expectations of his well-to-do family. “Unrelated” focusses on a group of Britons who go on an extended sojourn to Tuscany. They take in the Palio, shop in Siena’s boutiques, drink Negronis as they lounge by a fifteenth-century villa’s twenty-first-century pool, and play awkward party games that keep the dangerous possibility of real intimacy at bay.

One morning in April, I took the train to Norfolk, two hours northeast of London, and continued on to a former Royal Air Force base near the village of West Raynham. The base closed in the mid-nineties, but in recent years it has found a second life as a business park and an occasional filming location. Part I of “The Souvenir” was almost entirely shot there in the summer of 2017, much of it in one of the base’s vast hangars. A corner of the hangar stood in for the studio where Julie and her film-school classmates work on their projects; when I visited, numbered pieces of “Flat L,” the apartment where Julie lives, leaned against the hangar’s walls, ready to be reassembled for Part II.

Hogg finds it effective to isolate the cast and crew at a single site for the entirety of a shoot. “It’s about containing the energy,” she told me. “Unrelated” (2007), Hogg’s first film, was shot in a villa outside Siena where Hogg had stayed a few years earlier, while taking a painting course. The cast lived there during filming, and the crew stayed in a property down the road. The same method was adopted for “Archipelago” (2010), her second film, which is set in a vacation home in the Scilly Isles, off the coast of Cornwall. In “Unrelated,” which cost only a hundred and fifty thousand pounds to make, the bedrooms did double duty as sets. Hogg discovered that the arrangement also served an artistic purpose, fruitfully blurring the boundary between reality and fiction. Tom Hiddleston, whose first major film role was as an arrogant, wounded Etonian in “Unrelated,” and who has appeared in three of Hogg’s films, told me, “If you’re an actor and your character decides to put the kettle on, if it’s the same kettle you’ve been using every morning for the last six weeks, there’s something about the way you’ll do it which will be very natural. It’s not a prop kettle—it’s the kettle you used this morning to make a cup of coffee. The actors become part of the fabric of the scene, because they’re living it all the time.”