Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FBX skeleton - Need Help

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
879 Views, 5 Replies

FBX skeleton - Need Help

Hi,

I trying to understand the viewScene example... I have two problems:

1.
I have cylinder skinned to 2 joints skeleton. I'm trying to move the skeleton in space by
adding translation to the global position of the node. The problem is that the skeleton does transformed, however the skin does not follows the skeleton movement. I have also tried to add the translation to the cluster matrix (pCluster->GetTransformMatrix()), but the results were bad.

2. In my Skeleton::Update function I'm doing:
(A) BoneW = ParentW * BoneL;

I have red online, that BoneL needs to be calculated as follows:
pCluster->GetTransformLinkMatrix(BoneL);
(B) BoneL = BoneL.Inverse(); But currently BoneL is not been calculated relative to its parent, and if I'll multiply it
but the parentWorld, (A) equation will not hold.

If I'll define :
pCluster->GetTransformLinkMatrix(BoneL);
(C) BoneL = ParentW.GetInverse() * BoneL; equation (A) will hold, but then BoneL is not in local space.

please help me in here I'm a bit confused
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

Anyone?
Message 3 of 6
jiayang.xu
in reply to: Anonymous

Hello,
Answer for question 1: If you look into ComputeClusterDeformation() of ViewScene, you can see "GetGlobalPosition(pCluster->GetLink(), pTime, pPose);" is the key to drive skin according to the skeleton(joints, called as link in FBX). So you actually only need to change the lcl translation of the joint, then the ComputeClusterDeformation will take care to drive the skin.

Answers for question2:
A. TransformLink is the global transform of the bone(link) at the binding moment.
so what you get by pCluster->GetTransformLinkMatrix(BoneW) is the BoneW;
B. I did not get this: BoneL = BoneL.Inverse(); What do you mean here?
C. Same reason as for A, BoneL = ParentW.GetInverse() * BoneW, then BoneL is in local space, which is correct.

You can also take a look at this post which explains how the ComputeClusterInformation work:
http://area.autodesk.com/forum/autodesk-fbx/fbx-sdk/getting-the-local-transformation-matrix-for-the-...

Hope these are helpful.
Message 4 of 6
Anonymous
in reply to: Anonymous

Hi,

tnx for the reply.

I'm trying to be independent from FBX code, This means that I can’t use the ComputeClusterDeformation() function in my code. I’m just importing the DS from FBX to my DS.

I already tried this one BoneL = ParentW.GetInverse() * BoneW. Indeed, this will hold the equation:

BoneW = ParentW * BoneL , which will give the bind pose.

I have tried to multiply BoneW with the matrix I got from A = GetGlobalPosition(pCluster->GetLink(), pTime, pPose), But it did not gave me

The right animation.

Also, just to be clear, I’m not talking yet about the skinning. My purpose is to first animate the skeleton properly, then to deal with the skinning.

Please advise,
Message 5 of 6
jiayang.xu
in reply to: Anonymous

Hi,
Although you cannot use ComputeClusterDeformation() function directly, you can still reference the code of that function to understand/implement how FBX realizes skinning.

You mentioned:
I have tried to multiply BoneW with the matrix I got from A = GetGlobalPosition(pCluster->GetLink(), pTime, pPose), But it did not gave me the right animation.

This is really confusing.
Because what you get from GetGlobalPosition(pCluster->GetLink(), pTime, pPose) is BoneW, so why you multiply it with "BoneW" again? And how did you get that BoneW you mentioned?

Also, just to be clear, I’m not talking yet about the skinning. My purpose is to first animate the skeleton properly, then to deal with the skinning.

So what kind of problem you encountered exactly when you try to animate the skeleton? To animation joints of skeleton, you can animate the lclTranlation, lclRotation and lclScaling properties of the joint directly, by adding animation curve and keys to these properties.
Message 6 of 6
Anonymous
in reply to: Anonymous

Jiayang is right, you need to get the animation curves for each time stamp, then interpolate between them to get the bone position for a specific time.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report