Semi-solid processing of complex-shaped foamable material