Jump to content
  • Advertisement
Sign in to follow this  
okokook

About export data from 3sd Max Biped/Physique

This topic is 4545 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm writting an plug-in for 3ds Max in roder to export skined skeletal animation. I encountered problem. Can anyone help me? For a SAME node, (1) In order to export its mesh vertices, I use the following code: INode* pSelectedNode = pInterface->GetSelNode(0); GeomObject* NodeGeomObject = static_cast<GeomObject*>(NodeObjectState.obj); Mesh* pMesh = NodeGeomObject->GetRenderMesh(0, pSelectedNode, m_NullView, iNeedDelete); for(int i = 0; i < pMesh->getNumVerts(); ++i) { // Export each vetex. } (2) In order to export the bone influence for each vertex, I use the following code: // Get an IPhyContextExport interface. IPhysiqueExport* pPhysiqueExport = (IPhysiqueExport*)pPhysiqueModifier->GetInterface(I_PHYINTERFACE); IPhyContextExport* pPhyContextExport = (IPhyContextExport*)pPhysiqueExport->GetContextInterface(pSelectedNode); int iNumberOfVertices = pPhyContextExport->GetNumberVertices(); // or, int iNumberOfVertices = objectState.obj->NumPoints(); it is of same result. for(int i = 0; i < iNumberOfVertices; ++i) { // Export weights. } The problem is - the number of vertices and each vertex index in (1) do not coincide with that in (2)! What's the relationship? I mean, for example, I got a vertex index 5 in Mesh, how could I know its index in IPhyContextExport? Is it still 5? It seem not... I'm new on this, please help.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!