Graphite and various transition-metal dichalcogenides have been found to be ideal scanning tunneling microscope (STM) substrates. In this paper we discuss the effects of point defects on the STM images of these materials. We find that the height of the protrusion in a STM image caused by a localized perturbation in the potential is dependent on the tip–sample separation. With a tight-binding approximation we can predict for graphite how the magnitude of the protrusion depends on the scanning height, and how this dependence may be used to predict the type of impurity.