Notifications
Clear all

[Closed] About 3dMax export Skeleton

I use IGame to export the skeleton, but have some questions. I want to calculate the binding position with the skeleton. The function with

IGameSkin->GetInitBoneTM(IGameNode * boneNode, GMatrix &intMat)

can get the bone TM when skin was added. But it will return false the the param is root bone. There is another function

GetInitSkinTM(GMatrix & intMat)

in IGameSkin. But it always return a Identity matrix. So how can I get the binding position with root bone?

11 Replies

For your root bone maybe try getting TM using:

ISkinPose* GetISkinPose(INode& n)

…and then get the the parts using:

SkinPos()
SkinRot()
SkinScale()

Then build your IGame node’s TM from this info.

1 Reply
(@htz92127)
Joined: 10 months ago

Posts: 0

Sorry, I didn’t find ISkinPose at all, which head file should I include?

what happens when you try something like this ?


matrix3 tm;
Modifier *mod = igameSkin->GetMaxModifier();
ISkin *skin = (ISkin *)mod->GetInterface(I_SKIN);
if (skin)
{
	INode* boneNode = igameSkin->GetBone(index)
	if (boneNode)
	{
			
		skin->GetBoneInitTM(boneNode, tm );
	}
}	
1 Reply
(@htz92127)
Joined: 10 months ago

Posts: 0

sorry, there is no ISkin at all. I use the SDK of 2010, whether an problem with that version?

is anybody know?

Let me check…

This is the header file you need to include:

#include <iSkinPose.h>

Search the SDK help docs on the ISkinPose Class Reference and you’ll see all the class methods.

2 Replies
(@htz92127)
Joined: 10 months ago

Posts: 0

Thanks. I have see the class. But it’s not return the right info.
I find that GetInitBoneTM return false is because the bone is not actually used by the skinned mesh.

There is another problem, some vertices isn’t be effected by any bone, skinned mesh can display will well in the 3ds max, but not for export it. how can I deal that?

(@archangel35757)
Joined: 10 months ago

Posts: 0

You can set the skin pose for a node (bone, shape object, whatever…) without a skin modifier. And use this class’s methods to retrieve it.

sorry, there is no ISkin at all. I use the SDK of 2010, whether an problem with that version?

I use 2010, a lot and it’s there for me. did you add ?


#include <iskin.h>
1 Reply
(@htz92127)
Joined: 10 months ago

Posts: 0

Thanks. I have try it, and ISkin->GetBoneInitTM return SKIN_OK.