• 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!

Brawl model extractor

Status
Not open for further replies.

Poxag

Smash Apprentice
Joined
Apr 15, 2009
Messages
123
since mariokart 64, s using the melee mewtwo and all of the other models does that mean that we can just replace the brawls models with other ones, cuz that would be easier than editing the current one
 

pghazanfari53

Smash Rookie
Joined
Nov 19, 2008
Messages
13
Ok, so I fixed my problem. I was using the Fbx importer. There is another problem however, the normals come out all messed up. Pharrox, can you fix this?
 

...:::VILE:::...

Smash Ace
Joined
Apr 15, 2009
Messages
786
since mariokart 64, s using the melee mewtwo and all of the other models does that mean that we can just replace the brawls models with other ones, cuz that would be easier than editing the current one
omg poxag.... i have said 100 times that you can get any outside model, but it must have the same object names and same amount of objects, same rig as the char your replacing and same amount of textures...

EDIT: Pharrox i get soem side by side configuration problem... I put the dll in the system folder and n the same directory as the ais file, still no luck.
 

mariokart64n

Smash Apprentice
Joined
Apr 21, 2009
Messages
130
Where are these files from anyway?
when william was cracking the MDL0 format, me and chrrox tested it on alot of games. brres seems like a universal media container for wii games..but I dont know if its in there SDK.. we find that alot of games used brres. and william's MDLO converter worked pretty good on a few, excpet will wasnt able to decipher all the bone data. so everything was horribly disfigured, as the mesh would be all over the place

anyway the files I gave you come from resident evil chronicles and onechanbara.

most brres files work with your converter, but those particular ones didn't. O_o? also I get another common issue with some of the Resident evil models, and thats bad UVs on certain mesh parts. probably these area use a different UV mapping method. anyway not very important.

I'm happy to hear that an easy fix is possible. no doubt once the brres compiler gets developed we'll be able to mod a large range of Wii titles :)

EDIT
by the way me and james noticed the resident evil textures were swizzled dds textures. so we came up with an unsiwzzle method for it.

here magnum cleaned up our process into a perl script.

thought I'd just share this encase you ever encounter something that's swizzled on the wii

Code:
use strict;

my $inputfile;
my $outputfile;

if( $#ARGV >= 0 ) {
	$inputfile = $ARGV[0];
	$outputfile = $ARGV[1];
} else {
	print "Enter the source .dds filename:\n";
	chomp( $inputfile = <STDIN> );
	print "\nEnter output filename (if left blank, appends \"_output\" to source name):\n";
	chomp( $outputfile = <STDIN> );

	$inputfile =~ s/"//g;
	$outputfile =~ s/"//g;
}

if( $outputfile eq '' ) {
	$inputfile =~ /^(.+?)(\....)$/;
	$outputfile = "$1_output$2";
}

open I, "<$inputfile" or die "Could not open $inputfile: $!";
open O, ">$outputfile" or die "Could not open $outputfile: $!";

binmode(I); binmode(O);

my $temp;

sysread( I, $temp, 28 );	# skip TEX header

sysread( I, $temp, 2 );		# width
my $width = unpack( "n", $temp );

sysread( I, $temp, 2 );		# height
my $height = unpack( "n", $temp );

sysread( I, $temp, 4 );		# format
my $format = unpack( "H8", $temp );
print "Texture format: $format\n";

sysread( I, $temp, 28 );	# skip TEX header

print O "DDS" . pack( "CIC4", 32,124,7,16,8,0 );	# DDS header
print O pack( "I3", $height, $width, $height*$width/2 );
print O pack( "I15", 0,0,0,0,0,0,0,0,0,0,0,0,0,32,4 );
print O "DXT1" . pack( "I10", 0,0,0,0,0,4096,0,0,0,0 );


my @odd;
my @even;
my $counter = 0;
my @line;

while( 	sysread( I, $temp, 4 ) ) {
	$temp =~ s/^(.)(.)(.)(.)$/\2\1\4\3/s;
	$line[0] = $temp;

	sysread( I, $temp, 4 );
	$temp =~ s/^(.)(.)(.)(.)$/\2\1\4\3/s;
	$line[1] = &bitmanip( $temp );

	sysread( I, $temp, 4 );
	$temp =~ s/^(.)(.)(.)(.)$/\2\1\4\3/s;
	$line[2] = $temp;

	sysread( I, $temp, 4 );
	$temp =~ s/^(.)(.)(.)(.)$/\2\1\4\3/s;
	$line[3] = &bitmanip( $temp );

	if( $counter & 1 ) {
		push( @odd, "$line[0]$line[1]$line[2]$line[3]" );
	} else {
		push( @even, "$line[0]$line[1]$line[2]$line[3]" );
	}
	$counter++;

	if( $counter == $width/4 ) {
		print O $_ foreach @even;
		print O $_ foreach @odd;
		@even = ();
		@odd = ();
		$counter = 0;
	}
}

