Microporosity induced by nucleation and growth processes in crystalline and non-crystalline films