Using the OES Matrix Palette extension with DrawElements

I have a question on using a Matrix Palette when currently implementing DrawElements for drawing.

When using DrawArrays (as with the examples I've seen) I understand that the MatrixIndex Array (say if there are 2 bones) will simply contain the bones as alternating indexes, 0, 1, 0, 1 and so on...

The WeightArray would contain how much each bone influences the vertex... so... if I have this setup

Vertex of 1, 1, 1

Weights of .5, .5

MatrixIndex of 0, 1

Then the vert is at (1,1,1) and will be pulled 50% by palette 0 and 50% by palette 1... extent ad infinitum... and the size parameter of the weight and matrix pointers would be 2.

So now... I'm currently converting OBJ files (no weights...) to indexed output and using DrawElements.

How then are the weight and matrix index arrays setup? I believe... that the weight array will be indexed by the currently used index array (for vertices)... but is the matrix index array ALSO indexed by the coordinate index array??

Re: Using the OES Matrix Palette extension with DrawElements

All vertex attributes (i.e. position, normal, color, texcoords, point size, matrix weights and matrix indices) are accessed using the same index from the element array.

Re: Using the OES Matrix Palette extension with DrawElements

Perfect, that is exactly what I was thinking, thanks so much for clarifying.

If I may throw another question out there... I'm struggling quite a bit with how to use this setup properly.

If I have an entire character model as one mesh, using the matrix palette indexes to define which palettes influence with vertices, and the weights to give how much, I was initially imagining simply rotating certain palettes to move certain pieces and that a hierarchy wouldn't be necessary. Since the palettes don't seem to parent each other (each is just it's own separate set of transformations) I'm not understanding how a part could be rotated properly if a rotation vector can't be drawn through the point I want the chosen vertices to rotate around. I thought maybe a translate/rotate/translate back process could work, but the whole idea of weights for me was to be able to give less influences in the joints of a mesh and the translation parts seem like they wouldn't move joint verts far enough and the rotations in those verts would be incorrect...