Process of formation of gametes from their germ cells. During this process, the number of chromosomes is reduced from diploid (46) to haploid (23) through meiosis. While maturation of the male gamete occurs through the mechanism called spermatogenesis, maturation of the female gamete occurs with ovogenesis.