Jump to content

ALBW (3DS) - Model Format discussion


Twili
 Share

Recommended Posts

http://www.mediafire.com/download/z0rj1kemar8bq21/ActorCommonBCHs.rar

 

Join me in figuring out the model format for A Link Between Worlds! These were extracted from ActorCommon.szs, so they're the models used in many places, such as Link.

 

Here's what I know so far about the format, using Link's model (055.bch) as an example:

 

===

 

HEADER

 

0x0: Magic word "BCH" (null-terminated.)

0x4: Unknown, is set to 2121E1A2 in every file.

 

0x8: Chunk 1 pointer. (44000000) Needs to be word-swapped.

0xC: Chunk 2 pointer. (643A0000) Needs to be word-swapped.

0x10: Chunk 3 pointer. (A03E0000) Needs to be word-swapped.

0x14: Chunk 4 pointer. (00780000)  Needs to be word-swapped.

0x18: Chunk 5 pointer. (00900300) Needs to be word-swapped.

0x1C: Chunk 6 pointer. (8C250400) Needs to be word-swapped.

 

0x20: Chunk 1 size. (203A0000) Needs to be word-swapped.

0x24: Chunk 2 size. (30040000) Needs to be word-swapped.

0x28: Chunk 3 size. (20390000) Needs to be word-swapped.

 

0x2C: Unknown. (28180300) Needs to be word-swapped.

0x30: Also unknown. (A4950000) Needs to be word-swapped.

 

You would think that these are the sizes for chunks 4 and 5, but adding them to the pointers results in them running past the start of the next chunk.

 

0x34: Chunk 6 size. Needs to be word-swapped. (CC0B0000)

 

0x38: Another unknown value (D0010000), but is as big as the half-word at 0x42 multiplied by 4. This applies to every file. Needs to be word-swapped.

0x3C: Reserved? Set to 00000000 in every file.

0x40: A half-word that needs to be byte-swapped. 0100 (0001 byte-swapped) in every file except 065.bch, where it is 0000.

0x42: The half-word that when multiplied by 4 equals the value at 0x38, and needs to be byte-swapped first of course. (7400)

 

===

 

Chunk 2 will be mentioned first because it's used by others. It's purely null-terminated strings that aren't aligned. Excerpt:

 

2@DefaultShader-s2-nl.3@DefaultShader-nl.LarmA_jnt.LarmB_jnt.Lclotch_jnt.Link_model.

 

===

 

Chunk 1 contains the skeleton, I assume?

 

If you search for pointers relative to the start of Chunk 2 in your hex editor, such as 3D000000 (0000003D word-swapped) which goes to "Lclotch_jnt", you will find them.

 

I literally don't have any more of a clue as to the format of this chunk, as it's extremely convoluted, like the others!

 

===

 

Chunk 3 I know for certain loads indices and points to textures. Examples...

 

00EC0200 27020F00 08040000 28020F00

 

The above is at 0x54C0 (absolute.) Again, everything needs to be word-swapped.

 

The first word is a relative pointer into Chunk 4. The third word is the size of the indices data requested, so divide this by 2 if you wish for the amount of indices.

I don't know for certain what purpose words two and four serve.

 

80100000 9D000F00 0D000000 9E000F00

 

The above is at 0x67E0 (absolute.) Word-swapping needed.

 

I only know that the first word is a relative pointer into Chunk 4. This is for a texture. Each texture seems to be pointed to three times for some reason.

 

That's all that I know about Chunk 3 now. No determining how the data is pointed to for specific model parts yet.

 

===

 

Chunk 4 contains textures and indices. That's all I've got to say.

 

===

 

Chunk 5 is the vertices, normals, and texture coordinates. Nothing else about it for now.

 

===

 

Chunk 6 I have no idea about.

 

===

 

I hope that somebody can make use of these notes, which are incredibly lacking.  -_-

Link to comment
Share on other sites

  • 1 month later...

I've learned more since I made the video, and now models won't be missing any parts. Download all of the models I was able to convert here:

 

http://www.mediafire.com/download/plcefyev2rdb827/ActorCommonOBJs.rar

 

And here:

 

http://www.mediafire.com/download/l6ld0ccbi9gsviv/Demo8OBJs.rar

 

They still lack textures, because I don't understand the texture format yet. But you can give them funky custom textures if you want to use them for anything.

 

Here's some previews of the characters only:

 

Link model comparison (gameplay versus cutscenes):

 

cj4RKJy.pngpXU2uX4.png

 

The cutscene model has two sets of hands; open and closed.

 

Princess model comparison (Hilda versus Zelda):

 

cGOFyDG.pnguLF2a7R.png

 

 

Ravio model comparison (hood down (most of the game) versus hood up):

 

clPcvvj.pngNRDfz5X.png

 

 

Irene:

 

xEme9jH.png

 

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.