sub bitmanip {
	my @b = split '', unpack( "b32", $_[0] );
	return pack( "b32", "$b[14]$b[15]$b[12]$b[13]$b[10]$b[11]$b[8]$b[9]$b[6]$b[7]$b[4]$b[5]$b[2]$b[3]$b[0]$b[1]$b[30]$b[31]$b[28]$b[29]$b[26]$b[27]$b[24]$b[25]$b[22]$b[23]$b[20]$b[21]$b[18]$b[19]$b[16]$b[17]" );
}
 

Pharrox

Smash Journeyman
Joined
Jan 26, 2007
Messages
397
Location
Belleville, MI
Uhh, completely disregard that last release. :embarrass

A combination of a new compiler, a new library, and some bad pointers completely shot any stability it may have had to begin with. Me being too tired to give it proper testing through it out there without catching this. I think I've fixed the problems but I'm going to wait to be sure this time. No new update tonight. :(
 

NeonTogepi

Smash Journeyman
Joined
Apr 5, 2009
Messages
309
Okay a few things after reading through this entire topic:
1. To make these models truly complete, someone make it so we can change sound effects. The BRSAR files can be unpacked so they are wav files, someone just needs to make it so we can put them back.
2. Will these new character models be texture hackable? Hacking a hack...seems odd lol.
3. Young Link, Dr. Mario, Roy, Mewtwo....PICHU WANTS LOVE TOO!!!!!!
4. Will stages be possible? Such as swapping melee and brawl's final destination and battlefield.
5. I heard that you can preview texture hacks with the models some how, completely read through this thread. Can someone simplify the process of doing this for me?

Thanks!
~Neon~
 

mariokart64n

Smash Apprentice
Joined
Apr 21, 2009
Messages
130
I was a bit fooled to, but from what I'm understanding.. only extraction of the models is possible at the moment. therefore because you have the model, of course you can test any texture mods on it from your PC

also anything involving importing into the game, is just speculation right now. reading is easier then rewriting, so it's possible the initial start of any program won't be able to process textures, sound, etc..
 

Poxag

Smash Apprentice
Joined
Apr 15, 2009
Messages
123
If I'm editing marth and I delete a few shapes ad vertices and whatnot, like say his cape and armor, will that screw anything up
 

Pharrox

Smash Journeyman
Joined
Jan 26, 2007
Messages
397
Location
Belleville, MI
I'm pretty sure that you'll need to keep the same number of polygons as the original model. However you can just put a little square inside the body and give it a transparent texture. Really it isn't the number of polygons that's important, it's the number of materials. Since Brawl animation files reference material names you will need to make sure that there are materials in you're model to match. You can add any extra polygons you want as their materials will never be referenced. In the end, the two things that matter are having the same number of joints and materials.
 

Poxag

Smash Apprentice
Joined
Apr 15, 2009
Messages
123
by materials you mean textures right???, so if it has an extra object, for instance I cloned marth's shoulderpad So he has more than one on each side, will that be a problem?? and if so How can I rig it to work correctly, can i attach it to an existing part of marth?
 

fortwaffles

Smash Ace
Joined
Jan 20, 2009
Messages
514
by materials you mean textures right???, so if it has an extra object, for instance I cloned marth's shoulderpad So he has more than one on each side, will that be a problem?? and if so How can I rig it to work correctly, can i attach it to an existing part of marth?
I'm pretty sure that you could do something like making marth's extra shoulder pads the same matherial as his original ones, in theory, they would move and animate together. if anyone knows and i'm wrong, plz correct me. also, Pharrox, if you have any estimate for how long the importer might be, how long? weeks? months?
 

mariokart64n

Smash Apprentice
Joined
Apr 21, 2009
Messages
130
what? is there already a tool out that lets us modify the vertex coordinates of a pre-existing model? or is everyone here talking fiction and assumptions about a tool we all don't have?

I seriously would love to start modding this game, if anyone has any info please let me know. I'm new here and so don't know whats been happening in the scene.
 

Pharrox

Smash Journeyman
Joined
Jan 26, 2007
Messages
397
Location
Belleville, MI
Everything at this point is still just speculation, I'm just saying what I know based on what I've found sure of, probably three), bone and material animations. Bone animations should be obvious, as for the materials, a small example:

