Selective thermal emission in a useful range of energies from a material operating at high temperatures is required for effective solar thermophotovoltaic energy conversion. Three-dimensional metallic photonic crystals can exhibit spectral emissivity that is modified compared with the emissivity of unstructured metals, resulting in an emission spectrum useful for solar thermophotovoltaics. However, retention of the three-dimensional mesostructure at high temperatures remains a significant challenge. Here we utilize self-assembled templates to fabricate high-quality tungsten photonic crystals that demonstrate unprecedented thermal stability up to at least 1,400 °C and modified thermal emission at solar thermophotovoltaic operating temperatures. We also obtain comparable thermal and optical results using a photonic crystal comprising a previously unstudied material, hafnium diboride, suggesting that refractory metallic ceramic materials are viable candidates for photonic crystal-based solar thermophotovoltaic devices and should be more extensively studied.