|
|
|
Tell us what you think of the site.
|
Autodesk Media & Entertainment User Community
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
|
Autodesk® Smoke on Mac®
|
| How to get 3D position of a model object
|
|
|
Hi,
I have an actor with some mocap data applied in an animation sequence (FBX,C3D).
I would like to step through each frame of the animation, get the 3d position of some joints, and output the values to a file.
I pretty much have everything done, except getting the 3d position of the joints at each step.
At each step in the animation, i get the joint’s model object, and use GetVector() - but that appears to be returning the same value for each step. I can clearly see that the particular joint is moving when I play the animation.
Can anyone tell me what I might be doing wrong (other than being a bonehead) ? O
Thanx!
|
|
|
|
Hi!
This is due to MB realtime engine. Either you need to plot the animation to the joint or run a scene evaluation on each frame!
FBSystem().Scene.Evaluate()
Cheers,
Chris
Choose a job you love, and you will never have to work a day in your life.
|
|
|
|
Hello..From what i understand you’re trying to get the ‘’Global’’ position of each bones ...
I think i don’t make any mistake by saying that ‘’Getvector’’ return a Local position without the boolean value to ask Global
So in the case of a skeleton you won’t have any Local position animation (except the hips) ...
try something like this ?
for mod in lModels:
GT = FBVector3d()
mod.GetVector(GT, FBModelTransformationMatrix.kModelTranslation, True)
K_thod
Edit : forget this..the evaluate thing should do the trick...sorry
|
|
|
|
OK, thanx.
So GetVector() should return the global coordinates by default, is what you are saying. That makes total sense.
Now, I do call Evaluate() in my python “for” loop, so it must be something else.
BTW, is it possible to have each iteration of the loop also update the MOBU user interface somehow? It locks up until the for loop is done.
Thanx!
-George
|
|
|
|
Quick question… are you using the global position?? cause i just wanted to point out that usually the root joint only has position data and all others positions are driven by rotation.. something to think about.
|
|
|
|
|
|