Fabrication of thin films with highly porous microstructures