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® MotionBuilder® / Python / How VertexGet() is supposed to work?
  RSS 2.0 ATOM  

How VertexGet() is supposed to work?
Rate this thread
 
32262
 
Permlink of this thread  
avatar
  • Total Posts: 10
  • Joined: 20 July 2009 11:54 AM

Hi there,

I’m trying to access the position of the vertices of my model in MotionBuilder 7.5.

For that I spotted a method of FBGeometry class called VertexGet(), which returns a FBVertex.

Unfortunately when I try to use it it returns an error :
“No Python class registered for C++ class class PYFBSDK::FBVertex_Wrapper”

Sounds like FBVertex type isn’t defined in the Python SDK.

Of course the documentation is useless as usual.

Cheers!

(By the way the goal is to create a sort of PointCache in Motionbuilder to avoid multiple FBX import from MB to Max, so in case someone knows this already exists let me know!)



Replies: 0
avatar
  • KxL
  • Posted: 20 July 2009 06:10 PM

Wanted to help, but looks like you are on MB7.5. What I can tell is that it’s working in MB2009.
Other way to try is to use FBFastTessellator - can you check what type it returns for vertices?

Cheers



Replies: 0
avatar

Thanks for the answer!

I actually took a bit of time at home yesterday on my MB2009 and realized that it worked indeed.

So that problem is a Motionbuilder7.5 bug , my mistake.

But still, after trying in MB2009 it couldn’t be used as VertexGet() only returns the ‘stance pose’ position of the vertex, it doesn’t use the deformations.

After reading a few threads on someone willing to create a point cache too I saw this FBFastTessellator thing.
They were using a code like that :

floatlVertexArray lTessellator->GetPositionArray() ;
FBMatrix lMatrix( lTessellator->GetTransformationMatrix()) ;

But as you can see this is C++ and unfortunately neither GetPositionArray() nor GetTransformationMatrix() methods seem to exist in Python. Kinda makes sense I guess.

This morning I asked myself if I could take this ‘stance pose’ vertex position, then using the skinning weights and bones transformations calculating the position of the vertex… But that’s redoing the skinning job… but maybe I’ll try.

I’ll first check if I can correctly recover the skinning weights, the rest should be some matrix multiplications… oh boy, I’m so bad at those!

Thanks!



Replies: 0