Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / FBX skeleton - Need Help
  RSS 2.0 ATOM  

FBX skeleton - Need Help
Rate this thread
 
63998
 
Permlink of this thread  
avatar
  • Total Posts: 3
  • Joined: 22 January 2012 07:38 PM

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



Replies: 2
/userdata/avatar/vx3501hqr_small.jpg

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/for...he-vertices-of-a-cluster/

Hope these are helpful.

Author: Jiayang Xu

Replied: 31 January 2012 05:28 PM  
/img/forum/dark/default_avatar.png

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,

Author: Masterbubu

Replied: 01 February 2012 02:57 AM  
avatar

Anyone?



Replies: 0
avatar

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.



Jiayang Xu
Maya Data Platform
Autodesk

Replies: 0
avatar

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.



Replies: 0