これは Google に保存されている http://www15.atpages.jp/ganoux/ppblog/index.php?mode=page&aim=B2F2C0CFBEF0CAF3C5BEBADC のキャッシュです。 このページは 2010年11月20日 16:27:37 GMT に取得されたものです。 そのため、このページの最新版でない場合があります。 詳細

フルバージョン
このページへのリンクにだけ含まれているキーワード: dash2  
初心者dasH2’
解析情報を転載していこうというコーナー。まとめっす。

xxFileFormat

The .xx file format. 
Open this text file in notepad or the formatting looks like crap.
-Rawmonk

--------------------------------------------------------------------------------------------------------------
All values in litle endian first (Intel x86)

CHAR	 1 Byte ASCII
WORD	16 bit unsigned
DWORD 	32 bit unsigned	(LongWord)
FLOAT	32 bit float	(Single)
b	byte


Pseudo Code:
--------------------------------------------------------------------------------------------------------------
Read_Object(NumberOfchildren)
	for each NumberOfchildren
		FileRead Object
		if Object.MeshCount > 0
			FileRead Meshes
			FileRead BoneCount
			if BoneCount > 0 
				FileRead Bones
		if Object.NumberOfChildren > 0
			Read_Object(Object.NumberOfChildren)



HEADER
--------------------------------------------------------------------------------------------------------------

    ID     ?              ?
 |------|-----|------------------------|
    5b   DWORD           17b


OBJECT SECTION
--------------------------------------------------------------------------------------------------------------

OBJECT NAME
  Length    Object Name   00 							--
 |------|----------------|--|	(For each CHAR xor 0xFF)			 |
  DWORD                   1b 							 |
	|-- Length x CHAR --|							 |
										 |
										 |
		FrameTransformMatrix ?									 |
  Child Count   Normal        Normal        Normal        Origin?		 |
 |------------||-------------|-------------|-------------|-------------|	 |
  DWORD         4 x FLOAT     4 x FLOAT     4 x FLOAT     FLOAT * 4		 |--- If "Mesh Count" = 0 just
               |-------------------------- 64b ------------------------|	 |    repeat this section
										 |
										 |
MESH COUNT AND MESH MAXIMUM SIZE?						 |
    ?    Mesh Count MIN SIZE?   MAX SIZE?     ?					 |
 |------|----------|-----------|-----------|------|				 |
   16b   DWORD      3 x FLOAT   3 x FLOAT    16b				 |
 |----------------------- 60b --------------------|				 |
										--


MESH SECTION
--------------------------------------------------------------------------------------------------------------

UNKNOWN
  00
 |--|
  1b


MESH HEADER									--
         ?        Material ID							 |
 |---------------|-----------|							 |
        16b          DWORD							 |
 |------------ 20b ----------|							 |
										 |
										 |
FACES (Number of faces = Face count / 3)					 |
  Face count FIRST  SECOND THIRD						 |
 |----------|------|------|------|--..						 |
    DWORD    WORD   WORD   WORD							 |--- Repeat "Mesh Count" times
            |------ count x 2b -------|						 |
										 |
										 |
VERTICES NORMALS UVS ETC							 |
  Vertex count Index  V-Coords   Weight     Bone   Normal     UV		 |
 |------------|------|----------|----------|------|----------|----------|--..	 |
     DWORD     DWORD  3 x FLOAT  3 x FLOAT  4 x 1b 3 x FLOAT  2 x FLOAT		 |
              |---------------------- Count x 52b --------------------------|	 |
										--					



VERTICES (Might be all vertices for all meshes above except those sharing same position)
  Vertex count       ?        Index  V-Coords   Weight     Bone   Normal     UV
 |------------|--------------|------|----------|----------|------|----------|----------|--..
      WORD           8b
                             |---------------------- Count x 52b --------------------------|


BONE SECTION
--------------------------------------------------------------------------------------------------------------

  Bone count 
 |----------|
    DWORD    


BONE NAME									--
  Length    Bone Name     00 							 |
 |------|----------------|--|	(For each CHAR xor 0xFF)			 |
  DWORD                   1b 							 |
	|-- Length x CHAR --|							 |
									 	 |
										 |--- Repeat "Bone Count" times
 BONE INDEX    Normal        Normal        Normal        Origin?		 |
|------------||-------------|-------------|-------------|-------------|		 |
 DWORD         4 x FLOAT     4 x FLOAT     4 x FLOAT     FLOAT * 4		 |
              |-------------------------- 64b ------------------------|		 |
										--



