The early stages of the self-assembly process of polystyrene beads for photonic applications