Vacancies line up and open the way for current
A transparent film of bismuth tungstate sits on a substrate and does not conduct electricity. Three minutes in a cloud of nitrogen plasma, and it turns black, with resistance dropping by a factor of a billion.