A computational approach for handling complex composite microstructures