In Müllerian mimicry individuals of different species benefit from decreased risks of attacks by sharing similar color patterns. Usually, visually oriented predators learn to avoid their aposematic patterns. Consequently, selection should favor convergence of color patterns among unpalatable species in a community. In fact, several unpalatable species with similar color patterns often occur within ecological communities, forming mimetic rings. In species-rich mimetic assemblages, however, unpalatable species may form several mimetic rings. The coexistence of multiple rings seems paradoxical considering that selection among unpalatable species should favor convergence and thus reinforce a single color pattern. One possible explanation for the coexistence of multiple mimetic rings is that different rings evolved in distinct habitats. However, even if a community is structured with many heterogeneous habitats, we might not see the emergence of multiple mimetic rings if some species were habitat generalists. We combined mathematical modelling and computer simulation to better understand: 1) How does habitat heterogeneity influence the formation of mimetic rings? 2) How does the presence of habitat generalists affect the formation of mimetic rings in a heterogeneous community?
Using a network based single-trait coevolutionary model we showed that distinct selection pressures, derived from habitat heterogeneity, favored the formation of distinctive mimetic rings. These mimetic rings are more distinct if there is no species that are habitat generalist. In this scenario, selection imposed by müllerian mimics favors the same color patterns favored by habitat selection. Simulations in which there was just one selection pressure, biotic or abiotic, time for convergence was faster than when both sources of selection acted together. This shows that there might be conflicting selective pressures exerted by the biotic and abiotic pressures, not favoring the same selective optimum. The presence of habitat generalists species affected the formation of mimetic rings. If 10% of species were habitat generalists, there was still the formation of distinct mimetic rings. However, species converged to more similar trait values, decreasing the distinctiveness of mimetic rings. A unique mimetic ring was formed if the different habitats optima in the community were very similar or when most species were habitat generalists. Our results suggest that multiple sympatric mimetic rings are only possible in groups of animals that are strongly affected by habitat heterogeneity such as butterflies.