sample
other sample 01
other sample 02
I started to researches and wrote script:
Code: Select all
f = fopen "l:\\features\\maxscript\\korsary-2-pc\\dep0.gm" "rb"
clearlistener()
fn ReadFixedString bstream fixedLen =
(
local str = ""
for i = 1 to fixedLen do
(
str0 = ReadByte bstream #unsigned
if str0!=0xFD AND str0!=0xFC do str+= bit.intAsChar str0
)
str
)
Face_array=#()
Vert_array=#()
UV_array=#()
fseek f 0x38BE #seek_set --probably vertexes count start (2172)
vertCount=readshort f #unsigned
print vertCount
skiper=ReadFixedString f 0x7
for x = 1 to vertCount do(
p0=readfloat f
p1=readfloat f
p2=readfloat f
p3=readfloat f
p4=readfloat f
p5=readfloat f
p6=readfloat f
p7=readfloat f
p8=readfloat f -- skiper, looks like "7F 7F 7F FF"
p9=readfloat f
p10=readfloat f
append Vert_array[0,0,0]
append UV_array[0,0,0]
)
fseek f 0x3BC #seek_set --probably polygon count start (2250)
polyCount=readlong f #unsigned
print polyCount
polySkiper=ReadFixedString f 0x40
for x = 1 to polyCount/3 do(
fa=readshort f #unsigned+1
fb=readshort f #unsigned+1
fc=readshort f #unsigned+1
append Face_array[fc,fb,fa]
)
msh = mesh vertices:Vert_array faces:Face_array
msh.numTVerts = UV_array.count
buildTVFaces msh
msh.name="dep"
Print ("Last Read @ 0x"+((bit.intAsHex(ftell f))as string))
gc()
fclose fCount of polygons i reading from 0x3BC (read in 4 bytes and also knows that model have 2250 polygons), then skipping 0x40 length values and start reading polygon pattern from 0x400.
But i can't get a model into max. Someone correct me.
p.s. also i this file don't have weights, or it have?

