Britain, world champions Japan and defending champions the United States were named as the top three seeds in the women's competition.
The men's tournament comprises 16 teams in four first round groups, with Britain, taking part in their first Olympic finals since 1960, in Group A.
Mexico, the top-ranked team among the qualifiers from Asia, Africa, Oceania and their own CONCACAF region, were seeded in Group B.
Brazil, who have the best overall playing record in the Olympics despite never winning the gold medal, will head up Group C with Spain in Group D.
The women's competition comprises 12 teams in three groups with Britain playing in the very first event of the entire games on July 25, two days before the opening ceremony.
They will discover their opponents for the opening Group E match at Cardiff's Millennium Stadium when the draw is made on Tuesday.
(For more sports news and updates, follow Ahram Online Sports on Twitter:@AO Sports)