16 hours ago16 hr Hey, everyone guys:I'm trying to reverse engineer a proprietary model format used by The House Of The Dead 3 . My goal is to write (or help writing) a Noesis importer capable of importing the render mesh (geometry, UVs ,materials and skeleton if that's possible ).I have attached two files from the same asset:zc03.x3x zc03.xaxFile informationzc03.x3xSize: 48612 bytes Header: 4F 44 33 58 58 4F 42 58 ASCII: OD3XXOBXImmediately followed by00 00 06 00 D4 BD 00 00zc03.xaxSize: 43492 bytes Header: 54 43 41 58 58 4F 42 58 ASCII: TCAXXOBXImmediately followed by02 00 07 00 D4 A9 00 00The two files clearly belong to the same resource family.EndiannessThe files appear to be Little Endian.Chunk identifiers are stored as reversed ASCII.Example:58 54 52 56 ↓ VRTXinstead of56 52 54 58X3X Chunk LayoutCurrent chunk map:OffsetStored bytesChunk0x00103JBOOBJ30x0134EMANNAME0x04DCLEDMMDEL0x0568RTAMMATR0x0750MNXTTXNM0x079CVPRGUnknown0x0830XTRVVRTX0x1314XDNIINDXUnknown chunks may have additional internal structures.NAME chunkContains readable strings.Examples:zc03_sk_kao root chn1 chn2 eff2 jnt_mune jnt_rhiza jnt_rmomo zc03_sk_mune_2damThis strongly suggests that the model contains a skeleton hierarchy.MATR chunkStarts at0x0568ContainsPDmat3 mat3Material names appear to be stored here.TXNM chunkStarts at0x0750Contains external texture references.Examples:d:\FS\xtx_zc03.zip/:4a9a,b9ec.dds d:\FS\xtx_common.zip/:92,141e.ddsTextures are external DDS files.VRTX chunkStarts exactly at0x0830The first bytes are76 CD 12 C0 D7 42 E7 BE 68 97 00 40Interpreted as float32:X = -2.2938 Y = -0.4517 Z = 2.0092These values appear to be valid model-space coordinates.The following bytes continue as floating point values.Example:AE B3 99 3D 5D CF 7D BF 50 B3 DA 3D 64 2C B9 3E 1C 88 71 3E 9F FE 10 C0 01 75 F7 BE 31 A8 32 3F E2 CF BA 3D 03 C2 53 BF ...The vertex layout is currently unknown.Possible vertex stride candidates:48 52 56 60 64 bytesI have not yet identified:Normal formatTangent formatUV offsetSkin weightsBone indicesINDX chunkStarts exactly at0x1314Beginning of the data:00 00 01 00 02 00 03 00 03 00 02 00 02 00 02 00 00 00 04 00 05 00 06 00 07 00 08 00 09 00 ...This strongly indicates a 16-bit index buffer (uint16).I found no evidence of uint32 indices.MDELStarts at0x04DCUnknown structure.Possibly mesh descriptor.May contain counts or offsets.OBJ3First chunk in the file.Likely stores object information or transforms.Unknown structure.VPRGStarts at0x079CUnknown.May describe primitive groups, draw calls or submeshes.First bytes:56 50 52 47 00 00 00 00 00 00 00 00 33 00 00 00 00 00 00 00 58 03 00 00 ...SkeletonThe model clearly contains bone names.However I have not yet identifiedinverse bind matricesparent tablebone transformsOnly names are currently confirmed.AnimationI could not find any obvious animation data.No chunks similar toANIM KEYS TIME CLIP MOTNwere found.Animations may be stored in another resource.XAX AnalysisHeaderTCAXXOBXUnlike the X3X file, this file does not contain obviousVRTX INDX MATRchunks.Instead I found the following chunk identifiers:RTCA YRAW TADW LDMA LKSL MFDL ILDM EMAN LEKSKnown offsets:OffsetChunk0x0010RTCA0x019CTADW0x09F0LDMA0x0A08LKSL0x0A54MFDL0x0A90ILDM0x0B54EMAN0x0B70LEKSThe only readable object name iszc03_sk_kaoNo obvious render geometry is present.This file appears to be a companion resource.Its exact purpose is still unknown.Current assumptions✔ Little Endian✔ Chunk-based container✔ Reversed ASCII chunk identifiers✔ Render mesh stored inside X3X✔ External DDS textures✔ Skeleton names present✔ uint16 index buffer✔ Vertex buffer starts at 0x0830✔ Index buffer starts at 0x1314UnknownsThe following information is still missing:Exact VRTX structureVertex stridePosition offsetNormal formatUV offsetTangent formatColor formatSkin weightsBone indicesPrimitive group structureMDEL structureVPRG structureGoalThe objective is to write a Noesis importer capable of importing:GeometryUVsMaterial namesExternal texture referencesSkeletons and animations are not required.QuestionsHas anyone encountered the OD3XXOBX / TCAXXOBX container before?Can anyone identify the VRTX vertex layout?Does MDEL contain vertex/index counts and offsets?Is VPRG the primitive group / draw call table?Is XAX a companion resource containing skeleton metadata, collision, helpers or animation-related data?Would anyone be interested in helping write a Noesis importer for this format?The ObjetiveCreate a universal Noesis script that can read all the face indices and their geometry and that can be converted to other formatsFiles Testing:I'll upload those formats to the GitHub account https://github.com/randalfcastro-tech/THOD3; and now I think the real fun begins ...If you need more samples, let me know and I’ll be happy to provide them, or your full dump in hexadecimal.Also, I think a Noesis script is better, it will take less time and be faster, guys.But thanks again, we're going to make it. 🙂 Edited 16 hours ago16 hr by Randalf2theReturn
14 hours ago14 hr hey your work is amazing i have done the same with hotd1 not 2 fully yet but when would this release?
12 hours ago12 hr Localization Hello, from quick look chunks seems to contain relative offsets to other chunksOBJ3 (offsets are relative to right before OBJ3 identifier): at 144 (counting from before OBJ3) offset to it's name right after NAME identifier at 156 offset (or zero) to 4 bytes before MDLE which contains exact size of MDLE chunk in bytes at 268 and 272 offsets (or zeroes) to another OBJ3 (children in tree hierarchy?) MDLE (offsets are relative to right before MDLE identifier): at 20 (counting from before MDLE) offset to it's name right after NAME identifier at 40 int32 count of materials following with offset to material data inside MATR chunkFor each material there seems to be 232 bytes of data inside MATR chunk (offsets are still relative to MDLE): at 0 (counting from material data start) offset to it's name at 124 offset to (vertex group?) data inside GRPVFor each material there seems to be 72 bytes of data inside GRPV chunk (offsets are still relative to MDLE): at 8 (counting from group data start) int32 count of vertices at 16 offset to vertex data inside VRTX chunk at 64 offset to indices inside INDX chunk following with int32 count of indicesVertex layout seems the same but may vary with other files:3x float32 position, 3x float32 normal, 2x float32 uvIndices are seems to be triangle stripsHere are one of the meshes (some kind of clothing?):
10 hours ago10 hr Author 3 hours ago, HiddenParadise said:hey your work is amazing i have done the same with hotd1 not 2 fully yet but when would this release?1 hour ago, other1 said:Hello, from quick look chunks seems to contain relative offsets to other chunksOBJ3 (offsets are relative to right before OBJ3 identifier):at 144 (counting from before OBJ3) offset to it's name right after NAME identifierat 156 offset (or zero) to 4 bytes before MDLE which contains exact size of MDLE chunk in bytesat 268 and 272 offsets (or zeroes) to another OBJ3 (children in tree hierarchy?)MDLE (offsets are relative to right before MDLE identifier):at 20 (counting from before MDLE) offset to it's name right after NAME identifierat 40 int32 count of materials following with offset to material data inside MATR chunkFor each material there seems to be 232 bytes of data inside MATR chunk (offsets are still relative to MDLE):at 0 (counting from material data start) offset to it's nameat 124 offset to (vertex group?) data inside GRPVFor each material there seems to be 72 bytes of data inside GRPV chunk (offsets are still relative to MDLE):at 8 (counting from group data start) int32 count of verticesat 16 offset to vertex data inside VRTX chunkat 64 offset to indices inside INDX chunk following with int32 count of indicesVertex layout seems the same but may vary with other files:3x float32 position, 3x float32 normal, 2x float32 uvIndices are seems to be triangle stripsHere are one of the meshes (some kind of clothing?):From what I've seen of the .x3x / OD3XXOBX format:✔ I've already located the chunks (XTRV, XDNI, RTAM, MNXT, EMAN...).✔ I know there are several submeshes.✔ The indices can already be read.✔ Material and texture names are already showing up.✔ We've already found the approximate start of the vertex block.What I still don't know is the actual layout of XTRV:final stride (32, 36, 40, 44, 48...),exact UV position,type of normals,existence of tangents,whether the UVs are float, half float, or normalized short,whether the index is a triangle strip or list,if there are multiple vertex streams.What's left is the important part: identifying the exact format of the mesh data. With what I have, I still need to figure out:The actual stride of the vertices (don’t assume 32).The layout of each vertex:position,normals,UVs,tangents (if they exist),bone weights and indices (if they exist).Whether XDNI uses a triangle list or triangle strip.If there are multiple vertex streams associated with the same submesh.The structure of LEDM, which probably contains the layout description or of each submesh.How materials (RTAM) and textures (MNXT) are linked to each submesh.Once that’s identified, the rest is relatively straightforward: bind the correct buffers (rpgBindPositionBufferOfs, rpgBindNormalBufferOfs, rpgBindUV1BufferOfs, etc.), create materials, and build the model. fmt_x3x_thotd3.py
Create an account or sign in to comment