Pikachu has 13 textures, but only 5 materials.

The materials are:
main
eyeL
eyeR
eyeYellowL
eyeYellowR

An example of a material animation is
eyeL Pikachu_eyes.00.png 1
eyeL Pikachu_eyes.05.png 7
eyeL Pikachu_eyes.00.png 9

The first part is the name of the material, the second part is the name of the texture that is applied to that material and the third part is the frame. This is how they are referenced in Brawl's animation files. Even though this example is sequential (name.##.ext), I'm pretty sure that it doesn't have to be in game.

At frame 1 Pikachu has his default eye texture. At frame 7 it changes to his closed eye texture, and at frame 9 it goes back to the default. So this would be a simple blinking animation. For this to work you will need both a texture and a material to match. However, if you are creating/editing a character you can add anything you want, polygons, textures, materials, whatever. The key is that you can add whatever you want, you just can't take away what is already there.
 

Poxag

Smash Apprentice
Joined
Apr 15, 2009
Messages
123
@mario kart, I've been messing with the marth model you uploaded for me in 3ds max, I obviosuly can't play with it yet but I've been editing the model already.

@pharrox, when you say that I can't take away wats there does that mean I'm screwed since I deleted marth's cape, and a few other vertices and faces here and there??? cuz that would suck a whole lot
 

Pharrox

Smash Journeyman
Joined
Jan 26, 2007
Messages
397
Location
Belleville, MI
The only things you shouldn't (yeah, most of them can be removed, but I don't reccomend it) take away are bones, materials, and textures. Since there will (probably) always be the same number of polygons as there are materials you probably can't remove those either. However, just because these things shouldn't be removed doesn't mean they can't be worked around.

For something like Marth's cape, it probably won't be a problem, since it always has the same texture, it probably won't be referenced in any other file and therefore won't cause a problem if it's not there (still better to be safe). If you do need to get rid of a polygon or material I suggest that you just delete everything but one small surface. Put that surface in the middle of the body where it won't be seen, and give it a transparent texture. It doesn't need to be the same or even close to what it was. The computer should be able to see it, but just because the computer needs to see it doesn't meen we need to.

Like I say, it probably won't be a problem, but if you want to be safe I would say just reextract Marth's model, find the name of the material for the cape, add a small cube to the model you're working on and give it a material of the same name.

Honestly it all just comes down to being safe. I have a little bit of evidence suggesting that it could make a difference. Still, I have a lot of evidence suggesting it probably won't matter at all. I'd rather let people know now that it could cause problems rather than putting something out and a lot of people have problems because they weren't fully informed.
 

Poxag

Smash Apprentice
Joined
Apr 15, 2009
Messages
123
okay, well when we finally get around to puting new models in game we'll see if it's a problem, so I deleted, some of his armor too, but Where can I see the materials of the model? when the converter, is done will there be a guide, would you mind posting a list of things to check and make sure are right before converting back into the brres and how to fix whatever the problem might be?? cuz that would be awesome
 

Pharrox

Smash Journeyman
Joined
Jan 26, 2007
Messages
397
Location
Belleville, MI
Okay, I have a quick question/favor to ask. Does anyone know where I could find some #00, #08+1, #08+2, #10, or any ##+0 textures? Texture support is coming along, but I still need to test these formats and there don't seem to be too many of them. #10 and #06 aren't even supported by tplconv (which has been my main source for this).
 

fortwaffles

Smash Ace
Joined
Jan 20, 2009
Messages
514
Okay, I have a quick question/favor to ask. Does anyone know where I could find some #00, #08+1, #08+2, #10, or any ##+0 textures? Texture support is coming along, but I still need to test these formats and there don't seem to be too many of them. #10 and #06 aren't even supported by tplconv (which has been my main source for this).
I've heard about the +0 ones, and i think i might've seen them. if i recall corectly, they are used in some menu screen related stuff

Yes, i've just found some in /menu/main/MenuMain_en.pac
they will be in:
518AdvSealButtonX.0.tpl_dir
519AdvSealButtonX.1.tpl_dir
520AdvSealButtonX.2.tpl_dir
521AdvSealButtonX.3.tpl_dir

as for the other formats, #00 is in the same file, one is at:
01MenMainFrTop00.tpl_dir

#08+1 at:
178MenMainDelete04.tpl_dir

#08+2 at:
159MenCollSoftMrk11.1.tpl_dir

