We introduce a new construction involving Rees matrix semigroups and max-plus algebras that is very convenient for generating sets of centroids. We describe completely all optimal sets of centroids for all Rees matrix semigroups without any restrictions on the sandwich matrices.