HOLLYWOOD — The mountain range behind the frontier town was four feet wide, painted in oils on a sheet of glass, and Hollis Grieve spent most of three weeks getting the light on its farthest peaks to match a sunset meant to last nine seconds on screen.

Mr. Grieve, among the last of the studio matte painters who worked in oil on glass before the craft moved into computers, died March 18 at a care facility in North Hollywood. He was 91. His son said the cause was complications of Parkinson’s disease.

For most of the last century, the illusion of distance in a film was frequently a lie told with a brush. Where a set stopped — at the top of a half-built facade, just past the lip of a soundstage — the matte painter supplied the rest. The upper floors of a tower that had been built only to its second story. A canyon that had never been dug. Grieve painted on glass positioned in front of the camera, leaving a clear window in the pigment through which the live actors, and only the actors, showed through.

He came to it sideways. Born in Racine, Wisconsin, in 1932, he trained as a sign painter and drifted to Los Angeles in 1955 with a portfolio of lettered store windows and no film contacts at all. A scenic shop took him on to mix paint. Within a year he was trusted with skies, and skies, he liked to say, were the whole job — everything a matte painter did was, in the end, an argument about light.

“You were never supposed to notice Hollis’s work. That was the measure of it,” said Reuben Castellanos, a visual-effects artist who apprenticed with him in the 1980s. “If the audience looked at the mountain instead of the man, you had failed. Hollis failed maybe twice in forty years, and he could name both.”

The move to digital effects in the 1990s ended the trade as he had practiced it, and he was clear-eyed about that. He learned enough of the software to keep working into semi-retirement, matte-painting on a monitor for another decade, and told younger artists the tools mattered less than they feared; the argument about light was the same argument. The recent slump in production, he noted last year, had emptied out stages he once painted backgrounds for, and he did not expect to see them full again.

He is survived by his son, Peter Grieve, of Glendale; a daughter, Ann Sturdivant, of Eugene, Oregon; three grandchildren; and a sister, Louise, in Wisconsin. His wife, Marian, died in 2018.

The glass paintings themselves rarely survived; most were scraped and reused, the canyon washed off to make room for the next one. What remains of Grieve’s work is embedded in the films, unnoticed by design — a horizon here, a far ridge there, holding still behind the actors while the sun goes down exactly on cue.