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

How to import OBJ into brawl

picano

Smash Rookie
Joined
Jan 18, 2008
Messages
12
can you do this with blender?
Came here to ask that very question...

But experimented a bit and well...



Just need to know how to texture it now...

As for how I got it to work from Blender.
  1. Export as Wavefront Obj (Selecting triangulate, rest default)
  2. Open obj in notepad++
  3. Find / Replace with Regex. (My results were like... 1.000000, 2.000000, 3.000000. So, I did Find: "\.\d\d\d\d\d\d" and replace "00" to make it 100, 200, 300)
 

pikazz

Smash Lord
Joined
Dec 6, 2009
Messages
1,868
Location
Sweden, Umeå (Currently in Seattle)
NNID
pikamaxi
Urrrrrg. still dosen't work when I try to replace the course with the model.
it just goes to the model window, and it's blank, and it says parsing.... in the bottom-left corner. :(
can you print screen then this happened? D:
can you do this with blender?
dont know, blender want to co-operate with my computer D:
Came here to ask that very question...

But experimented a bit and well...



Just need to know how to texture it now...

As for how I got it to work from Blender.
  1. Export as Wavefront Obj (Selecting triangulate, rest default)
  2. Open obj in notepad++
  3. Find / Replace with Regex. (My results were like... 1.000000, 2.000000, 3.000000. So, I did Find: "\.\d\d\d\d\d\d" and replace "00" to make it 100, 200, 300)
hm, it is hard to explain :/
but the textures seems to use the "currect" or "replaced" polygon in the model so you need to find out what kind of texture it using.

are you sure about the blender?
 

picano

Smash Rookie
Joined
Jan 18, 2008
Messages
12
hm, it is hard to explain :/
but the textures seems to use the "currect" or "replaced" polygon in the model so you need to find out what kind of texture it using.

are you sure about the blender?
That's what I thought at first too upon seeing yours... would you mind uploading the obj you exported from 3ds so I can compare the outputs?

And speaking of output, Blender is a bit of a pain to deal with right now but... it shouldn't be too hard to modify Blender's Obj export script to output integer data (removing the need for find replace altogether). I want to play with this a lot more, but I've got some other stuff I want to do first this weekend.

EDIT:

Eh... was simpler than I thought.

http://pastebin.com/tU6ajKnv

Simply multiplied by 1000 (depending on what scale you work at, this may be increased) on line 470 and set %.6f to %i (float 6 precision to integer)

It's a little imprecise... ((1,1,1) will randomly be (1000,1000,1000) or (1000, 999, 999)) but it allows the obj to be imported directly into SZS Modifier.

For placement of script:
http://en.wikibooks.org/wiki/Blende...ced_Tutorials/Python_Scripting/Export_scripts

It appears as '0bj Export' atop the export menu.
 

ChuteTheMessenger

Village's Strongest Hitman
Joined
Feb 19, 2009
Messages
288
Great tut! This opens up more opportunities for other cool characters and stages to be hacked in. The pic under step 13 is broken, though.

Does anyone know any games with OBJ files that would be worth importing to Brawl?
 

Justin712

Smash Rookie
Joined
Jul 15, 2010
Messages
6
I'm having some problems with importing a custom model. I tried a box and a sphere, and it works up until the SZS Modifier. The model is visible in the SZS Modifier, but after using the model porter programs it's invisible in brawlbox. Any suggestions on how to fix this?

EDIT: Not exactly sure why, but keeping the dots in the obj file as dots instead of commas fixed it. It also became invisible in SZS when I kept it like this, but it fixed it in brawlbox.
 

n64billy

Smash Ace
Joined
Feb 4, 2009
Messages
614
Location
Behind you!
EDIT: Not exactly sure why, but keeping the dots in the obj file as dots instead of commas fixed it. It also became invisible in SZS when I kept it like this, but it fixed it in brawlbox.
Huh... maybe that will fix it for me too..? *Scurries off and tries*

EDIT: It worked to an extent... I could get it into BB, but my model doesn't show up..
 

Justin712

Smash Rookie
Joined
Jul 15, 2010
Messages
6
Yeah, I'm already having a new problem that might be related to that method. It's visible in both BrawlBox and Brawl itself, but the smoothing groups didn't save.

@n64billy I was having that same problem actually. And you say the dots didn't make it visible? Is it visible in SZS Modfier?
 

