Use unsigned int as material id.