unfortunately, i couldn't find #10 in that file, but if you need more examples for the others, let me know, becase there are more of all the ones I found (except the +0, which I listed all) (these are all in the MenuMain_en.pac, there may be more in other files)
 

...:::VILE:::...

Smash Ace
Joined
Apr 15, 2009
Messages
786
I'm pretty sure that you'll need to keep the same number of polygons as the original model. However you can just put a little square inside the body and give it a transparent texture. Really it isn't the number of polygons that's important, it's the number of materials. Since Brawl animation files reference material names you will need to make sure that there are materials in you're model to match. You can add any extra polygons you want as their materials will never be referenced. In the end, the two things that matter are having the same number of joints and materials.
The polygons wouldn't need to be the same. With my model swap the models didn't have the same polygons.

EDIT: I foudn collsion models.
 

Pharrox

Smash Journeyman
Joined
Jan 26, 2007
Messages
397
Location
Belleville, MI
Okay, new release time. Special thanks to fortwaffles for finding the missing texture formats for me to test this with. :)

http://www.patriotmods.com/brawlhacks/utilities/ais0.1.3.rar

This version basically serves to add texture support. Gary gets pretty much all the credit for this, I just tweaked his code slightly to make it work with TEX0 and fixed a few bugs. I also edited it to work with the two models mariokart posted (really weird stuff) and cleaned up the texture mapping.

Well at this point my focus kinda switches from writing the exporter to writing the importer. I'll still be fixing any bugs found on the export side, but I'm not going to try to support and other formats for now.

@ VILE. When you say you found the collision models, you mean you found the models used for hitboxes in MDL0 format? I've always been under the impression that hitbox data was stored in a different format in the bin file in a characters default .pac.


EDIT: Sorry about all the .dlls. Will be reduced in a later release.
 

mariokart64n

Smash Apprentice
Joined
Apr 21, 2009
Messages
130
awesome texture support ^_^

edit:
does this include the pointer fix for the unsupported brres files I posted
 

...:::VILE:::...

Smash Ace
Joined
Apr 15, 2009
Messages
786
Okay, new release time. Special thanks to fortwaffles for finding the missing texture formats for me to test this with. :)

http://www.patriotmods.com/brawlhacks/utilities/ais0.1.3.rar

This version basically serves to add texture support. Gary gets pretty much all the credit for this, I just tweaked his code slightly to make it work with TEX0 and fixed a few bugs. I also edited it to work with the two models mariokart posted (really weird stuff) and cleaned up the texture mapping.

Well at this point my focus kinda switches from writing the exporter to writing the importer. I'll still be fixing any bugs found on the export side, but I'm not going to try to support and other formats for now.

@ VILE. When you say you found the collision models, you mean you found the models used for hitboxes in MDL0 format? I've always been under the impression that hitbox data was stored in a different format in the bin file in a characters default .pac.


EDIT: Sorry about all the .dlls. Will be reduced in a later release.
Yep, I found the collision model in MDL0 format.
 
D

Deleted member

Guest
question: has onyone achieved using a changed model ingame?

and if so, are there vids of it?
 

Poxag

Smash Apprentice
Joined
Apr 15, 2009
Messages
123
I'm changin marth's model and I noticed that though I can see the bottome of his shirt from behind I cant' see it from the front, I stretched it really far so it hangs down, but I can't see from the front, anybody know how to fix this
 

mariokart64n

Smash Apprentice
Joined
Apr 21, 2009
Messages
130
a polygon only has one surface, the other side light passes through.. also meaning you can see past it. :/

games usually have a option to render double sided polygon.. but I doubt it'll be that easy for us.
 

fortwaffles

Smash Ace
Joined
Jan 20, 2009
Messages
514
I'm changin marth's model and I noticed that though I can see the bottome of his shirt from behind I cant' see it from the front, I stretched it really far so it hangs down, but I can't see from the front, anybody know how to fix this
just duplicate the polygons of that area, flip the faces, and put it in the same spot and the same material, then it should be able to be viewed from both sides

@Pharrox sorry to bug you, but when I use your exporter (any of the versions) the polygon/mesh data is all distorted. is there a way to fix this? i use 3ds max 2009 and get a lot of errors when importing the dae
 

Pharrox

Smash Journeyman
Joined
Jan 26, 2007
Messages
397
Location
Belleville, MI
Which models are you trying to import and what importer are you using? I reccomend ColladaMax NextGen.

