Animal collective behavior is often modeled with self-propelled particles, assuming each individualhas “omniscient” knowledge of its neighbors. Yet, neighbors may be hidden from view and we donot know the effect of this information loss. To address this question, we propose a visual model ofcollective behavior where each particle moves according to bio-plausible visual cues, in particular theoptic flow. This visual model successfully reproduces three classical collective behaviors: swarming,schooling, and milling. This model offers a potential solution for controlling artificial swarms visually.