Scalar particle production in Schwarzschild and Rindler metrics