to my knowledge there is only one type of obj block.gjinka wrote:There seems to be only 1 type of OBJ chunk documented. You guys say there are multiple and they store different things, you also say they can have multiple vertex/index buffers. How do you know how much? I think it would be simpler to just document the different types of the OBJ chunk.
I was asking these to b0ny but he suggested to wait until the format will be documented in the wiki, I kind of doubt it will, you guys just moved to other formats, which is great, but it would be better if the formats were documented on the way, people could create scripts for other modelling packages and stuff. I don't think it's too much to ask.
between DOAU and DOA3 the material block is extended. that's the only difference.
the vertex type flag doesn't mean its a all new obj block, nothing changes except the stride of a vertex definition.
again I've only dealt with one type, anywho here's a sniplet from my maxscript, you can see that when I encounter a new vertex type I just skip more lol
Code: Select all
vx=readfloat fstream
vy=readfloat fstream
vz=readfloat fstream
nx=readfloat fstream
ny=readfloat fstream
nz=readfloat fstream
tu=readfloat fstream
tv=readfloat fstream
if vtype==1 do fseek fstream 4 #seek_cur
if vtype==2 do fseek fstream 8 #seek_cur
if vtype==3 do fseek fstream 12 #seek_cur
something like;
stride = ((4*vtype)+32)
^,^