  The chemical compositions of stars encode the history of the universe and are
thus fundamental for advancing our knowledge of astrophysics and cosmology.
However, measurements of elemental abundances ratios, and our interpretations
of them, strongly depend on the physical assumptions that dictate the
generation of synthetic stellar spectra. Three-dimensional
radiation-hydrodynamic (3D RHD) ``box-in-a-star'' simulations of stellar
atmospheres offer a more realistic representation of surface convection
occurring in late-type stars compared to traditional one-dimensional (1D)
hydrostatic models. As evident from a multitude of observational tests, the
coupling of 3D RHD models with line-formation in non-local thermodynamic
equilibrium (non-LTE) today provides a solid foundation for abundance analysis
for many elements. This review describes the ongoing and transformational work
to advance the state-of-the-art and replace 1D LTE spectrum synthesis with its
3D non-LTE counterpart. In summary:
  1) 3D and non-LTE effects are intricately coupled and consistent modelling
thereof is necessary for high-precision abundances, which is currently feasible
for individual elements in large surveys. Mean 3D (<3D>) models are not
adequate as substitutes.
  2) The solar abundance debate is presently dominated by choices and
systematic uncertainties that are not specific to 3D non-LTE modelling.
  3) 3D non-LTE abundance corrections have a profound impact on our
understanding of FGK-type stars, exoplanets, and the nucleosynthetic origins of
the elements.

Solar and Stellar Astrophysics