View Single Post
Old 04-07-07, 04:16 PM   #28
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 28
Uploads: 3
Default

Quote:
Originally Posted by Anvart
Hi, All.
I already wrote my opinion. Repeat once again:

Description.
- TMAP – Label 4 bytes
- txtrType – 2 bytes unsigned short Textural Map Type (additional texture in Type13 chunk, for example, LightMap ...LM.tga)
- triFacesNum * (3 * Vt (unsigned short 2 bytes)) Textural Vertexes sequence for each face.

No, this is wrong. The 2 bytes after the header mean something else. Actually, Kaleun_Endrass already posted the correct structure layout in the first post of this thread. He just didn't completely interpret the data right.

TMAP - 4 bytes
mapCount - 1 byte

following this is a 'mapCount' number of structures of:

type - 1 byte, probably type of map. Most common value = 2 = SelfIllum map. Also found values of 3 and 4.
ushort[trisCount * 3] - 6 bytes * trisCount

If you use your structure, you would miss any additional texture coordinate maps. Most models only have one map so you wouldn't have a problem, but hey, we're after the correct data structure here...
It's good that you already had a close understanding of the layout of this data section, but from all the info I have gathered, everybody was a bit wrong along the line or hadn't been able to fully prove what the data was there for. Alot of guesses were in the right direction, which was great help for me to be able to prove it.

I will determine what the other types are for asap, specifically for interiors.
skwasjer is offline   Reply With Quote