We present substantial extensions to the Monte Carlo radiative transfer code
TARDIS to perform spectral synthesis for type II supernovae. By incorporating a
non-LTE ionization and excitation treatment for hydrogen, a full account of
free-free and bound-free processes, a self-consistent determination of the
thermal state and by improving the handling of relativistic effects, the
improved code version includes the necessary physics to perform spectral
synthesis for type II supernovae to high precision as required for the reliable
inference of supernova properties. We demonstrate the capabilities of the
extended version of TARDIS by calculating synthetic spectra for the
prototypical type II supernova SN1999em and by deriving a new and independent
set of dilution factors for the expanding photosphere method. We have
investigated in detail the dependence of the dilution factors on photospheric
properties and, for the first time, on changes in metallicity. We also compare
our results with two previously published sets of dilution factors by Eastman
et al. (1996) and by Dessart & Hillier (2005), and discuss the potential
sources of the discrepancies between studies.Comment: 16 pages, 12 figures, 2 tables, accepted for publication in A&