Other builders have developed an affinity for Hollywood. The Durst Organization began fielding requests from movie and TV producers to film in its buildings about five years ago, said Jordan Barowitz, the company’s vice president of public affairs.

“We’re seeing more interest in the residential side, as of late,” said Mr. Barowitz, adding that the company has brought in “well north of seven figures a year” through the agreements.

Recent shoots at Via, the developer’s Far West Side luxury rental tower with an unusual pyramidal facade, have included Bollywood sagas and an upcoming Netflix project. The productions pay from $5,000 for a few hours in an amenities space or apartment to $100,000 for a multiday shoot, Mr. Barowitz said.

Via leased its final units about a year and a half ago, Mr. Barowitz said, but it has had more vacancies recently, as several two-year leases expired. He stressed that the company’s growth in the film world isn’t tied to the strength of the rental market; it is simply an arrangement that has created another revenue stream.

At the Hub, a rental tower in Downtown Brooklyn, a homegrown film director found inspiration in a vacant penthouse.

Spike Lee recently filmed an episode of the forthcoming second season of the Netflix series “She’s Gotta Have It” in a two-bedroom apartment listed for $6,643 a month. That apartment, and the rest of the building, is now leased. Tim Stacker, the location manager for the series, said he had noticed an uptick in developers offering empty apartments for film shoots.

“New developments are attractive to film and TV, because you don’t have to deal with existing tenants, the units are empty, it looks pristine,” said Douglas C. Steiner, the Hub’s developer, who is also the chairman of Steiner Studios, one of the largest film studios in the country.

“I’m hoping not to have empty units,” Mr. Steiner said. But the film business hasn’t treated him poorly either, he added: “It’s found money.”

For weekly email updates on residential real estate news, sign up here. Follow us on Twitter: @nytrealestate.