Area :: Header
Meet the Experts Webinar
Learn how Black Forest Games rebooted the classic C64 platform game “Giana Sisters” from 1987 using Autodesk 3ds Max®.
Discussion Groups

FBX SDK

Reply
Active Contributor
mv348
Posts: 48
Registered: ‎03-30-2012

Questions on terminology: associate geometry, reference geometry, and cluster geometry?

119 Views, 13 Replies
06-07-2012 09:35 AM
When computing cluster deformation in the ViewScene example code, it uses 3 different types of transformations (or "geometries"): associate, reference, and cluster.

In the documentation's description of the cluster class, there is a function getAssociateModel that returns a node. The remark beneath the function reads:

If set, the associate model is the node used as a reference to measure the relative displacement of the link node. Otherwise, the displacement of the link node is measured relative the the node containing the control points. Typically, the associate model node is the parent of the bone a skin is attached to.


Okay that makes sense. But what are the reference and cluster geometry, and how do they relate to the associate model?

Also, is "model" just another word for a node?

I'd appreciate any help. Thanks!
Please use plain text.
Active Contributor
mv348
Posts: 48
Registered: ‎03-30-2012

Re: Questions on terminology: associate geometry, reference geometry, and cluster geometry?

06-07-2012 02:06 PM in reply to: mv348
So, I know that the way skinning usually works is as follows.

Given the following two matrices:

initialMeshToBoneMatrix (convert from mesh space in bind pose, to local bone space)
currentBoneMatrix (bone location at current point in time)

the final transformation is:

finalTransformation = currentBoneMatrix*initialMeshToBoneMatrix (or reverse, depending on order of matrix multiplication)

So, in the code for cluster deformation (in ViewScene/DrawScene.cxx), I'm tempted to assert that associate geometry is the 'currentBoneMatrix', the reference geometry is the 'initialToBoneMatrix' and cluster geometry is the 'finalTransformatin'

Do I have the right idea here?
Please use plain text.
Distinguished Contributor
Posts: 504
Registered: ‎04-21-2008

Re: Questions on terminology: associate geometry, reference geometry, and cluster geometry?

06-08-2012 02:19 AM in reply to: mv348
No, the calculation you described only works for smooth binding. Associate Model is only used for rigid binding.
The correspondence in terms of ViewScene is:
currentBoneMatrix is "lClusterGlobalCurrentPosition = GetGlobalPosition(pCluster->GetLink(), pTime, pPose);"

initialMeshToBoneMatrix is "lClusterRelativeInitPosition".
Please use plain text.
Distinguished Contributor
Posts: 504
Registered: ‎04-21-2008

Re: Questions on terminology: associate geometry, reference geometry, and cluster geometry?

06-08-2012 02:46 AM in reply to: mv348
Cluster is not a geometry, it is a deformer that deform geometry, and that geometry is the "reference".
Associate model is only used for rigid binding, in other word, cluster with eAdditive mode.

For smooth binding, you only need reference and cluster, and each cluster will affect all vertices of the reference(the geometry).
But for rigid binding, each cluster only affect part of the vertices of the reference(the geometry). But when you move the root joint, the whole geometry should move, but the root joint actually only can deform part of the vertices, how can we reach that? Here we need the associate model, it generally the parent of current bone.
For example, joint1 is parent of joint2, joint 2 is parent of joint3. When you are process joint2, then joint1 is its associate model. In this way, the deformation of certain joint is always calculated relative to its parent object's space.

This is quite complex and hard to explain clearly by plain text. I am writing an complete FAQ about this with sample files, illustrations and maybe even videos. So please wait for that if you need more details.
Please use plain text.
Active Contributor
mv348
Posts: 48
Registered: ‎03-30-2012

Re: Questions on terminology: associate geometry, reference geometry, and cluster geometry?

06-09-2012 10:41 PM in reply to: mv348
Thank you for your help, once again!

One point of confusion I often have regarding the SDK is how much of the terminology and structure is standard graphics theory, or specific to the FBX SDK.

You mentioned Rigid vs. Smooth deformation. The link below gives some nice details about smooth and rigid skinning.
http://graphics.ucsd.edu/courses/cse169_w05/3-Skin.htm

I'm going to read it carefully and hopefully it will enhance my understanding. But it uses slightly different terminology; it doesn't mention things like 'clusters' or 'associate models'.

Certainly the FBX documentation/FAQ shouldn't have to teach you all the graphics theory, but it should definitly tell you what theory/approach is being used, and how the classes and data structures correspond to that approach.
Please use plain text.
Distinguished Contributor
Posts: 504
Registered: ‎04-21-2008

Re: Questions on terminology: associate geometry, reference geometry, and cluster geometry?

06-11-2012 02:35 AM in reply to: mv348
I am afraid for skinning it is not that easy to construct that type of correspondence.
Cluster and Associate Model are something make more sense for implementation.
But graphics theory seldom discuss this type of implementation details.

