New technique shines light on nanomaterials