We humans like to think of ourselves as the masters of design but sometimes Mother Nature shows us that we’re really just amateurs. That’s exactly what happened with scientists studying peacock spiders in Australia. After puzzling over how the tiny spiders produce colorful rainbow patterns on their butts, researchers decided to get to the bottom of it and discovered that the pint-sized arachnids are a true marvel of optical engineering.

Peacock spiders are incredibly small. You can fit a dozen or more of them on a single human fingernail, but despite their small size they are incredibly eye-catching creatures. Their butts are covered in colorful iridescent patterns, and while scientists know how to create material that reflects all the colors of the rainbow, they had absolutely no idea how the tiny spiders could achieve the same effect on such a microscopic level.

Finding the answer required an incredible amount of work and, as research paper published in Nature reveals, the team used lots of fancy tools and techniques ranging from electron microscopy to optical modeling. After getting an idea of how the tiny reflective scales on the spiders’ butts were shaped the researchers attempted to replicate them using nano 3D printing. Even with all the power of human technology at their disposal, they couldn’t perfectly copy nature’s design.

“These scales combine an airfoil-like microscopic 3D contour with nanoscale diffraction grating structures on the surface,” the release explains. “It is the interaction between the surface nano-diffraction grating and the microscopic curvature of the scales that enables separation and isolation of light into its component wavelengths at finer angles and smaller distances than are possible with current engineering technologies.”

In short, a bunch of tiny spider butts beat human scientists at their own game. Now the race is on to figure out not only how to perfectly mimic nature’s design, but to find potential applications for the technology once it can be copied. The researchers believe that designs derived from the spider’s flashy scales could be useful in optical applications including spectrometry.

“As an engineer, what I found fascinating about these spider structural colors is how these long evolved complex structures can still outperform human engineering,” Dr. Radwanul Hasan Siddique, co-author of the study and postdoctoral scholar at Caltech, explains. “Even with high-end fabrication techniques, we could not replicate the exact structures. I wonder how the spiders assemble these fancy structural patterns in the first place.”