# POD Bones Format

**URL:** <https://forums.imgtec.com/t/pod-bones-format/85>\
**Category:** PowerVR Insider\
**Tags:** pvrshaman\
**Created:** [May 27, 2008, 8:49am UTC](https://forums.imgtec.com/t/pod-bones-format/85 "2008-05-27T08:49:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stoulouse](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@stoulouse](https://forums.imgtec.com/u/stoulouse)\
**Post date:** [May 27, 2008, 8:49am UTC](https://forums.imgtec.com/t/pod-bones-format/85/1 "2008-05-27T08:49:43Z")

</div>

Hi,  
  
  
I’ve written my own FBX to POD exporter. I’m trying to add animation support but I can’t understand how bones are linked to mesh :  
  
  
for each mesh I fill sBoneIdx and sBoneWeight structures like this :  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mesh.sBoneIdx.eType = EPODDataInt;  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mesh.sBoneIdx.n = 4;  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mesh.sBoneIdx.nStride = mesh.sBoneIdx.n \* sizeof(int);  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mesh.sBoneIdx.pData = (unsigned char\*)malloc( mesh.sBoneIdx.nStride \* mesh.nNumVertex);  
  
  
and  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mesh.sBoneWeight.eType = EPODDataFloat;  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mesh.sBoneWeight.n = 4;  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mesh.sBoneWeight.nStride = mesh.sBoneWeight.n \* sizeof(int);  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mesh.sBoneWeight.pData = (unsigned char\*)malloc( mesh.sBoneWeight.nStride \* mesh.nNumVertex);  
  
  
  
  
  
next, for each vertex I fill sBoneIdx.pData with 4 index to SPODNode and sBoneWeight.pData with 4 weight float. I guess this is ok. If the vertex is not linked to a bone, its bone index will be 0 and its weight 0.  
  
  
  
  
  
I don’t know how to fill sBoneBatches, this structure doesn’t mean anything to me.  
  
  
  
  
  
If I try to load my pod with only sBoneIdx and sBoneWeight filled into PVRShaman, it crashes so I guess I must fill sBoneBatches.  
  
  
  
  
  
One more thing, I’ve tried to export a simple bones animated scene from maya and to load it in PVRShaman, it loads but animations are not visible, the pod file seems to have all the necessary data so I guess this is a PVRShaman problem ?  
  
  
  
  
  
I can release my FBX2POD source code if someone needs it, it’s dirty but works well and a little bit better than maya PODExporter (faster and less vertices).

---

<div class="post-metadata">

**Author:** ![aaron](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@aaron](https://forums.imgtec.com/u/aaron)\
**Post date:** [May 27, 2008, 1:44pm UTC](https://forums.imgtec.com/t/pod-bones-format/85/2 "2008-05-27T13:44:44Z")

</div>

Hi,

You should be able to simply clear sBoneBatches to zero. If it's non-zero, PVRShaman will attempt to use the data, producing the crash you're seeing.
  

&nbsp;
  

As an alternative to the code you've shown, note that you could also use PVRTModelPODDataStride() to set the strides, e.g:
  

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mesh.sBoneIdx.nStride&nbsp;= (unsigned int)PVRTModelPODDataStride(mesh.sBoneIdx);

---

<div class="post-metadata">

**Author:** ![stoulouse](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@stoulouse](https://forums.imgtec.com/u/stoulouse)\
**Post date:** [June 11, 2008, 1:05pm UTC](https://forums.imgtec.com/t/pod-bones-format/85/3 "2008-06-11T13:05:27Z")

</div>

In fact sBoneBatches is cleared to zero. I’ve also tried to call sBoneBatches.Release() but it still crashes.

---

<div class="post-metadata">

**Author:** ![stoulouse](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@stoulouse](https://forums.imgtec.com/u/stoulouse)\
**Post date:** [June 11, 2008, 1:15pm UTC](https://forums.imgtec.com/t/pod-bones-format/85/4 "2008-06-11T13:15:24Z")

</div>

you could find my test pod file [here](http://samuel.toulouse.free.fr/tests/test.pod).
