Platinum-group elements (referred to as PGE, comprising Pt, Pd, Rh, Ru, Ir, and Os) are strategic metals with a wide variety of industrial applications. Most of the world's PGE production is mined from large mafic-ultramafic intrusions such as the Bushveld Complex in South Africa, which currently provides 75% of the world's Pt production. The PGE mineralization is found within distinctive layers, tens to hundred of centimeters thick but extending laterally for many tens of kilometers, where the PGE occur at low parts per million levels as platinum-group minerals (PGM) and in solid solution within disseminated base-metal sulfides. There is still heated debate at the most fundamental level about the mode of formation of this class of deposit; genetic models range from primary magmatic sulfide collection to concentration by migrating halogen-rich fluids. A crucial line of evidence is the spatial relationship between the PGM, which are the most important PGE-bearing phases, and the base-metal sulfide aggregates or blebs. So far, all observations have been carried out using two-dimensional mineralogical studies where textural relationships with other minerals are ambiguous, and with statistical limitations owing to sampling of trace phases intersecting random surfaces. We present the first detailed three-dimensional in situ analysis of the PGM at the sample scale using high-resolution X-ray computed tomography coupled with conventional microscopic and mineralogical study. We find a striking and highly consistent relationship of PGM grains with the edges of complex-shaped magmatic sulfide blebs, and the intersection of these blebs with chromite-silicate grain boundaries. These new three-dimensional observations strongly support an orthomagmatic model coupled with nucleation and growth of PGM at the margins of sulfide liquid droplets.