This new wave is also opportunistic. But in a much hotter real estate market with lower start-up costs, it’s driven as well by a taste for “authenticity,” “character” and other buzzwords today’s tech firms love. At the same time, constructing anything new here is a major headache. The city is crippled by an obstructionist set of city planning rules — the consequence of local activism and a Talmudic bureaucracy. Legislation from the mid-’80s caps the total amount of new office space that can be built here. All this contributes to why adaptive reuse has taken hold.

At a glance, you can miss some of the tech incubators among the fleabag hotels and strip joints hanging on in SoMa, the swiftly gentrifying neighborhood South of Market. They’ve painted the facades of former industrial supply shops and garages black or gray and added frosted windows. On ritzy Alamo Square, high atop the city, a few of the so-called Painted Ladies that tourists and postcard illustrators love — colorful Victorian mansions — have been outfitted with bespoke bars, game rooms, conference centers and Japanese teahouses. The vibe mixes ashram, frat house and high-end brothel.

That said, the beating heart of adaptive reuse in San Francisco is the Mid-Market neighborhood, long a pit of entrenched homelessness and despair, where shuttered theaters, storefronts, furniture showrooms and disused office buildings were regarded as the equivalents of gas-guzzling old Buick Rivieras and Chrysler Imperials — until tech companies, in a hurry to set up shop, flush with cash and encouraged by a payroll tax incentive from the city, recognized the potential for renovation. Despite its problems, the area had advantages, including its central location and links to mass transit, that were crucial for employees commuting to work.

From what I saw, results so far have produced some surprisingly airy working quarters, although too many offices rely on the same assortment of repurposed railroad ties, Edison bulbs and bare concrete walls — tech’s default mode for architectural character. Even with the de rigueur locavore cafeterias and in-house yoga studios, the atmosphere, not surprisingly, feels about as chill as a Department of Motor Vehicles. A dozen or so companies granted me only off-the-record tours. Bad publicity has made tech firms skittish. Stories about Google buses and tweeting techies dissing the city’s homeless have added to public anger over companies like Zynga, the social gaming outfit, saving roughly $1.5 million in payroll taxes in 2011, only to turn around and lay off 520 workers.

But tech firms clearly make convenient whipping boys. Twitter, in partnership with a nonprofit for the homeless, is contributing computers and investing more than $1 million in a center where the company’s employees teach tech skills to poor city residents. Employees at Zendesk, the Danish customer-service software firm that helped lead the Mid-Market boom when it renovated a former furniture and carpet store in 2011, have put in hundreds of hours of community service in return for the company’s payroll tax break.