Users browsing this thread: 1 Guest(s)
UV coordinates in Digimon Story: Cyber Sleuth
#12
In case there's still interest in cracking the .geom format, here's my work-in-progress notes about it:

Code:
#####################
Geom Header Structure
#####################
0x00 -> Uint32: Unknown (always 0x00000064/100?)
0x04 -> Uint16: Number of meshes
0x06 -> Uint16: Number of "unknown material data"
0x08 -> Uint32: Unknown (always zero?)
0x0C -> Uint32: Number of "unknown data 1"
0x10 -> Uint32: Size of texture name data (divide by 0x20 for number of texture names)
0x14 -> Vector3: Unknown (maybe 3 float32s instead)
0x20 -> Vector3: Unknown (maybe 3 float32s instead)
0x2C -> Uint32: Unknown (always zero?)
0x30 -> Uint32: Pointer to meshes
0x34 -> Uint32: Unknown (always zero?)
0x38 -> Uint32: Pointer to "unknown material data"
0x3C -> Uint32: Unknown (always zero?)
0x40 -> Uint32: Unknown (always zero/potentially pointer?)
0x44 -> Uint32: Unknown (always zero?)
0x48 -> Uint32: Unknown (always zero/potentially pointer?)
0x4C -> Uint32: Unknown (always zero?)
0x50 -> Uint32: Pointer to "unknown geom data 1"
0x54 -> Uint32: Unknown (always zero?)
0x58 -> Uint32: Unknown (always zero/potentially pointer?)
0x5C -> Uint32: Unknown (always zero?)
0x60 -> Uint32: Pointer to texture names (0x20 bytes per name, padded with null bytes)
0x64 -> Uint32: Unknown (always zero?)
0x68 -> Uint32: Pointer to "unknown geom data 2" (only in character models, zero in map "f" models?)
0x6C -> Uint32: Unknown (always zero?)
(Total: 0x70 bytes)

++++++++++++++
Mesh Structure
++++++++++++++
0x00 -> Uint32: Pointer to vertex data
0x04 -> Uint32: Unknown (always zero?)
0x08 -> Uint32: Pointer to vertex indices (one Uint16 per index; might be variable like primitive type?)
0x0C -> Uint32: Unknown (always zero?)
0x10 -> Uint32: Pointer to "unknown indices" (one Uint32 per index?)
0x14 -> Uint32: Unknown (always zero?)
0x18 -> Uint32: Unknown (always zero/potentially pointer?)
0x1C -> Uint32: Unknown (always zero?)
0x20 -> Uint32: Pointer to vertex attributes
0x24 -> Uint32: Unknown (always zero?)
0x28 -> Uint16: Number of "unknown indices"
0x2A -> Uint16: Number of vertex attributes
0x2C -> Uint32: Size of single vertex
0x30 -> Byte: Unknown (ex. 0x02)
0x31 -> Byte: Unknown (ex. 0x05, 0x01)
0x32 -> Enum: Primitive type
0x34 -> Uint32: Unknown (ex. 0x478EE4F0, 0x9487C9D4)
0x38 -> Uint16: Index into "unknown material data"
0x3A -> Uint16: Unknown
0x3C -> Uint32: Number of vertices
0x40 -> Uint32: Number of vertex indices
0x44 -> Vector3: Unknown (maybe 3 float32s instead)
0x50 -> Vector3: Unknown (maybe 3 float32s instead)
0x5C -> Vector3: Unknown (maybe 3 float32s instead)
(Total: 0x68 bytes)

-----------------------------
Enum (Uint16): Primitive Type
-----------------------------
0x0000: Triangle Strip
0x0001: Triangles
[... more? ...]

++++++++++++++++++++++++++
Vertex Attribute Structure
++++++++++++++++++++++++++
0x00 -> Enum: Attribute usage
0x02 -> Uint16: Number of components
0x04 -> Enum: Component data type
0x06 -> Uint16: Offset in vertex data
(Total: 0x08 bytes)

------------------------------
Enum (Uint16): Attribute Usage
------------------------------
0x0001: Position
0x0002: Normal
0x0005: Texture coordinates
0x0006: Unknown
0x0009: Color (unsure)
0x000A: Bone IDs (unsure)
0x000B: Bone weights (unsure)
[... more? ...]

----------------------------------
Enum (Uint16): Component Data Type
----------------------------------
0x0000: Byte (unsigned byte)
0x0001: Sbyte (signed byte)
0x0002: Uint16 (unsigned short)
0x0003: Int16 (signed short)
0x0004: ByteN (unsigned byte N?)
0x0005: SbyteN (signed byte N?)
0x0006: Uint16N (unsigned short N?)
0x0007: Int16N (signed short N?)
0x0008: Float16 (half-precision float)
0x0009: Float32 (single-precision float)
(Note: same as SceGxmAttributeFormat)

+++++++++++++++++++++++++++++++++
"Unknown Material Data" Structure
+++++++++++++++++++++++++++++++++
0x00 -> Uint32: Unknown
0x04 -> Uint32: Unknown (ex. 0x088100C1)
0x08 -> Uint16: Unknown (ex. 0x0111)
0x0A -> Byte: Unknown (ex. 0x08, 0x00)
0x0B -> Byte: Unknown (ex. 0x00, 0x02)
0x0C -> Uint16: Unknown (always zero?)
0x0E -> Uint16: Unknown (ex. 0x0004)
0x10 -> Uint16: Unknown (always zero?)
0x12 -> Uint16: Unknown (ex. 0x0004, 0x0005)
0x14 -> Byte: Number of "material data entry" (1)
0x15 -> Byte: Number of "material data entry" (2)
0x16 -> Uint16: Unknown (ex. 0x0003, 0x0000, 0x0001)
(Total: 0x18 bytes)

+++++++++++++++++++++++++++++++++++++++
"Unknown Material Data Entry" Structure
+++++++++++++++++++++++++++++++++++++++
0x00 -> Byte[]: Raw data [0x10 bytes]
0x10 -> Enum: "Data usage"
0x11 -> Byte: Unknown (ex. 0x00, 0x04, 0x64)
0x12 -> Uint16: Unknown (ex. 0xFF00)
0x14 -> Uint32: Unknown
(Total: 0x18 bytes)

-------------------------
Enum (Byte): "Data Usage"
-------------------------
0x32: Texture ID
>> Raw Data: 0x00 -> Byte: Index into texture names
0x33: Unknown
0x48: Unknown
0xA4: Unknown
0xA8: Unknown
[... more? ...]
(Note: possibly PVR registers, common shader uniforms, or similar?)

+++++++++++++++++++++++++++++++
"Unknown Geom Data 1" Structure
+++++++++++++++++++++++++++++++
0x00 -> Vector3: Unknown (maybe 3 float32s instead)
0x0C -> Vector3: Unknown (maybe 3 float32s instead)
0x18 -> Vector3: Unknown (maybe 3 float32s instead)
0x24 -> Vector3: Unknown (maybe 3 float32s instead)
(Total: 0x30 bytes)

+++++++++++++++++++++++++++++++
"Unknown Geom Data 2" Structure
+++++++++++++++++++++++++++++++
[... unknown ...]
Reply
Thanked by:


Messages In This Thread
RE: UV coordinates in Digimon Story: Cyber Sleuth - by xdaniel - 04-27-2016, 12:59 PM

Forum Jump: