Forming three-dimensional containers from sheet material