SkinnedSubGeometry, updateJointIndexData and updateJointWeightsData

Software: Away3D 4.x

Tim Knip, Moderator
Posted: 09 October 2011 10:19 PM   Total Posts: 7

Could you explain what data SkinnedSubGeometry.updateJointIndexData and SkinnedSubGeometry.updateJointWeightsData expect?

Say I got 2 joints -1 and 0, each joint influencing the same 10 vertices…
In this case I would have 20 weights?

Am I completely off here?

Anyway: it would be great if you could explain by a trivial example.

Thanks!

[edit]
Ok, studied MD5Parser / AWD2Parser bit…
Is this pseudo-code correct?

for each vertex…
-> for each influence (joint id, weight, etc)
->-> jointIndices.push( influence.jointID )
->-> jointWeights.push( influence.weight )
->-> addDummyJoints( maxJoints ) // make sure we got maxJoints joints per vertex
skinned_sub_geom.updateJointIndexData( jointIndices )
skinned_sub_geom.updateJointWeightsData( jointWeights )


[/edit]

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X