I figured out how the modifier works
the modifier is only for 8bit or 16bit conversions
here's the vector conversion code:
def vec(dtyp,mult):
#decide the type of conversion to use if dtyp==0 :
return ui( fr.read(1) ) / (
float(2)^mult )
#fixed point ui8 if dtyp==1 :
return si8( fr.read(1) ) / (
float(2)^mult )
#fixed point si8 if dtyp==2 :
return ui( fr.read(2) ) / (
float(2)^mult )
#fixed point ui16 if dtyp==3 :
return si16( fr.read(2) ) / (
float(2)^mult )
#fixed point si16 if dtyp==4 :
return fl32( fr.read(4) )
#floating point fl32'fr' is the mdl0
'dtyp' is the data type
'mult' is the modifier (multiplier)
when calling the code:
...
data_type = ui( fr.read(4) )
modifier = ui( fr.read(1) )
X = vec(data_type,modifier)
Y = vec(data_type,modifier)
Z = vec(data_type,modifier)
btw, this is for any vector (verts, normals, and UV's)
and yes, I comment like that in the code constantly
Holy -blam!- so I can use that in reverse to write the floats for the verts/normals/uvs in the hex?
hey BJ...
you were talking about animation converters...
well...
collada and directx(ascii) support animations,
and of course blend
I suppose I could write a converter for those...
blend files will have to be library-linked to be imported...
DAE and X files will have to be injected...
I brought that up because I need them...
Ok heck yeah do eet!
Btw, I got this collada loader to help me... I got it to read all the verts, materials, bone structure, etc from the xml!!!!!1