We investigated the physical mechanism for the pattern transition from square lattice to stripes, which appears in vertically oscillating granular layers. We present a continuum model to show that the transition depends on the competition between inertial force and local saturation of transport. By introducing multiple free-flight times, this model further enables us to analyze the formation of superlattices as well as hexagonal lattices.