Hi.
People in this moment I have a big problem, I have a simple animation using Maya CubeMan, I can get the Fps values and the time of the animation but, When I get the Matrix in a specify time from a node is always the same is a Identity Matrix But my Node is Rotating in the animation here my code.
myTakeCount = importer.GetTakeInfo(0)
print(myTakeCount.mName, 'Name Of the animation take')#Imprimo el nombre de la toma
start = myTakeCount.mLocalTimeSpan.GetStart()
end = myTakeCount.mLocalTimeSpan.GetStop()
b = scene.GetNode(2)
print(b.GetName(), 'Name of de Node')
CurrenTime = FbxTime()
for i in range(start.GetFrameCount(FbxTime.eFrames24), end.GetFrameCount(FbxTime.eFrames24)):
CurrenTime.SetFramePrecise(i, FbxTime.eFrames24)
TransforMatrix = b.EvaluateGlobalTransform(CurrenTime, FbxNode.eSourcePivot, False, False)
print("imprimiendo Matrix De Transformacion")
print(*TransforMatrix[0])
print(*TransforMatrix[1])
print(*TransforMatrix[2])
print(*TransforMatrix[3])
print("Finalizar")
Thanks
Solved! Go to Solution.
Solved by ilan.keshet. Go to Solution.
I had a look at your FBX file -- you have all your animation keys directly on the mesh itself -- which is not something I handle. -- Usually you have animations on joints that deform the mesh, -- but in your case you don't have deformation, -- but in terms for scalability it's still much better to have skinned animation, but more time consuming to implement.
I'm not super familar with python fbx handling -- but for me, I walk the entire hierarchy of the fbx scene, and then grab out animation keys on the node.
I'm assuming your line of code taking the take from "GetTakeInfo(0)" -- is breaking your stuff.
Each FbxNode has it's own list of takes, and yours is probably returning empty because it is just the take on the first root node. -- Which in your scene has no animation keys.
Hey Thank you.
Yes My fbx File has two takes, In the first take there is no animation, In the other Yes, My animation is on the mesh beceause I just only need an example to take Matrix Transformation for the Nodes animation.
my next Objetive is to get the mesh deformations and play the animation
Thank you so Much.
If you want mesh deformations to work, -- you need to pretty much change everything with your scene.
Also requires somebody with experience with generating a rigged model, though I suppose anyone can learn it
Hi.
Thanks, In this model I don't need to change anything, I only need one Example to Get the transformation Matrix in a specify time "I'm not 3D artist" I just need to play simple animations in the program, Other person will make the animatios, Thanks
Can't find what you're looking for? Ask the community or share your knowledge.