The VG Resource
Parsing .BCH to find textures - Printable Version

+- The VG Resource (https://www.vg-resource.com)
+-- Forum: The Resources (https://www.vg-resource.com/forum-109.html)
+--- Forum: The Models Resource (https://www.vg-resource.com/forum-111.html)
+---- Forum: Ripping Help (https://www.vg-resource.com/forum-115.html)
+---- Thread: Parsing .BCH to find textures (/thread-30927.html)



Parsing .BCH to find textures - HelpTheWretched - 04-12-2017

I've been working with the character models from Zelda: Tri Force Heroes, as you can see in this post (which has been resolved).

Anyway, I've got various programs that can extract the textures from the .BCH models, but replacing these textures using Ohana3DS causes them to get re-encode with particularly bad ETC1A4 compression. What I'd like to do is convert the textures myself first, using a conversion tool from ARM that can optimise the quality, then replace the textures with a hex editor.

Problem: The textures don't appear to have any headers in the .BCH file, so I can't find the precise spots to replace. I've been able to estimate their locations by copying the .BCH and replacing a single texture in one of them, then comparing the files, but it's not very helpful.

Request: Can anybody help me understand how a .BCH file indexes/stores the textures, or how any programs go about finding/extracting them? Alternatively, extracting the textures in their original format instead of converting to .PNG would help me understand. There is a bch2png Python script by smealum here (below the bch2obj script), but I don't know enough Python to make sense of it. Sad Thanks!