Variation in macromolecular packing density during physical transformation in polymers