Engineered nanoporous and nanostructured films