Vulcanizing the material before foaming