A method for modifying a surface of a porous substrate or a surface of a substrate with a specific surface roughness created in a functionalization step to form a superhydrophobic surface at least on parts of the substrate, comprising a functionalization step of functionalizing at least the surface of the substrate by covalently binding an alkyne or alkene group-containing compound thereto to form an alkyne or alkene functionalized porous substrate, wherein the alkyne or alkene group-containing compound represents a monomeric moiety, a first modification step of modifying the alkyne or alkene functionalized surface by reacting the alkyne or alkene groups with at least one first compound, selected from the group consisting of thiols and disulfides, wherein the first modification step is carried out at least on parts of the surface of the substrate and under UV irradiation, a second modification step of modifying unmodified areas of the alkyne or alkene functionalized surface by reacting unreacted alkyne or alkene groups with at least one second compound, selected from the group consisting of thiols and disulfides, wherein the second modification step is carried out under UV irradiation on parts of the surface of the substrate not modified in the first modification step, wherein superhydrophobic areas on the surface are formed in the functionalization step and/or in the first modification step or second modification step, wherein - the first modification step of modifying the alkyne or alkene functionalized surface is carried out by reacting the alkyne or alkene groups with the first compound represented by the general formulae R 1 -SH, or R 1 -S-S-R x using a photomask, thereby creating a pattern of superhydrophilic areas on the surface, and the second modification step of modifying the unmodified areas of the alkyne or alkene functionalized surface is carried out by reacting the unreacted alkyne or alkene groups with the second compound represented by the general formulae R 2 -SH, or R 2 -S-S-R x, thereby creating superhydrophobic areas on the surface, or - the first modification step of modifying the alkyne or alkene functionalized surface is carried out by reacting the alkyne or alkene groups with the first compound represented by the general formulae R 1 -SH, or R 1 -S-S-R x using a photomask, thereby creating a pattern of superhydrophobic areas on the surface, and the second modification step of modifying the unmodified areas of the alkyne or alkene functionalized surface is carried out by reacting the unreacted alkyne or alkene groups with the second compound represented by the general formulae R 2 -SH, or R 2 -S-S-R x, thereby creating superhydrophilic areas on the surface, wherein R 1, R 2 and R x represent either hydrophilic or hydrophobic residues, wherein the hydrophilic residues represented by R 1 and R 2 are at least one member represented by the general formula Q-X, wherein Q represents a substituted or unsubstituted C 1 -C 6 alkyl group, which may contain one or more heteroatoms selected from O, N, P and S, and X represents a (poly)hydroxy group, a (poly)amine group, a (poly)amide group, a (poly)carboxyl group or a sugar moiety, and wherein the hydrophobic residues represented by R 1 and R 2 are at least one member of a substituted or unsubstituted, polyfluorinated or non-fluorinated, linear, branched or cyclic C 6 -C 30 alkyl group, substituted or unsubstituted, polyfluorinated or non-fluorinated linear, branched or cyclic C 6 -C 30 alkenyl group, substituted or unsubstituted, polyfluorinated or non-fluorinated C 6 -C 30 aryl group, wherein the static water contact angle (θ st) of the superhydrophobic areas on the surface is 150° or higher, and the contact angle hysteresis is 10° or less; and the static WCA (θ st) of the superhydrophilic areas on the surface is 10° or less. - the first modification step of modifying the alkyne or alkene functionalized surface is carried out by reacting the alkyne or alkene groups with the first compound represented by the general formulae R 1 -SH, or R 1 -S-S-R x using a photomask, thereby creating a pattern of superhydrophilic areas on the surface, and the second modification step of modifying the unmodified areas of the alkyne or alkene functionalized surface is carried out by reacting the unreacted alkyne or alkene groups with the second compound represented by the general formulae R 2 -SH, or R 2 -S-S-R x, thereby creating superhydrophobic areas on the surface, or - the first modification step of modifying the alkyne or alkene functionalized surface is carried out by reacting the alkyne or alkene groups with the first compound represented by the general formulae R 1 -SH, or R 1 -S-S-R x using a photomask, thereby creating a pattern of superhydrophobic areas on the surface, and the second modification step of modifying the unmodified areas of the alkyne or alkene functionalized surface is carried out by reacting the unreacted alkyne or alkene groups with the second compound represented by the general formulae R 2 -SH, or R 2 -S-S-R x, thereby creating superhydrophilic areas on the surface, wherein R 1, R 2 and R x represent either hydrophilic or hydrophobic residues,