the nudity and sex scenes in Nymphomaniac,
"To produce scenes of simulated sex, von Trier used digital compositing to superimpose the genitals of pornographic film actors onto the bodies of the film's actors. Producer Louise Vesth explained during the Cannes Film Festival:
We shot the actors pretending to have sex and then had the body doubles, who really did have sex, and in post we will digital impose the two. So above the waist it will be the star and the [sic] below the waist it will be the doubles.
Gainsbourg and Martin further revealed that prosthetic vaginas and closed sets were used during filming. Martin stated that her acting experience for the film was enjoyable and, after explaining that the film's characters are a reflection of the director himself, referred to the process as an "honour." Martin also stated that shooting the sex scenes was a bit boring due to their technical nature."
Nymphomaniac (film) - Wikipedia