Original Post
how to index the material Id of the face of a mesh in 3ds max? I known the Id could be gained just in this way: pMesh->getFaceMtlIndex(i) but which material is index 0? which material is index 1? .... Should I using the method just like the followwing ? Or shuold I gain the material through the 24 material balls? Or other methods? Anyone can help me? Thx in advance!
void extractMtls(Mtl* pMtl)
{
if(pMtl &&pMtl->ClassID() == Class_ID(DMTL_CLASS_ID, 0))
{
mtlVector.push_back((StdMat*)pMtl);
}
int subId;
for(subId = 0; subId < pMtl->NumSubMtls(); subId ++)
{
extractMtls(pMtl->GetSubMtl(subId));
}
}