picano

Smash Rookie
Joined
Jan 18, 2008
Messages
12
So... I've had some luck with Blender, had to modify the script a bit further. (Bumped up the multiplication by 100, removed some references to mtl)





Not the best pics... but I got textures working. (I had another pic of random blocks with the moon texture that I forgot to save) My problem now is... the polygon / texture that it is getting assigned to. The tree model its getting stuck with has two textures (standard and an env)... I think that is why my current one is just a purple blob once I try using my own... Then again, I guess this is far more complex than my original test model.

Any suggestions?

Mmm... got it working better, but lots of things to fix up. Just split it up quite a bit more.
 

pikazz

Smash Lord
Joined
Dec 6, 2009
Messages
1,868
Location
Sweden, Umeå (Currently in Seattle)
NNID
pikamaxi
I'm having some problems with importing a custom model. I tried a box and a sphere, and it works up until the SZS Modifier. The model is visible in the SZS Modifier, but after using the model porter programs it's invisible in brawlbox. Any suggestions on how to fix this?

EDIT: Not exactly sure why, but keeping the dots in the obj file as dots instead of commas fixed it. It also became invisible in SZS when I kept it like this, but it fixed it in brawlbox.
dont know why :/
I can't have dots in the obj file because it will say the file are invalid D:
Huh... maybe that will fix it for me too..? *Scurries off and tries*

