Etching of the substrate by chemical or physical means