Eyes differ markedly in the animal kingdom, and are an extreme example of the evolution of multiple anatomical solutions to light detection and image formation. A salient feature of all photoreceptor cells is the presence of a specialized compartment (disc outer segments in vertebrates, and microvillar rhabdomeres in insects), whose primary role is to accommodate the millions of light receptor molecules required for efficient photon collection. In insects, compound eyes can have very different inner architectures. Fruitflies and houseflies have an open rhabdom system, in which the seven rhabdomeres of each ommatidium are separated from each other and function as independent light guides. In contrast, bees and various mosquitoes and beetle species have a closed system, in which rhabdomeres within each ommatidium are fused to each other, thus sharing the same visual axis. To understand the transition between open and closed rhabdom systems, we isolated and characterized the role of Drosophila genes involved in rhabdomere assembly. Here we show that Spacemaker, a secreted protein expressed only in the eyes of insects with open rhabdom systems, acts together with Prominin and the cell adhesion molecule Chaoptin to choreograph the partitioning of rhabdomeres into an open system. Furthermore, the complete loss of spacemaker (spam) converts an open rhabdom system to a closed one, whereas its targeted expression to photoreceptors of a closed system markedly reorganizes the architecture of the compound eyes to resemble an open system. Our results provide a molecular atlas for the construction of microvillar assemblies and illustrate the critical effect of differences in a single structural protein in morphogenesis.