EDIT: It worked to an extent... I could get it into BB, but my model doesn't show up..
if it are invisable, have you try them in game? D:
they maybe have an "effect" texture or have zoomed out more?
As I have seen, the bone are EXACTLY in the middle ON the plattform, not the model if the model is not exactly in middle (check the battlefield's 3 plattforms to understand what I mean)
this is great for stage's pieces xD
 

Justin712

Smash Rookie
Joined
Jul 15, 2010
Messages
6
The tree model its getting stuck with has two textures (standard and an env)...
Yeah, I'm pretty sure it's supposed to do that. Mine did that also. All you need to do is replace the standard with your diffuse, then uncheck all of the textures in brawlbox preview. After that, what I did was I deleted all of the textures except for the one I replaced, including the env. When I previewed it again in BrawlBox it had a white texture as if I never put one on, but when I tried it in brawl it had my texture on it. Give that a try. If you get an unhandled exception error, then it means you need to delete the files in the Animtxt or whatever it's called folder.



Anyone know how I could fix the problem I'm having with the normals/smoothing groups? It looks like Picano is having a similar problem too judging by the pictures (texturing problems aside). Pikazz, you aren't having problems with that are you? I don't see any problems with your stage model.

EDIT: Some example pictures

What it's supposed to look like:



What it looks like in BrawlBox and in-game:



EDIT AGAIN (sorry): I tried it again with the commas, and it turns out the model is just really really big, which is why I couldn't see it. It still has the smoothing group problems though, providing no advantage to using it for me.
 

picano

Smash Rookie
Joined
Jan 18, 2008
Messages
12
So, you've got a working way to get them into Brawl now? Is it working well enough to share?
It's still quite a mess, not too much improvement since the last script I posted.

http://pastebin.com/63N8KxqQ

Save it to your script folder as a .py file (its just a txt renamed).

Code:
# Windows XP: C:\Program Files\Blender Foundation\Blender\.blender\scripts
# Windows XP (alt): C:\Documents and Settings\USERNAME\Application Data\Blender Foundation\Blender\.blender\scripts
# Windows Vista: C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\.blender\scripts
What this does is...
  1. Multiplies all vertex values by 1000
  2. Removes all 'mtl' references (SZS wouldn't seem to accept them)
  3. Sets Triangulate to default (3 vert faces)
  4. Sets Export Normals to default

I have noticed one oddity --- Blender's exported obj files seem to have their normals inverted in game. To fix this (since I'm not quite sure how via script) just select your object in blender, go into edit mode, select all verts/faces, press 'w' and select invert normals.

Correct Normals in Blender, Inverted in game:


Inverted normals in Blender, correct in game:


And with custom texture test:


Sadly... it doesn't seem to have used my UV map in game; the miscolored gaps you see on Raphael are the blank space between his faces on the UV map.

The model / texture used. (With a few modifications):


As far as I can tell, SZS imports the map correctly (since the export returns the same map). But, I might be messing something up --- I've been away from the hacking scene so long... this whole ordeal was my first time using BrawlBox. (So... if anyone can give me full steps on what should be done from SZS brres export on, it would be appreciated)


Yeah, I'm pretty sure it's supposed to do that. Mine did that also. All you need to do is replace the standard with your diffuse, then uncheck all of the textures in brawlbox preview. After that, what I did was I deleted all of the textures except for the one I replaced, including the env. When I previewed it again in BrawlBox it had a white texture as if I never put one on, but when I tried it in brawl it had my texture on it. Give that a try. If you get an unhandled exception error, then it means you need to delete the files in the Animtxt or whatever it's called folder.
Thanks, I had tried this but didn't know what to do upon error. I'll try this later... its all rather frustrating and I've got art I want to do.



Anyone know how I could fix the problem I'm having with the normals/smoothing groups? It looks like Picano is having a similar problem too judging by the pictures (texturing problems aside).
I've had the problem on/off... seems to work sometimes --- but I've done many different things in attempt to get this working at all... so I've kind of lost track. I'll play with it later when I have time to see how SZS obj format differs from Blender's.
 

Justin712

Smash Rookie
Joined
Jul 15, 2010
Messages
6
Thanks, I had tried this but didn't know what to do upon error. I'll try this later... its all rather frustrating and I've got art I want to do.
Make sure if you're importing it to a stage that you delete the animations in the stage too if you get a "File is in use" error on saving.

I've had the problem on/off... seems to work sometimes --- but I've done many different things in attempt to get this working at all... so I've kind of lost track. I'll play with it later when I have time to see how SZS obj format differs from Blender's.
Thanks. I'll keep trying different things too.
 

Justin712

Smash Rookie
Joined
Jul 15, 2010
Messages
6
Hah hah, I laughed at Planet Bomber in the background.

It seems that the SZS method of importing models is not the way to go, unless you want your models to look crystalline. :x
You wouldn't happen to have a tutorial on doing it the way that takes one thousand years would you?

Is there even another method besides manually and this one?

I also wouldn't be so quick to say this problem isn't fixable. That keyblade from the first page was imported just fine this way right?
 

Wacka Alpaca

Smash Cadet
Joined
Nov 3, 2009
Messages
72
Hey, me again, the tutorial got voted in, and so I am trying to work on the video now.
I have run into a problem however (Yes I did read the FAQ, it didnt help).

When I go to import, it says invalid. I have followed the guide to the letter, multiple times, and still does not work.
I fear it may be that my model is too complex, so I am going to make a cube, and try that.

If anyone out there knows anything else I can try for the "Invalid File" error, I would appreciate it.
Thanks!

EDIT: Tested the low polygon SELF made model, still getting the error. Am I correct in replacing all PERIODS with COMMAS ("." to ",")? and, ALL of them?
Thanks for any replies!
 

picano

Smash Rookie
Joined
Jan 18, 2008
Messages
12
If anyone out there knows anything else I can try for the "Invalid File" error, I would appreciate it.
Thanks!!
In my experience, that was often caused by reference to mtl files. Pretty much just delete any line that contains 'mtl' and you'd be set.

Then again, this was using blender... and the script I provided a few posts above does that.

Also, the replacing '.' with ',' may not actually be necessary... or actually work in all cases. From what I've seen, the first two parts of the vertex coordinates can contain '.' (with up to 3 trailing digits) but the last cannot. --- I ended up just screwing over decimals precision altogether (which, required my models to be scaled up a bit so as not to be overly distorted)
 

Wacka Alpaca

Smash Cadet
Joined
Nov 3, 2009
Messages
72
Hmm, this method seems to have way too many chances for failure.
To make video tutorials knowing that the majority of the people trying it are bound for failure... makes it hard to justify.

I will keep visiting this thread, for updates and details, however, I think I will pass on making the video until a more consistant method is found (And perhaps requiring less programs)

Thanks to everyone who helped me!
 

GameWatching

Smash Ace
Joined
Apr 6, 2010
Messages
839
Location
Tunisia
it's a stage from SSBM >.>


what's the problem ?
why the texture is like that ?
everytime i try to import, it load a single texture !!!

OBJ is really a bad idea ...
since we cannot multi-texture !!!!!!!
 

pikazz

Smash Lord
Joined
Dec 6, 2009
Messages
1,868
Location
Sweden, Umeå (Currently in Seattle)
NNID
pikamaxi
I must say it myself... obj importing is a
**** and *************** in a car
************** with a stick of dymanite ******** in a tower and ****** falcon punch ******** in a microwave!
and I hate to admit it too :urg:
*feeling guilty*
it's a stage from SSBM >.>


what's the problem ?
why the texture is like that ?
everytime i try to import, it load a single texture !!!

OBJ is really a bad idea ...
since we cannot multi-texture !!!!!!!
you can import piece by piece like I did with your dashpepper D:
after one piece is importet, unselect the polygon the piece you imported first and continue the work D:
 

Shadic

Alakadoof?
Joined
Dec 18, 2003
Messages
5,695
Location
Olympia, WA
NNID
Shadoof
This is relatively related:
Does anybody have a copy of Pharrox's .mdl0 Model Extractor? I can't find it anywhere... Or any other program that actually works. I want to extract a Brawl model, edit it as a .obj, and then re-import it.
 

SqLeon

Smash Journeyman
Joined
Nov 10, 2009
Messages
491
Location
The world that never was
I keep getting an invalid material error. Whether I leave the .'s as ,'s or not. The textures from the model are separated into dds files. I tried putting in the textures or leaving them out but it still gives me the same error. Also when I did put in the textures they didn't map correctly. Though I don't have any experience with 3ds max so I may have added them wrong. Can someone assist please?
 

robzdablade

Smash Rookie
Joined
Nov 28, 2009
Messages
1
Errr. is it possible to create ur own OBJ model and import it into brawl using this method? I tried this and all using a box >_> just a cube I made in 3ds. after doing all this the .brres of the file was over 500kbs which seems alil much for just a cube >_>;

Any suggestions on how to create models and resizing them and such? Im a stage builder and I would love to take advantage of this.

If your curious about my stages I built in the past check this link here.
http://forums.kc-mm.com/Gallery/BrawlView.php?ByUserID=4153
I have many stages posted in the KC-MM forums. and would love to pick up some knowledge here.

(sorry about posting a link here >_>)
 

Eternal Yoshi

I've covered ban wars, you know
Joined
Mar 3, 2007
Messages
5,450
Location
Playing different games
NNID
EternalYoshi
3DS FC
3394-4459-7089
That Crystalline look would actually benefit YI Crystal caves and another project I'm starting up.

SO does anyone know why SZS modifier still crashes upon startup?
Reinstalling it didn't work.
 

NasokaKewe

Smash Rookie
Joined
Sep 27, 2010
Messages
7
Location
Florida
NNID
BushyBush
3DS FC
5172-2499-3967
I can't exactly folow the steps in this tut because I have 3ds Max8. Dose it work for 3DSM8 as well?
 

Quanno

Smash Rookie
Joined
Feb 17, 2010
Messages
4
@Nesokakawe:
I'm pretty sure you need 3ds max 2010, maybe 09.

Anyway, zsz modifier is updated. It's much faster, but I can't seem to find the model viewer, so I can't import at all right now...
 

bobjrsenior

Smash Cadet
Joined
Aug 18, 2010
Messages
34
Location
Nobody cares :(
I've gotton to the last step, but i can't get it to open in brawlbox correctly. Does anyone know whats wrong? Mostly it doen't have and things under it in the info tree, but once with a mariokart object it had a polygon and stuff, but still only showed a bone in the preview with an error.
 

xxTerminatorxx

Smash Journeyman
Joined
Dec 18, 2009
Messages
356
Location
in ur basement
Although this has nothing to do with OCJ files, but it still means the same thing. You know Shadow Moses Island as the Brawl stage? Well, I was trying to import Metal Gear Solid the Twin Snakes Shadow Moses Island's (Heliport) model over Brawl Shadow Moses Island. The model I have now comes from a Nintendo Gamecube game.

I have the models and textures, but the model is in a 3DXML file. After importing it over Brawl Shadow Moses Island with BrawlBox, it gets a fantastic little error.
Is there a way I could convert the 3DXML file to a MDL0 file?

Here is a link to the model and the textures:

http://www.3dvia.com/models/B5B4D6ABBD8FA1B3/heliport-meta-hellip-
 
Top Bottom