Also are you sure you're using Collada and not FBX? I'm pretty sure you are, but I still have to ask. ;) Finally, could you post a log of the errors Max give when it loads the file?
 

fortwaffles

Smash Ace
Joined
Jan 20, 2009
Messages
514
Which models are you trying to import and what importer are you using? I reccomend ColladaMax NextGen.

Also are you sure you're using Collada and not FBX? I'm pretty sure you are, but I still have to ask. ;) Finally, could you post a log of the errors Max give when it loads the file?
fighter models, and i tried a trophy (marth) I just use the import option on 3ds max, and:
incomplete bind pose errors: nodes, link nodes, mismatched matrices. that was for ike's fighter model.
Edit: Tried it in Meshlab, and it turns up the same as in 3ds max. in point mode, i can see all the poins, but the faces are randomly scattered triangels like the squirtle in one of the previous posts

make one that reverses the process, and I can FINISH dr mario more quickly
he's working on one
 

GaryCXJk

Smash Lord
Joined
Jun 2, 2006
Messages
1,809
By the way, I hope you did account for the fact that GD Library only has 128 grades of alpha instead of the usual 256. That was a mistake I made with the first few versions.
 

mariokart64n

Smash Apprentice
Joined
Apr 21, 2009
Messages
130
yeah the textures still look wrong to me, but I dont have anything to confirm the 128/256 of grey problem. but if I can boot brawl on dolphin(pal is rumored to boot) then I'll dump some textures and post them here

I do know some alphas are a darker white than they should be. so instead of being true white, its like a slight grey causing improper transparency...

but its not a huge deal now, the gradient isn't very noticeable, so I can't tell for sure if it is indeed wrong. but nothing we can't pre-offset in photoshop really.

PS
I know you said your focusing on importing into brwal now. but if it isn't too much trouble, theres a problem with this brres file. the converter outputs a ".dae" file which is fine.. but its not the entire character model. seems as if the exporter only finds a subobject of the model and not the rest. not important to brawl, but its one of my favorite models from bikini slayers ^_^

http://www.mediafire.com/?divnznzmzxd

lastly I wrote up a simple bat script for the app if anyone needs it. i used it to process alot of brres files at one time. all it does is call the converter with a brres file, then puts the out put into a subfolder. it also renames the ".dae" and "MDL0.dae" outputs so there are no name conflicts;

Code:
FOR %%1 in (*.brres) DO (
"C:\Documents and Settings\HP_Administrator\ais0.1.3\AiS.exe" %%1
REN ".dae" %%~n1.dae
REN "MDL0.dae" MDL0_%%~n1.dae
MD "%%~n1"
MOVE "%%~n1.*" "C:\Documents and Settings\HP_Administrator\ais0.1.3\%%~n1"
MOVE *.png "C:\Documents and Settings\HP_Administrator\ais0.1.3\%%~n1"
MOVE *.dae "C:\Documents and Settings\HP_Administrator\ais0.1.3\%%~n1"
MOVE *.log "C:\Documents and Settings\HP_Administrator\ais0.1.3\%%~n1"
)
all files must be in your user directory, also make changes to the bat so that my username "hp admin" is replaced with your file path
 

fortwaffles

Smash Ace
Joined
Jan 20, 2009
Messages
514
I'd much rather see the importer than the exporter fixed, I mean, atleast we can still see the material names etc.
I was wondering though, will we be able to move bones to different locations? I'm gonna want to make a sly cooper marth, but I want to move the cape bones up to the head to make a headband (like ike's)
 

mariokart64n

Smash Apprentice
Joined
Apr 21, 2009
Messages
130
unless there is a planned program to offset the bone coordinate changes in the animation files... then you should not be touching the position of the bones. if you do so, you'll end up messing up the characters movement in the game.

the default animations will basically revert any changes you made, so your character will appear distorted.
 

Poxag

Smash Apprentice
Joined
Apr 15, 2009
Messages
123
is there a way to change the character's, basic stance, cuz Sephiroth's basic stance with his left hand raised above his head is much more awesome than Marth's semi-gay, girl pose. Also I think I asked this before but will we be able to edit the models of effect's?
 

EverAlert

Smash Master
Joined
Mar 4, 2008
Messages
3,433
Location
Australia
NNID
EVAL89
3DS FC
2664-2214-3431
Yep, I found the collision model in MDL0 format.
Woah, wait just a second. Does this mean we might be able to export the character models, add textures to the hitboxes, then reimport them so we can see the hitboxes in-game?

*dies and goes to heaven*
 
Status
Not open for further replies.
Top Bottom