Detecting and Modelling Porosity in Natural and Engineered Materials