Results 1 to 3 of 3

Thread: Using the OES Matrix Palette extension with DrawElements

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    21

    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??

  2. #2
    Senior Member
    Join Date
    May 2006
    Posts
    353

    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.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    21

    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...

Similar Threads

  1. how to query palette matrix
    By wycwang in forum OpenGL ES general technical discussions
    Replies: 2
    Last Post: 10-18-2007, 08:09 PM
  2. matrix palette - any samples?
    By hmwill in forum OpenGL ES general technical discussions
    Replies: 0
    Last Post: 08-30-2004, 10:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •