Local-density-functional calculations are carried out on vanadium and erbium centers in 4H-SiC. Particular attention is paid to their electrical and optical properties. We find that both V and Er lie at Si sites and can exist in three charge states with deep donor and acceptor levels. While isolated VSi possesses intra-d and ionization induced optical transitions around 0.94 and 2.9 eV respectively, the intense and temperature stable intra-f optical transitions due to Er are unlikely to be due to an isolated Er defect. It is suggested that both impurities can trap H and N forming complexes which may limit the electrical efficiency of V and act as Er related exciton traps.