lsalzman / iqm

Inter-Quake Model format development kit
MIT License
240 stars 73 forks source link

viewer problems #6

Open r-lyeh-archived opened 10 years ago

r-lyeh-archived commented 10 years ago

hello,

i am trying to view a few models (exported from Noesis) into demo / gpu-demo. models cannot be loaded because of these lines:

case IQM_BLENDINDEXES: if(va.format != IQM_UBYTE || va.size != 4) return false; inblendindex = (uchar *)&buf[va.offset]; break;
case IQM_BLENDWEIGHTS: if(va.format != IQM_UBYTE || va.size != 4) return false; inblendweight = (uchar *)&buf[va.offset]; break;

va.format is IQM_UINT for indexes and IQM_FLOAT for weights. va.size's are both right.

lsalzman commented 10 years ago

Those are ideally supposed to be unsigned bytes as that is what most engines are actually using and lines up better with the bone/weight restrictions. If Noesis is using those larger more precise formats, then it will encounter trouble on a bunch of engines that expect the UBYTE format for those. I am not sure I want to complicate the demo viewer by adding in support for a bunch of these discrepancies, as it is meant to rather show quickly and without much noise how to load and use the format.