It’s complicated for artists and designers to replicate how light plays off the folds of cloth or fabric. Some research has already gone into how to more accurately and efficiently reproduce those materials in computer renderings, and now a computer-sci team is suggesting a different way–and the results don’t look half-bad.

Google software engineer Iman Sadeghi previously worked on a system for rendering hair in Disney’s “Tangled” (which, the trailer confirms to me, featured a lot of hair). Now Sadeghi is turning his attention to the similarly problematic cloth.

{!! $img_subtitle !!}

Basically, the system works by breaking down the cloth to the level of individual threads, modeling how each thread reflects light. Then, based on how those threads are stitched together in a material (velvet is different than polyester, and reflects light differently), the program simulates the cloth. Since the process is super-granular, the researchers say they can simulate any type of cloth–even if it doesn’t really exist. (Silk plus polyester threaded with a shantung pattern? Sure!) To make that possible, the team examined threads under a microscope, examining and measuring how different materials and patterns reflected light.

If you’re technically minded, you can check out the details of the process here. Otherwise, enjoy these shiny pillows.