We present results of numerical 3D simulation of propagation of MHD waves in sunspots. We used two self consistent magnetohydrostatic background models of sunspots. There are two main differences between these models: (i) the topology of the magnetic field and (ii) dependence of the horizontal profile of the sound speed on depth. The model with convex shape of the magnetic field lines near the photosphere has non-zero horizorntal perturbations of the sound speed up to the depth of 7.5 Mm (deep model). In the model with concave shape of the magnetic field lines near the photosphere ∆ c/c is close to zero everywhere below 2 Mm (shallow model). Strong Alfven wave is generated at the wave source location in the deep model. This wave is almost unnoticeable in the shallow model. Using filtering technique we separated magnetoacoustic and magnetogravity waves. It is shown, that inside the sunspot magnetoacoustic and magnetogravity waves are not spatially separated unlike the case of the horizontally uniform background model. The sunspot causes anisotropy of the amplitude distribution along the wavefront and changes the shape of the wavefront. The amplitude of the waves is reduced inside the sunspot. This effect is stronger for the magnetogravity waves than for magnetoacoustic waves. The shape of the wavefront of the magnetogravity waves is distorted stronger as well. The deep model causes bigger anisotropy for both mgnetoacoustic and magneto gravity waves than the shallow model.