• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Melee Automated Texture Expander

Yakult

Smash Cadet
Joined
Jan 11, 2016
Messages
64
--- read DRGN's comment. the effects of this are untested. please use responsibly ---

The other day I finished a script to add space within a character's moves file. Today and yesterday I converted it to add space to within a character's costume file.

To use Melee Automated Texture Expander you need a melee costume file, and the textures you would like to increase the space for placed in the same folder. The textures should be exported via DTW and their file names should be unchanged. Run MATE.exe and drag and drop your costume file onto the command window, input a scale, wait, and save the new file. Image data headers and everything referenced in the file will be updated.

I can see two uses for this program.
1) you can increase the size of specific textures. for example jigglypuff has a 4*4 texture for her body and limbs. increasing this to, say, 256*256 allows for more options when texture hacking.
2) creating a high resolution version of melee within an iso. if you export all textures to a folder you can then scale all at once to be double, tripple, or n-tuple the resolution as those in the original file.

note that this doesnt actually scale the images for you. the outputted file will have strange looking textures for the ones you edited, due to the extra space added. simply open the file in DTW and replace the textures with your high resolution ones just as you would normally replace a texture.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Download - Mediafire or Google Drive

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
 
Last edited:

Michael Ashby

Smash Apprentice
Writing Team
Joined
Dec 10, 2015
Messages
148
Location
Athens, GA
Slippi.gg
GIN#752
The other day I finished a script to add space within a character's moves file. Today and yesterday I converted it to add space to within a character's costume file.

To use Melee Automated Texture Expander you need a melee costume file, and the textures you would like to increase the space for placed in the same folder. The textures should be exported via DTW and their file names should be unchanged. Run MATE.exe and drag and drop your costume file onto the command window, input a scale, wait, and save the new file. Image data headers and everything referenced in the file will be updated.

I can see two uses for this program.
1) you can increase the size of specific textures. for example jigglypuff has a 4*4 texture for her body and limbs. increasing this to, say, 256*256 allows for more options when texture hacking.
2) creating a high resolution version of melee within an iso. if you export all textures to a folder you can then scale all at once to be double, tripple, or n-tuple the resolution as those in the original file.

note that this doesnt actually scale the images for you. the outputted file will have strange looking textures for the ones you edited, due to the extra space added. simply open the file in DTW and replace the textures with your high resolution ones just as you would normally replace a texture.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Download - Mediafire or Google Drive

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Great job, man! This is actually crazy helpful
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
Uh oh... It's happened.

So, I've had a function to do this for a long time (it's how stuff like this is possible). However, I've neglected to create an interface for it as a tool in DTW because it's kind of a Pandora's Box. I've talked to @Achilles1515 about this before. Space can be increased for textures, palettes, subactions, animations, etc; pretty much anything. However, changing texture sizes has a relatively large impact. The game performs many operations on every pixel of every visible texture for every frame of gameplay. (Also: the GameCube's texture cache (TMEM) is only 1 MB. Not everything (6 characters, stage, items, etc.) can fit into that at once, so things must be swapped in/out as needed. More texture data would mean having to swap more often, on top of the usual graphics processing.) So if you increase the size of textures, you're incurring a slowdown to the game. The effect of one texture change would likely be unnoticeable, but with more textures changed, and larger differences in sizes between original and new, that performance impact would increase exponentially. I'm particularly concerned about console setups, and seeing costumes in tournaments.

It doesn't matter for the CSS very much, but for characters it's a whole other story, because they're loaded & rendered during a match, and therefore could affect gameplay. This opens a door of uncertainty toward character texture hacks that has never been seen before (or at least shouldn't have been). Among players, noticing this would be as subjective as perceiving monitor lag. Which means that some players will hold some distrust for character costumes; they might not be sure if they perceive a difference, and might not even be playing a character that has had any textures' sizes changed, but if they know it's possible, many will err on the side of caution and avoid them. Thus, distrust could lead to texture hacks becoming less accepted. Just like flat-screen monitors that aren't actually laggy.

There are limiting factors to how much texture data can be added, but I don't know if that would be reached before some players would notice any slowdown. Maybe a tangent, but, the largest file I've been able to load was the CSS file with 0x420000 bytes (0x430000 failed, so the limit is somewhere between those), though I don't know how much of that was texture data.

Being responsible and only doing minor texture upgrades would probably allow the game to run fine. But ATM that amount is subjective, debatable, and like I said, could lead to texture hack distrust. But maybe we can determine objective limits. Looking at the texture data in a character file to approximate the amount of processing it would require is an idea, but would only very roughly work. Because you can't simply look at the amount of texture data in a file to determine this, since some textures are used many times or in multiple places (which, yes, is able to be counted), and not all may be rendered at any given time, even if the entire character is on-screen, due to exclusion by z-order. Not only that, but even of the textures that are rendered, even if they're the same width/height/type, they do not all go through the same amount of processing, depending on a variety of factors/functions working on them. Full emulation would be required for accurate comparisons.

So, a more accurate method would be to actually perform live benchmarks. The game has native functions and performance counters for this actually, which were used by developers. Metrics are available for the graphics processor front-end, textures, vertex caches, pixels, and memory. These could be tapped into similar to other existing text-displaying hacks (like Magus' counter displays for debug mode), and displayed in real-time while you're playing the game.

Of course, even that kind of accuracy only means something if it's used. If costumes are created that can impact performance, which are uploaded and released into the wild that are not checked, then we could see an increase in people weary of playing on systems with texture hacks.

Considering that this is all just hypothesis and I haven't done any testing, I should throw in that maybe I'm just crazy. We'll need to run some tests. Commence with the science!
 

Yakult

Smash Cadet
Joined
Jan 11, 2016
Messages
64
i was so preoccupied with whether or not i could, i didn’t stop to think if i should...

this is interesting. I did actually wonder about performance. if i had done some light testing before posting this I'd have found that there seems to be a maximum total amount of costume file that can be loaded at once across all 4 players. (using the characters with the largest costume files) ssbm can load 2 characters with all their textures scaled by 2 no problem, but adding a third character with scaled textures, or two characters with unscaled original costumes files causes the game to freeze (usually on the CSS screen as soon as a character is selected, sometimes upon selecting a stage). This happens both on dolphin and on console.

When the game didnt freeze i didnt notice any drop in performance on console, although i didnt test for long and i realise youre talking about minute differences.

btw just to clarify, are you saying that there will be a drop in performance when the gamecube is at its processing limit, or that there may be changes even before this point?


anyway ill add a warning to the post - i dont want to bring about the end of melee texture hacking!!
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
There would be a practical performance impact once it takes longer than a frame (~16.7 ms) to process one frame. (In a sense you could call this the limit.) I have no guess as to how close this difference is in vanilla Melee (i. e. how close to this limit the game is normally), but we do know that this already happens in some cases, like 4+ characters on Fountain. And I don't know how intensive textures are in relation to vertices or other things that need to be calculated per-frame.

And on that mod for performance monitoring again, that'lll be really handy, if not indispensable, when the new 20XX stage engine comes out and model hacking picks up again.
 
Top Bottom