June 3Jun 3 Localization The file size is quite small, so I reckon its format can be identified quickly. I haven’t got home yet though; I’ll examine the structure thoroughly once I’m back. Fingers someone can work out the parsing in the meantime 😏 bli.7z
June 3Jun 3 Author Localization Solution Okay, it looks far simpler than I’d anticipated; I overcomplicated things. I can search for standard face indices just like usual, and vertex coordinates are located nearby as well. After examining multiple samples, I’ve reached a final conclusion: the TEX container holds multiple textures, predominantly DDS files with a smaller portion being other common formats such as TGA.
June 8Jun 8 Supporter Here's struct of *.tex. //------------------------------------------------ //--- 010 Editor v14.0 Binary Template // // File: // Authors: // Version: // Purpose: // Category: // File Mask: // ID Bytes: // History: //------------------------------------------------ LittleEndian();OutputPaneClear(); local uint32 i; uint32 Version; uint32 ResourceCount; struct { uint32 ResourceType; uint32 ResourceOffset; }Resource[ResourceCount]; struct { for (i=0; i < ResourceCount; i++) { FSeek(Resource[i].ResourceOffset); if (Resource[i].ResourceType == 110) { struct { uint32 DescSize; char DescText[DescSize]; }Description; } else if (Resource[i].ResourceType == 5 | Resource[i].ResourceType == 9) { struct { enum <uint32> { PF_DXT1 = 5, PF_PVRTCI_4BPP = 9, }PixelFormat; uint32 TextureWidth; uint32 TextureHeight; uint32 MipMaps; uint32 RawDataSize; byte RawData[RawDataSize]; }Texture; } } }Resources; There may be more pixel formats, but can't tell from one sample. And here is guess-work for mesh. //------------------------------------------------ //--- 010 Editor v14.0 Binary Template // // File: // Authors: // Version: // Purpose: // Category: // File Mask: // ID Bytes: // History: //------------------------------------------------ LittleEndian();OutputPaneClear(); local uint32 i; uint32 Version; uint32 Unknown_0; uint32 Unknown_1; uint32 MaterialOffset; uint32 Unknown_2; uint32 ModelOffset; FSeek(MaterialOffset); struct { uint32 MaterialIndex; struct { uint32 StrLen; char MaterialName[StrLen]; }Material[MaterialIndex]<optimize=false>; }Materials; struct { uint32 BoneIndex; struct { uint32 StrLen; char BoneName[StrLen]; float Matrix4x3[12]; uint32 ParentBoneId; }Bone[BoneIndex]<optimize=false>; //Preserved }Skeleton; FSeek(ModelOffset); struct { uint32 ModelIndex; uint32 StrLen; char ModelName[StrLen]; byte Align[StrLen]; uint32 ElementCount; uint32 IndexCount; uint16 IndexBuffer[IndexCount]; byte Unknown_0[74]; struct { float VPosX,VPosY,VPosZ; byte Unknown_0[12]; byte VNPosX,VNPosY,VNPosZ,Null; byte Unknown_1[4]; int16 UVPosX,UVPosY; }ElementBuffer[ElementCount]<optimize=false>; uint32 ShapeIndex; struct { uint32 IndexOffset; uint32 IndexCount; uint32 MaterialId; uint32 Null; }ShapeInfo[ShapeIndex]<optimize=false>; FSeek(startof(IndexBuffer)); struct { for (i=0; i < ShapeIndex; i++) { FSeek(startof(IndexBuffer) + ShapeInfo[i].IndexOffset * 2); struct { uint16 F1,F2,F3; }Indices[ShapeInfo[i].IndexCount / 3]<optimize=false>; } }Shapes; }Model; Small note. UV's are divided by 2048.0. But normals doesn't work well when i divide them with 255.0. Maybe these are not normals at all. Edited June 8Jun 8 by h3x3r
Create an account or sign in to comment