Perovskite solar cells (PSC) are promising potential competitors to established photovoltaic technologies due to their superior efficiency and low-cost solution processability. However, the limited understanding of the crystallization behaviour hinders the technological transition from lab-scale cells to modules. In this work, advanced phase field (PF) simulations of solution-based film formation are used for the first time to obtain mechanistic and morphological information that is experimentally challenging to access. The well-known transition from a film with many pinholes, for a low evaporation rate, to a smooth film, for high evaporation rates, is recovered in simulation and experiment. The simulation results provide us with an unprecedented understanding of the crystallization process. They show that supersaturation and crystallization confinement effects determine the final morphology. The ratio of evaporation to crystallization rates turns out to be the key parameter driving the final morphology. Increasing this ratio is a robust design rule for obtaining high-quality films, which we expect to be valid independently of the material type.