Sign in to follow this  
lucky6969b

How to clear "attribute groups" in max?

Recommended Posts

lucky6969b    1330

In my Direct3D applications, I got 2 attribute groups that one of them has a material index of 1 (0 and 1). In my hierarchy loader, it gets 2 attribute groups on that subset and only 1 material on that subset (0). When I was looping it,

 

for (int i = 0; i < boneMesh->m_NumAttributeGroups; i++)

{

int mtrlIndex = boneMesh->attributeTable[i].AttribId;
g_pDevice->SetMaterial(&(boneMesh->materials[mtrlIndex]));

////...

}

 

say i is 2, then mtrlIndex is 1. So a problem arises, as the loader only has index 0 in the buffer, I don't have that material in attribute group 2.

 

So my problem is how do I clear attribute groups in max? How does it relate to materials?

Thanks

Jack

Edited by lucky6969b

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this