MATERIALS (After all objects have been read)
--------------------------------------------------------------------------------------------------------------

    ?   Material Count
 |-----|--------------|
  DWORD     DWORD


  Length   Material Name  00 							--
 |------|----------------|--|	(For each CHAR xor 0xFF)			 |
  DWORD                   1b							 |
	|-- Length x CHAR --|							 |
										 |
										 |
  Diffuse    Ambient    Specular   Emmisive   SpecPower				 |
 |----------|----------|----------|----------|----------|			 |
  4 x FLOAT  4 x FLOAT  4 x FLOAT  4 x FLOAT  FLOAT				 |
 |----------------------- 68b --------------------------|			 |
										 |
										 |
  Length   Texture Name   00					--		 |
 |------|----------------|--|	(For each CHAR xor 0xFF)	 |		 |---- Repeat "Material Count" times
  DWORD                   1b					 |		 |
	|-- Length x CHAR --|					 |		 |
								 |		 |
								 |-- x 4	 |
  Texture Type         ?					 |		 |
 |------------|------------------|				 |		 |
     DWORD            12b					 |		 |
								--		 |
										 |
              ?									 |
 |--------------------------|							 |
             88b								 |
										--


TEXTURES
--------------------------------------------------------------------------------------------------------------

  Texture Count
 |-------------|
     DWORD


  Length   Texture Name   00							--
 |------|----------------|--|	(For each CHAR xor 0xFF)			 |
  DWORD                   1b							 |
	|-- Length x CHAR --|							 |
										 |
										 |
										 |
  0x00  Width  Height   0x01   0x01  Format  0x03  Img Type Checksum File Size	 |
 |-----|------|-------|------|------|------|------|--------|--------|---------|	 |---- Repeat "Texture Count" times
  DWORD DWORD  DWORD   DWORD  DWORD  DWORD  DWORD  DWORD    BYTE     DWORD	 |
										 |
										 |
              Texture File							 |
 |------------------------------------|						 |
              File Size x b							 |
										--

Format = bmp 0x14, tga 0x15
Checksum = read every 32 byte of the file from address 0x00 to the end
	   add them together in a DWORD then do DWORD & 0x000000FF = Checksum
U1 = bmp 0x00, tga 0x02 might be imagetype for tga 0=none,1=indexed,2=rgb,3=grey,+8=rle packed

--------------------------------------------------------------------------------------------------------------
END oF FILE

xa File format(sb3)

=======
History
=======
v0.6 - Updated Section 3
v0.5 - Fixed Section 4 (rotation was in the wrong order)
v0.4 - Updated Section 4
v0.3 - Updated Section 3
v0.2 - Fixed Section 4 (was missing a name block)
v0.1 - Initial


=====
Notes
=====
- If you don't already know, .xa files have animation data.
- Data is in the right-handed coordinate system. DirectX uses left-handed.
- Some structures are similar to those in the DirectX .x file format.
- This document describes bytes decrypted from a .pp file.
- Wherever you see [name block], it's a struct:
    struct name {
       DWORD name length;  // including null-termination byte
       string name;  // also including null-termination byte
    }
    The name string is decrypted by negating each byte


================================
File types and sections overview
================================
There are 2 file types of .xa files. The very first byte is either a 0x02 or 0x01. The only files that have 0x01 are mp04_00_00_00_00, mp05_00_00_00_00, mp07_00_00_00_00, and mp08_00_00_00_00 from sb3_0400.

There are 4 types of sections. If the .xa file has a section, it'll have a 0x01 byte or 0x00 if it doesn't. If the file type is 0x02, you'll need to skip a byte (always 0x00) before reading the 4th section. The skipped byte might be part of a previous section.

So the pseudo code is:
[1 byte]: file type
[4 bytes]

[1 byte]: has section 1?
if (has section 1) { read section 1 }
[1 byte]: has section 2?
if (has section 2) { read section 2 }
[1 byte]: has section 3?
if (has section 3) { read section 3 }

if (file type == 0x02) { skip [1 byte] }

[1 byte]: has section 4?
if (has section 4) { read section 4 }


=========
Section 1
=========
[DWORD]: count1
foreach (count1)
{
  [name block]
  [DWORD]: count2
  [count2 * 72 bytes]
}


