Dependence of luminescence of titanates on their crystal structure