Thursday, July 7, 2011

Sensibeat's .emg File Structure Tutorial

From RYU_03.cos.emz I dump the face emg file that I rename as RYU_03.face.emg (included in swap obj.rar):
Notice that the emg is composed of 4 objects sharing 1 name.

.emg file references

Let's take a look at RYU_03.face.emg in HxD:

offset 04 to 07:

Code:
00 01 01 43

number of this emg, former is 00 01 01 42, next is 00 01 01 44

offset 10 to 13:


Code:
00 00 02 C7

appears on every emg, may be the marker to the starting point of every later offset references

offset 14 to 15:

Code:
00 01

number of object's name(s)

offset 1C:

Code:
00 50

no idea what those datas are

offset 20 to 21:

Code:
06 66

number of vertex (666 in hex = 1638 in dec)

offset 2E:

Code:
00 40

appears on every emg, no idea what those data are

offset 24 to 25:

Code:
00 00 39 64 (+ 10 = 39 74)

relative offset (couting from offset 10) of another part of the emg

offset 2A to 2B:

Code:
00 04

number of objects

offset 2C to 2D:

Code:
00 70 (+ 10 = 80)

relative offset (counting from offset 10) of the list of relative offsets of the objects

offset 30 to 5F:

no idea what those datas are

offset 60 to 63:

Code:
00 00 00 54 + 10 = 64

relative offset (counting from offset 10) of the 1st object's name dds references (only one here, more references here in case of more objects)

offset 64 to 7B:

Code:
02 00 00 00 00 02 80 3F 22 00 80 3F 00 00 00 00 00 07 80 3F 22 00 80 3F

dds reference
the 1st number in red points to the texture dds
the 2nd number in red points to the normal map dds

dds are ordered from 0 (first texture dds) and the normal map dds numbers follow the texture ones
Ryu has 5 texture dds numbered from #0 to #4 and 5 normal map dds numbered from #5 to #9
#2 is the 3rd texture dds
#7 is the 3rd normal map dds

offset 80 to 8F:

list of relative offsets (counting from 10) of the objects
00 00 00 80 + 10 = 90     1st object
00 00 20 50 + 10 = 20 60  2nd object
00 00 29 D0 + 10 = 29 E0  3rd object
00 00 38 80 + 10 = 38 90  4th object

offset 3974: (given at offset 24)

offset of the beginning of the second part of the emg, that I have yet to understand...

No comments:

Post a Comment