LAST FALL, IN a tiny apartment in downtown New York, a 30-year-old gay physique model named Matthew Williams stood naked against a white backdrop in front of the gay artist John MacConnell. “It’s liberating to be able to be comfortable in your body,” Williams said, barely moving his lips as he concentrated on holding still. The 33-year-old MacConnell — boyish, equally fit — wore black jeans and a white T-shirt as he sketched on a letter-size sheet of paper with his blue ballpoint pen. “It’s important for me to capture likeness and not just a body,” he said.

The male nude is, of course, one of the oldest artistic fixations: The Riace bronzes, Greek sculptures cast around 450 B.C., depict naked, bearded warriors as exemplars of masculine strength and beauty; “Farnese Hercules,” a third-century B.C. marble sculpture of the mythical hero, once stood at Rome’s Baths of Caracalla. Over the next 2,000 years, capturing the naked male form became an essential artistic skill, one that reached its apotheosis in Western culture during the Italian Renaissance, when homosexual desire was subtly expressed in Donatello’s bronze “David” (circa 1440) and Caravaggio’s painting “The Musicians” (1597), wherein the traditional female muse is replaced with a band of boys, partially robed in togas, referencing a Greek and Roman period in which homoerotica was a part of society. The artist was playing “a little erotic game,” says the retired N.Y.U. classics professor Andrew Lear, 59, who now runs Oscar Wilde Tours, a company that offers excursions focused on implicitly gay art and history in major museums.

But while some old masters fetishized the male body in barely coded ways, the idea of an openly queer artist expressing his desires from a queer perspective was only born in the last century. The pioneering Works Progress Administration painter Paul Cadmus was among the first to introduce an explicit male-on-male gaze into contemporary art, often at the expense of his own reputation: A retired admiral wrote a letter to the secretary of the United States Navy claiming Cadmus had a “sordid, depraved imagination,” after seeing an image of his satirical painting “The Fleet’s In!” (1934), in which crew members fraternize while on shore leave. At the insistence of the Navy, the Corcoran Gallery of Art in Washington, D.C., pulled the painting from a planned 1934 exhibition (it wasn’t shown publicly until 1981). Indeed, criticism of works like Cadmus’s during an era in which homosexuality was still forbidden pushed many of these artists into the underground, from where they’re still being unearthed today. (It’s perhaps not coincidental that Alan Hollinghurst’s latest novel, “The Sparsholt Affair,” a gay retelling of Britain in the 20th century, includes a 1940s-era artist trying to pursue a classmate at Oxford by drawing his figure.)