Ion implantation is widely used to introduce electrically or optically active dopant atoms into semiconductor devices. At high concentrations, the dopants can cluster and ultimately form deactivating precipitates, but deliberate nanocrystal formation offers an approach to self-assembled device fabrication. However, there is very little understanding of the early stages of how these precipitates nucleate and grow, in no small part because it requires imaging an inhomogenous distribution of defects and dopant atoms buried inside the host material. Here we demonstrate this, and address the long-standing question of whether the cluster nucleation is defect-mediated or spontaneous. Atomic-resolution illustrations are given for the chemically dissimilar cases of erbium and germanium implanted into silicon carbide. Whereas interstitial loops act as nucleation sites in both cases, the evolution of nanocrystals is strikingly different: Erbium is found to gather in lines, planes and finally three-dimensional precipitates, whereas germanium favours compact, three-dimensional structures.