The theory of multilayer adsorption of gases, namely the Pickett equation, has been developed to the case of adsorption on arbitrary surfaces in a molecular and a topological approach. We present the prediction of the fractal dimension for the surface of an adsorbent and for the set of interfaces generated by the growing of layers. The theoretical models correctly predict quantities and qualitative features of the experiment for two systems: adsorption of water vapor (T = 298 K) on the sample of lunar regolith and of nitrogen (T = 77 K) on a coal sample.