Insect eyes have an anti-reflective coating, owing to nanostructures on the corneal surface creating a gradient of refractive index between that of air and that of the lens material1,2. These nanocoatings have also been shown to provide anti-adhesive functionality3. The morphology of corneal nanocoatings are very diverse in arthropods, with nipple-like structures that can be organized into arrays or fused into ridge-like structures4. This diversity can be attributed to a reaction-diffusion mechanism4 and patterning principles developed by Alan Turing5, which have applications in numerous biological settings6. The nanocoatings on insect corneas are one example of such Turing patterns, and the first known example of nanoscale Turing patterns4. Here we demonstrate a clear link between the morphology and function of the nanocoatings on Drosophila corneas. We find that nanocoatings that consist of individual protrusions have better anti-reflective properties, whereas partially merged structures have better anti-adhesion properties. We use biochemical analysis and genetic modification techniques to reverse engineer the protein Retinin and corneal waxes as the building blocks of the nanostructures. In the context of Turing patterns, these building blocks fulfil the roles of activator and inhibitor, respectively. We then establish low-cost production of Retinin, and mix this synthetic protein with waxes to forward engineer various artificial nanocoatings with insect-like morphology and anti-adhesive or anti-reflective function. Our combined reverse- and forward-engineering approach thus provides a way to economically produce functional nanostructured coatings from biodegradable materials.