ROM Hack [Help] Extracting textures from BCH; alpha channel & ETC1A4

HelpTheWretched

Well-Known Member
OP
Member
Joined
Feb 4, 2010
Messages
315
Trophies
1
XP
1,560
Country
Canada
I'm using Ohana3DS Rebirth to extract and replace textures from .bch files from Zelda: Tri Force Heroes. The textures are ETC1A4 encoded, but the alpha channels seem strangely tied to the brightness, so darker colours are coming out more transparent. Some dark parts are completely transparent.

On the left: The extracted .png
On the right: That .png flattened to 100% opacity, showing the "gaps"
texture1.png


I tried editing that .png without flattening it by adjusting the hue in certain sections, and replacing it in the .bch.

In the game, it works okay but you can see some of those completely transparent parts showing up as black, like on Link's palms and some little bits on the brim of his cap.
texture2.jpg


Does anybody know what's up with the alpha channel on those textures or another way to extract them from the .bch?


I have an unrelated issue with replacing sounds in this game, just gonna link to it here since it's had no replies yet.
 

HelpTheWretched

Well-Known Member
OP
Member
Joined
Feb 4, 2010
Messages
315
Trophies
1
XP
1,560
Country
Canada
*BUMP*

This issue is resolved. If anyone is interested, the problem was threefold:

1. These were ETC1-encoded textures (no alpha channel), possibly being misread as ETC1(A4).
2. Ohana3DS Rebirth was discarding the colour data of the 100% transparent spots when exporting the textures.
3. My image editing environment would have also discarded that colour data.

So to get around this, first I found a BCH2PNG program. It wasn't smealum's Python script, as that didn't seem to work for me (even after installing the imaging library), but a Windows EXE whose origin I can't remember. Drag & drop any BCH files into its window and it spits out PNG textures. They still had the partial-transparency issue, but the colour data for the invisible spots was retained. Then I loaded them with GIMP and used the Colors -> Curves feature to reduce the alpha channel to nothing.

The only problem was that BCH2PNG program spat out just the top mip-level of each texture (there are 4 for each of Link's outfits), but the missing ones could easily be created after making the edits by making 3 copies of the texture and resizing them to 1/2, 1/4, and 1/8 size.
 

HelpTheWretched

Well-Known Member
OP
Member
Joined
Feb 4, 2010
Messages
315
Trophies
1
XP
1,560
Country
Canada
*BUMP with more info*

Just in case anyone's interested, I found out something else. It turns out #1 on the last post's 3 problems was not true. Ohana 3DS Rebirth was correctly reading the textures as ETC1(A4)-encoded, and the strange alpha channels with the assorted transparent spots were actually intended.

But the alpha channels weren't controlling the textures' transparency in the game - they were controlling the specularity. When I tried replacing some textures with my edits, I inserted them at full opacity thinking it wouldn't matter. When the game loaded the models with these edits, they were very shiny!
 

netnei

Member
Newcomer
Joined
Aug 27, 2017
Messages
7
Trophies
0
Age
25
XP
51
Country
United States
Hey man, I hate the necropost but I've been having a similar issue and I was hoping you could help me out. I've been trying to rip the models from Dragon Quest Monsters: Joker 3, but for some reason that I can't figure out whenever I open the .bch files in ohana3ds rebirth massive portions are totally transparent. I saw your post on a similar topic and tried using the bch2png.exe converter you linked but that didn't seem to have much of an effect. I'm a total newbie to all of this so I have essentially zero clue what's going on, however I did try to follow your instructions in the aforementioned thread regarding adjusting the color curve of the alpha channel in order to make the transparent section
s visible, both the pngs exported by ohana and bch2png.exe did not have alpha channels, and adjudting the color curve of the RGB channels didn't seem to produce any results.

I really appreciate the instructions you've left in your posts, even though they didn't help me with this issue specifically I've learned a lot from then for future endeavors.

I've attatched one of the offending .bch files and what seems to be a corresponding texture file found in a folder called "Masks" if you want to take a look at the problem yourself.

I hope you can help here, I'm sorry I can't describe the problem in more detail, again I don't have much of an idea of what I'm doing. If you can help me solve this I will literally worship you.
 

Attachments

  • m092.rar
    135.8 KB · Views: 281

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • AncientBoi @ AncientBoi:
    :rofl2::tpi::rofl2: I meant his eyes :tpi::rofl2::tpi:
  • ZeroT21 @ ZeroT21:
    :toot:blow me then @K3Nv2
  • K3Nv2 @ K3Nv2:
    Nah I'm straight but you're more than welcome to blow ancientboi
  • ZeroT21 @ ZeroT21:
    LOL, which straight person does not make gay jokes?
    +1
  • K3Nv2 @ K3Nv2:
    I'm straight but we can whack dicks together
  • ZeroT21 @ ZeroT21:
    nah, I'm gud over here, no need for sword fights

    :glare:
    +1
  • K3Nv2 @ K3Nv2:
    Dick slang
  • K3Nv2 @ K3Nv2:
    See ancientboi already has a crush on you
  • AncientBoi @ AncientBoi:
    [brings my ⚔️ ] On Guard :D:evil::wub:
  • K3Nv2 @ K3Nv2:
    Looks more like a dagger to me
  • AncientBoi @ AncientBoi:
    Pffffft I have a crush on everybody
  • ZeroT21 @ ZeroT21:
    I see no problem, unless i happen to grow another gender one day. Too bad it ain't now
  • K3Nv2 @ K3Nv2:
    Thought you already had both hotswappable gender fluid
  • ZeroT21 @ ZeroT21:
    Enjoy whatever life chucks your way

    :teach:
    +1
  • K3Nv2 @ K3Nv2:
    Deeze nuts
  • AncientBoi @ AncientBoi:
    Dem Nutz
  • ZeroT21 @ ZeroT21:
    'Em nutters
  • AncientBoi @ AncientBoi:
    M&M nutz
    +1
  • K3Nv2 @ K3Nv2:
    Slim anus nutter
  • AncientBoi @ AncientBoi:
    :unsure::unsure::unsure: I might go buy them M&M w/nuts. I gotta go out to pay the rent anyway
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Eat a Snickers!
  • Psionic Roshambo @ Psionic Roshambo:
    Almond Joys got nuts!
    Psionic Roshambo @ Psionic Roshambo: Almond Joys got nuts!