I don’t know who invented the trompe l’oeil nail (sticking out from the surface of a painting); it may have been some dude decorating a tomb in southern Italy circa 300 BCE.
It doesn’t matter; it’s always been a popular trope.
Vermeer, though, did a great job with nail holes, especially in The Milkmaid.
Especially the one beyond her left shoulder.
Art historians, of course, don’t quite get it—Jorgen Wadum, chief conservator at Mauritshuis, who was in charge of the restoration of View and Girl with a Pearl Earring in the early nineties, writes in “Contours of Vermeer”:
The shadow of the nail in the wall above the head of The Milkmaid and in the upper left corner of The Woman Holding a Balance were important statements meant to give the eye a sense of space and to set the backdrop. Yet these walls, with all their flaking plaster and nail holes, are rarely seen in other seventeenth-century paintings with bourgeois interiors. They also form part of the captivating power of fooling the eye, similar to the illusion created by the curtain hanging in front of Girl Reading a Letter at an Open Window.
More sensitive is Lisa Vergara, on Lady Writing a Letter: “to the right of the letter writer, two nail holes, depicted on the bright wedge of plastered wall, establish that this is the same far plane as its shadowed counterpart at left (cover the nail holes and the brightness jumps forward).”
See also: the (often-discernible) holes left where the pins holding the string for drawing perspective lines were pulled out.
But the real truth about Vermeer’s nail holes is that they were holes; mini-3-D in the other direction.
Inflections on the rear plane.
The common gesture was to pierce the rear wall with an interior door, the move deeper along a corridor, out the back door, across the street….
Or, conversely, to decorate the wall with a map or a painting or a mirror….
Vermeer could make do with less.