=========
Section 2
=========
[DWORD]: count1
foreach (count1)
{
  [DWORD]
  [name block]
  [17 bytes]
}


=========
Section 3
=========
These are vertex animations, which include oil, tongue, mouth, and user hand animations.

[DWORD]: count1a
foreach (count1a)
{
  [1 byte]
  [DWORD]: count1b (equals number of vertices)
  [count1b * 2xWORD] sets of 2 vertex indices (unknown use)
  [name block] AnimationSet name
}

[DWORD]: count2a
foreach (count2a)
{
  [DWORD]: count2b (equals number of vertices)
  [count2b * 3xfloats] vertex coordinates
  [count2b * 3xfloats] normal
  [name block] AnimationFrame name
}

[DWORD]: count3a (number of AnimationSets)
foreach (count3a)
{
  [name block] Frame name used by the Animation
  [name block] AnimationSet name
  [DWORD]: count3b (number of Animations used in the AnimationSet)
  foreach (count3b)
  {
    [6 bytes]
    [name block] AnimationFrame name
  }
  [DWORD]
}


=========
Section 4
=========
These are bone/skeletal animations, which include body animations.

for (512 times)
{
  [64 bytes] mostly 0xff
  [44 bytes] mostly 0x00
}

[DWORD]: count1 (number of animations)
foreach (count1)
{
  [name block] frame name used
  [DWORD]: count2 (number of animation frames)
  [DWORD]: unknown
  [count2 * 52 bytes] Animation Frame Data
}

Animation Frame Data
====================
[DWORD]: animation frame index
[12xfloats]:
  In the DirectX .x file format
    float[0]: rotation2
    float[1]: rotation3
    float[2]: rotation4
    float[3]: rotation1
    float[4]: unknown (always 0x00?)
    float[5]: unknown (always 0x00?)
    float[6]: translation1
    float[7]: translation2
    float[8]: translation3
    float[9]: scaling1
    float[10]: scaling2
    float[11]: scaling3

    OR

    rotation: float[3], float[0], float[1], float[2]
    scaling: float[9], float[10], float[11]
    translation: float[6], float[7], float[8]

xsa File format(書きかけ)

人工少女3/はんなりxsa解析

Dword?/00 00 00 00
Byte/00/XSA_ver?
Byte/03/XA_Format?
space/00 
DWord/Idx?/00 00 00 01
charactor/bit反転/初期状態
FF*56Byte/space
00*DWord(4Byte)×11
charactor/bit反転/立ち
FF*56Byte/space
float;
	1.5:speed
	0:next?
	10:start
	20:end
1Byte;
	01:flag(loop)
space;
	00 00 00 00 00 00 00
1Byte;
	200:(int_10)=C8(not used)
18Byte*00
1Byte:00
charactor/bit反転/歩き
以下略。

箱 xsa解析
00
00 00 00 01/XSA_ver?
03/XA_Format?
00 00 00 01/section No.?
※ここから同じ。
2.0
0
125
145
※ここから変化?
01
02
01
04
00*24Byte
Charactor/ベッド待機→あくび
7E BF FF FF/?
FF*52Byte
以下略。
箱 xa解析
03/xa format
00 00 00 00
00
00 00 00 01/section?
※ここから同じ
0.5
0
10
40

01/loopON
00
00
00
00
00*23

pbi FileFormat(かきかけSM2)

.pbi FileFormatちょっと解析?でーた

bit反転.pbi
1Byte		00
DWord		00 00 00 0C :枝bone数+1=12?
DWord		00 00 00 05 :boneの本数=5
delimita	00 00 00
1Byte		03 :?
delimita	00 00 00
charactor	a01_J_skirtA01 :bone name
中略

CD CC CC 3D
00 00 F0 41
00 00 A0 40
00 00 F0 41
00 24 F4 48
66 66 66 3F
00 00 80 3F
delimita	00 00 00
00
CD CC 4C 3F
CD CC 2C 41
00 00 A4 41
01
delimita	00 00 00
61 30 31 5F
4A 5F 73 6B
69 72 74 41
1Byte		01:?
delimita	00 00 00
charactor	a01_J_skirtA02
and so on...

<< 2010.11 >>
SMTWTFS
 1 2 3 4 5 6
7 89 10 11 1213
1415 16 17 18 1920
21222324252627
282930    
 
T: Y: ALL: Online:
ThemeSwitch
Created in 0.0173 sec.
Powered by @PAGES | relate link | hotword link
inserted by FC2 system