Size and density mediate transitions between competition and facilitation.