"If you pack ping-pong balls into a litre container, you will get in less weight than if you pack ball bearings into the same litre container (not both at the same time, obviously). The ping-pong balls displace a lot of space between them, and are full of air to start with, the ball-bearings are denser and smaller so more will fit in, so the ratio is different."
Ping pong balls are obviously less dense than steel balls because they're full of air, but their size makes no difference, the proportion of space occupied is the same regardless of size. In the case of hexagonal close packed spheres, 74% of the space is occupied and 26% empty. If you use a mix of large and small, the packing density increases, because the small ones can fill some of the empty space between the larger ones. That why concrete is mixed with sand and gravel, not just one or the other.
Shape obviously matters, because if you use shapes that tessellate like cubes you can achieve 100% packing density. You will only get maximum packing density if the space is packed carefully though, in general the contents are just thrown in, in which case friction and vibration matter too. In order to get a high packing density objects have to be able to slide over one another as they drop down, and as friction prevents this you can assist by vibrating the container, that's why contents settle in transit or when you bang a jar on the table. Flexibility also matters, if objects are flexible rather rigid they can deform under pressure to occupy more of the waste space.