Most FBX concepts can be easily mapped to its graphics theory equivalence or at lease can be mapped to concepts in Motion Builder, Maya or 3ds Max, but If you find any other case that could be improved, please do let us know.
Thanks for keep providing good suggestions. :smileyhappy:
Please use plain text.
Distinguished Contributor
Posts: 504
Registered: ‎04-21-2008

Re: Questions on terminology: associate geometry, reference geometry, and cluster geometry?

06-11-2012 02:54 AM in reply to: mv348
This is a very rough first draft about "Binding In FBX".
It only explains binding from the perspective of file now, next step would be to associate them with cluster codes in ViewScene.

Any questions, suggestions and feedback are welcome.

bindinginfbx.zip

Please use plain text.
Active Contributor
mv348
Posts: 48
Registered: ‎03-30-2012

Re: Questions on terminology: associate geometry, reference geometry, and cluster geometry?

06-11-2012 02:47 PM in reply to: mv348
Awesome!

I have a final exam to study for but once that's over I'll be on break and will have plenty of time to look at this in detail!

Thanks so much for writing that up!
Please use plain text.
Active Contributor
mv348
Posts: 48
Registered: ‎03-30-2012

Re: Questions on terminology: associate geometry, reference geometry, and cluster geometry?

06-13-2012 08:10 PM in reply to: mv348
So I went over the explanation very carefully. Here are some questions/unclear points.

First, when you do the Rigid Bind, I presume you manually assigned specific vertices to specific joints? If so, it may be worth mentioning what was done in Maya here before exporting.

Next:
You may already noticed the one cluster is marked as "RigidBind" ( check its UserData ), it is the real cluster that describes how joint1 will affect/deform the geometry.


When you say "it is the real cluster" the world 'real' here seems a bit vague. Maybe that sentence could be rephrased to be a bit more clear.

So if user moves joint3 even more after Figure 2, the final position should be sum of Figure 2 and the deformation value from this new movement.


"sum of Figure 2" again seems a bit sloppy and vague with the words.

But most important is this part:

This won't be explicitly discussed in most graphics theory of rigid binding because it is simply an combination of binding and parenting, but most 3D software do implement rigid binding this way.
There is no exception for FBX, so we add compensation cluster to imitate this behavior. That's why joint1 and joint2 will have two clusters corresponding with each of them, since joint4 do not really participate in the rigid binding, it does not influence any vertices, there is no need for joint3 to have a compensate cluster.


You say "so we add compensation cluster to imitate this behavior" but you don't really say how it imitates it. I think it would be more clear if you explained how the compensation works. Piecing together everything you said, my understanding is "A compensation cluster for a given joint, is a deformer to influence the vertices bound to its child joint(s), so they inherit its position accordingly." Is this correct?

This raises a question for me though. Suppose a given joint (call it joint A) has dozens of child joints, all rigidly bound to certain vertices. Will the compensation cluster for joint A apply to all of these vertices all the way down the tree? Or just to vertcies of its own child joints?

Your description of the associate model seems pretty clear, actually. The only slightly confusing part is the FBX file snippet:
This is also reflected in FBX file, the following object-property connection describe it:
;Model::joint1, SubDeformer::
C: "OP",740700896,701364304, "SrcModelReference"

;Model::joint2, SubDeformer::
C: "OP",740703088,701360656, "SrcModelReference"


So, the FBX file has to keep track of if an associate model is being used? Why is it called "SrcModelReference" and not "associate model"? What if no associate model is given in the file?

Overal, its a little confusing in some spots, but I think it helped me quite a lot with my understanding.
Please use plain text.
Distinguished Contributor
Posts: 504
Registered: ‎04-21-2008

Re: Questions on terminology: associate geometry, reference geometry, and cluster geometry?

06-13-2012 11:18 PM in reply to: mv348
Thanks for reviewing it! Will improve the "Real cluster" and "sum of Figure 2" in some way.

Here are some quick answers regarding your questions:
1. In Maya you do not need to manually assign specific vertices to specific joint. Maya has its own algorithm to automatically help you assign them, for example, according to the distance between the vertices and joint. Each 3D software could have their own algorithm and expose different parameters on UI for user to control the rigid binding, but that's usage of Maya or other 3D software. Should not be included in an FBX document.
Please keep in mind that FBX is just something to store and exchange, itself does not do much about graphics algorithm.

2. JointA will only need to compensate for the child right below it, because this compensation mechanism is recursive. JointA compensate for jointB, and jointB compensate for jointC, etc. So when you move jointA, they will be affected in a chain.

3. SrcModelReference is just the name of the property that is used as an implementation of associate model the concept in FBX file.
I don't know why it is named differently at the first place but it is not hard to match them as long as they are properly documented.
If there is no associate model when there should be, then that's bug of the exporter or creator who generate the FBX file and we say the file is corrupted.
But if there is only smooth binding in the original scene, then that's totally fine there is no associate model in the exported FBX file.
Please use plain text.