Transition to the detached divertor regime that allows lowering the peak power loads on the divertor targets to a tolerable level requires low plasma temperature Te ~ 1 eV and high plasma density ne ~ 1021 m−3 in front of the target. Under such conditions, radiation trapping of the Lyman lines of hydrogen isotopes becomes important. It can influence both energy balance and the ionization/recombination rates significantly. Nevertheless, opacity is typically neglected in the 2D edge transport codes used to study the divertor plasma detachment. We report on the first in-depth investigation of radiation opacity effects on transition to detachment. Simulations are performed with the SOLPS 4.3 code package using a DIII-D size tokamak as a particular example. It is found that in pure hydrogen plasma suppression of the neutral hydrogen radiation loss due to the photon absorption makes reaching the detached plasma regime more difficult. A significantly higher average separatrix plasma pressure is required to reach a similar degree of detachment. Adding plasma impurities compensates for the reduced neutral radiation and offsets the effect of opacity. In a carbon device, where the impurity source is due to erosion of the divertor components and is strongly connected to the edge plasma density, the absorbed fraction of the hydrogen radiation is easily compensated with the increasing carbon radiation loss. However, nowadays, in the more relevant case of the full-metal wall and seeded impurity with the feedback-controlled content, the increase of the edge plasma density alone is insufficient to compensate for trapping of the hydrogen radiation. In this case, achievement of the desired degree of detachment requires higher average separatrix plasma pressure or seeded impurity content than those obtained from the transparent plasma model.