Change materials to use setProperties function