Fundamental properties of lead and tin nanocrystals in a dielectric matrix