Coating different parts of the substrate with different materials