Custom crystals control photons