The science behind a spray-on dress