Observations of high-redshift quasars at z > 6 indicate that they harbour supermassive black holes (SMBHs) of a billion solar masses. The direct collapse scenario has emerged as the most plausible way to assemble SMBHs. The nurseries for the direct collapse black holes are massive primordial haloes illuminated with an intense UV flux emitted by Population II (Pop II) stars. In this study, we compute the critical value of such a flux (J_{21}^crit) for realistic spectra of Pop II stars through three-dimensional cosmological simulations. We derive the dependence of J_{21}^crit on the radiation spectra, on variations from halo to halo, and on the impact of X-ray ionization. Our findings show that the value of J_{21}^crit is a few times 104 a...