# Character Skinning without Matrix Palette

**URL:** <https://forums.imgtec.com/t/character-skinning-without-matrix-palette/549>\
**Category:** PowerVR Insider\
**Created:** [December 3, 2009, 1:03pm UTC](https://forums.imgtec.com/t/character-skinning-without-matrix-palette/549 "2009-12-03T13:03:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vjlux](https://avatars.discourse-cdn.com/v4/letter/v/a587f6/32.png) [@vjlux](https://forums.imgtec.com/u/vjlux)\
**Post date:** [December 3, 2009, 1:03pm UTC](https://forums.imgtec.com/t/character-skinning-without-matrix-palette/549/1 "2009-12-03T13:03:08Z")

</div>

Dear Forum,  
  
I want to render skinned animated meshes without using matrix palettes  
(not to improve performance, but to enable skinning on more mobile devices).  
  
Therefor I have to transform the vertices and normals with the according  
bone matrix by hand at cpu level.   
  
My current approach would be to compute the bone matrices for the entire  
model and store them in a matrix vector. In a second pass I would run  
through the whole interleaved vector and multiply each vertex and normal vector  
with the according matrix.   
&nbsp; For doing so I need the mapping between the vertex data and the according bone/weight. As far as I understood the bone indices refer to the matrix palette of  
the current bone batch and not to the node index of the bone or am I confusing something?  
  
Any hint about how to interprete the direct mapping of vertices and bone nodes in  
the pod file would be appreciated.   
  
regards,  
&nbsp;lukas

---

<div class="post-metadata">

**Author:** ![warmi](https://avatars.discourse-cdn.com/v4/letter/w/7ea924/32.png) [@warmi](https://forums.imgtec.com/u/warmi)\
**Post date:** [December 3, 2009, 5:33pm UTC](https://forums.imgtec.com/t/character-skinning-without-matrix-palette/549/2 "2009-12-03T17:33:54Z")

</div>

If you want to do software skinning then you are much better off exporting your models without bone batching altogether.

---

<div class="post-metadata">

**Author:** ![warmi](https://avatars.discourse-cdn.com/v4/letter/w/7ea924/32.png) [@warmi](https://forums.imgtec.com/u/warmi)\
**Post date:** [December 3, 2009, 5:46pm UTC](https://forums.imgtec.com/t/character-skinning-without-matrix-palette/549/3 "2009-12-03T17:46:01Z")

</div>

Actually, looking at the code again … you can easily map bone indices to POD nodes by iterating over  
  
  
pnBatches member of the CPVRTBoneBatches class.  
  
  
  
  
  
These values map directly into pod node index.  
  
  
  
  
  
Someting like this:  
  
  
  
  
  
nodeid = mesh-\>sBoneBatches.pnBatches[currentindex];  
  
  
  
  
  
and then :  
  
  
  
  
  
SPODNode \*node = &scene.pNode[nodeid];  
  
  
  
  
  
where the SPODNode instance is a logical equivalent of your single matrix in the array.

---

<div class="post-metadata">

**Author:** ![vjlux](https://avatars.discourse-cdn.com/v4/letter/v/a587f6/32.png) [@vjlux](https://forums.imgtec.com/u/vjlux)\
**Post date:** [December 4, 2009, 12:45pm UTC](https://forums.imgtec.com/t/character-skinning-without-matrix-palette/549/4 "2009-12-04T12:45:59Z")

</div>

Thanks warmi,  
  
so what I’ll do is to create a cached mapping for each bone batch and its associated triangles into the interleaved vertex vector. Then the “currentindex” from the bone index should map correctly into my cpu matrix palette computed from for each bone.  
  
regards,  
lukas

---

<div class="post-metadata">

**Author:** ![warmi](https://avatars.discourse-cdn.com/v4/letter/w/7ea924/32.png) [@warmi](https://forums.imgtec.com/u/warmi)\
**Post date:** [December 4, 2009, 2:35pm UTC](https://forums.imgtec.com/t/character-skinning-without-matrix-palette/549/5 "2009-12-04T14:35:51Z")

</div>

Yeah, but as I said, if you are doing software skinning then , if you can help it , make sure that whatever exporter you are using , is putting all bones into a single batch.  
  
  
Since you are not using GPU hardware you are not bound by its limitations and there is no need to create multiple batches because that will only slow you down.
