The process that gives rise to the mesoderm. This process pertains to the initial formation of the structure from unspecified parts. [ GOC:go_curators ]