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

In Progress Mario Model and Target Test Model Importer

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
So this basically a prototype of something much bigger and what I hope one day becomes MeleeBox.


Its takes in PlMrNr.dat or GrTSk.dat and an uncompressed Arc (aka Pac) file. This is definitely not user proof.
Im releasing this to help with the R&D process. Let me know what works and what doesnt work for you guys and what youve done to fix it if you could.
Current known bug:
Transparency

Oh and its windows only for now. Just for the file browser.
Also I ask that you guys dont rehost this program. Its definitely not meant to be released in any form and Id like to focus people testing it through this thread.
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Issues to be fixed
---------------------------
Z buffer
Shadows
Color tint
 
Last edited:

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
Tried to import Smash 3 Mario



Did I do something wrong? I punched in the 0 0 1 1 0 into your program. The hair clipping through the hat is something I might expect but I feel like the textures should've worked.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
As far as the clipping, thats how it looks in brawl box. Youll have to edit the objects there to get it how you want. Which usually entails deleting the yellow eye/ hurt face/ talk objects. And in this case youll have to decide between hair full or the cap. All of those objects do no show up at once in brawl and its up to you to decided what you want to show or not. Until I have a GUI brawlbox is still needed here, though Ill probably make it auto detect and ignore those objects.
As far as the texture, thats the known bug caused by the texture matrix, because I reversed the linked list of textures. Theres a temporary fix you can apply through brawlbox but I just fixed my displaylist editing so it shouldnt be necessary.
Edit: I went ahead and applied the uv fix to the program. Ill change the link later so look for that.
 
Last edited:

Guesmu

Smash Apprentice
Joined
Aug 20, 2015
Messages
76
Can you make a jar file program for us filthy mac users please! This looks awesome.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Final Destination Wii U (Beta) by Edwguard Flows

(I deleted the "static" mdl0 in the second BRES so that the first two mdl0s are "base1" and "base2")

View attachment 117797
Ive tried to run it on that brres as well and I have no idea why it doesnt work. Im still isolating objects and figuring whats wrong.
edit: I found what the issue was. Fixing it is something Ill probably prioritize since this is the second stage to do it. Melee and brawl have different ways of doing bones. Brawl usually does it in a similar way but sometimes bones dont have anything pointing to them, they just point to a parent or sibling. I think this is done for something related to animations. But it means that for the objects that are on those bones, melee has no way of knowing that the bone even exist
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Ive reworked the bone sorting algorithm to take this issue into account. The program is updated now to this error shouldnt occur.

Achilles1515 Achilles1515

Its too dark, but thats probably the color groups and can be edited before importing.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Ive reworked the bone sorting algorithm to take this issue into account. The program is updated now to this error shouldnt occur.

Achilles1515 Achilles1515

Its too dark, but thats probably the color groups and can be edited before importing.
Cool. I deleted the unused bones from the mdl0 and tried again with the last version of the program and it spit out a stage that looked basically identical to that one. But I don't think it's the color group causing the dark problem, because I went to the material flags for the fire/stone undergrowth and changed the material flag to 00000000 (so telling it to not use the color group) and it looked the exact same. I know I was on the correct material struct too, because I changed the first byte of the material flag to 0xff and the undergrowth disappeared.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Cool. I deleted the unused bones from the mdl0 and tried again with the last version of the program and it spit out a stage that looked basically identical to that one. But I don't think it's the color group causing the dark problem, because I went to the material flags for the fire/stone undergrowth and changed the material flag to 00000000 (so telling it to not use the color group) and it looked the exact same. I know I was on the correct material struct too, because I changed the first byte of the material flag to 0xff and the undergrowth disappeared.
Yeah youre right. In this case a texture is responsible. Im not sure what this texture is used for, but it I had to guess its supposed to glow or its supposed to only show on certain parts of the model and not very brightly. I might be crazy but it looks like it corresponds to the whitish areas on that half of the stage. Playing with the texture flag and setting it to 0x37 or 0x32 has better results but its probably best just to set it to 0 (or delete the reference to it before the import).

I have no way of detecting things like this other than to import and see whats off. The overlay system in brawl and melee dont seem to work too similarly.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Tried Hyrule Castle 64 Omega by Edwguard Flows. The little rock structures on the top of the castle, and the window towards the top of the castle did not get imported. Or maybe they got imported but aren't showing for some reason. Didn't look into it, but just noticed they weren't there.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Tried Hyrule Castle 64 Omega by Edwguard Flows. The little rock structures on the top of the castle, and the window towards the top of the castle did not get imported. Or maybe they got imported but aren't showing for some reason. Didn't look into it, but just noticed they weren't there.
Its there. Its the object attached to the fifth bone (bone index 4) at 0xcfd8. I cant tell you why it doesnt show. All of the flags seem right but I guess its a game of changing random values until some happens in your favor.
Edit: Should add that its unlikely I didnt have this problem with the previous import of this stage and Im pretty sure I did something with the first byte of the material flag to get it to work.
Edit: Figured out what the problem is. Now to just get it to be consistent with the current import method.
 
Last edited:

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
So after messing with the program and BrawlBox for an hour or so, even though most of the model is in one bres, It seems it really only imports the mdl0 file if theres multiple of them in the bres.

Here's 64 Battlefield,



the first mdl0 is just the background



and that's exactly what gets imported into the .dat with the converter.



Is this how the program is made to function and if so, is there a way to get multiple mdl0's imported?
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
So after messing with the program and BrawlBox for an hour or so, even though most of the model is in one bres, It seems it really only imports the mdl0 file if theres multiple of them in the bres.

Here's 64 Battlefield,



the first mdl0 is just the background



and that's exactly what gets imported into the .dat with the converter.



Is this how the program is made to function and if so, is there a way to get multiple mdl0's imported?
I forgot I added in the restriction to only read the first two mdl0's of the brres. There are 3 main issues which are preventing me from making this work for all target stages at least. z buffering, shadows, and color groups making things too dark. This restriction is to help identity z buffer issues. I think the battlefield importer only takes in the first mdl0.
 
Last edited:

ninjasmasher03

Smash Rookie
Joined
Jul 28, 2016
Messages
21
Mine fails to even acknowledge the arcs in a file I'm trying to import, saying that zero arcs exist
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Tried doing the Pond and Riverfall in this file and nothing showed up in-game.
Assuming that it imported everything and its not a different bug, there are two possibilities. 1 its a z buffer issue which I need to figure out the best way of getting the two formats compatible, or an issue with the way the program has to guess what flags are needed. I still dont understand all of the flags and what they do, so its kinda hard for the program to know either so it takes a bit of manual hex editing here.
I should take another look at this stage though since I dont need 3ds max anymore.
Mine fails to even acknowledge the arcs in a file I'm trying to import, saying that zero arcs exist
The arcs have to be uncompressed. At least the 1 you want to use and its parents. Just change the compression type to none.
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
I imported it...
...and this happened


Is there something I'm missing?
Youre gonna have to tell me a lot more if you want help.

Ill probably update the program once I stop being lazy and implement the fix for the color groups.
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
While I call this program a converter, thats probably only uses 1/3 of what this program can do. Would you guys rather I focus more on the implementation of something like a melee box or focus more on making a finished converter with a gui. Both are actually pretty close to being done. But opengl is being stubborn.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
While I call this program a converter, thats probably only uses 1/3 of what this program can do. Would you guys rather I focus more on the implementation of something like a melee box or focus more on making a finished converter with a gui. Both are actually pretty close to being done. But opengl is being stubborn.
MeleeBox.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
I could definitely make some of the functions more accessible like a vertex exporter/importer and the melee bone to brawl bones converter. Guess I should really get that cli going. Ill probably fix the colors and I think the z buffer is as good as its getting right now.
 

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
Some imports I've tried:


File: https://puu.sh/riwMd/499b53e8fa.pac
Imported bres #9

File: https://puu.sh/rixkU/7a143996f8.pac
Imported bres #1


File: https://puu.sh/rixCa/d0dead1189.pac (Isle Delfino, textures show up in DTW, no models ingame)
Imported bres #0



File: https://puu.sh/riyic/088d1e23c2.pac
Imported bres #1


File: https://puu.sh/riyFT/ffea39666d.pac
Impoted bres #1


File: https://puu.sh/riz9W/8b06fc2f6b.pac
Imported bres #5


File: https://puu.sh/rizrO/8643f6c7a0.pac
Bres #0
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Some imports I've tried:


File: https://puu.sh/riwMd/499b53e8fa.pac
Imported bres #9

File: https://puu.sh/rixkU/7a143996f8.pac
Imported bres #1


File: https://puu.sh/rixCa/d0dead1189.pac (Isle Delfino, textures show up in DTW, no models ingame)
Imported bres #0



File: https://puu.sh/riyic/088d1e23c2.pac
Imported bres #1


File: https://puu.sh/riyFT/ffea39666d.pac
Impoted bres #1


File: https://puu.sh/riz9W/8b06fc2f6b.pac
Imported bres #5


File: https://puu.sh/rizrO/8643f6c7a0.pac
Bres #0
I think most of the issues with things not showing up is fixed. Colors being too dark will probably be fixed soon. I just need to stop being lazy and implement a function to read 3byte ints.
 

ninjasmasher03

Smash Rookie
Joined
Jul 28, 2016
Messages
21
Youre gonna have to tell me a lot more if you want help.

Ill probably update the program once I stop being lazy and implement the fix for the color groups.
I attempted to import Midgar over, even though all the needed models were in one brres file. It is placed below the untextured platform, has no collisions, has all of the other platforms under the main stage, is completely dark, and has no background.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
There is no feature to add collision. It only adds the first two mdl0s as well so not everything should be expected to import. As farr as the platforms, you might have to go through the objects and set their visibility bone to what ever the singlebind is. Dont change the single bind. theres a 30~40 percent chance you mess up the object if you do and I dont plan to support that. Also try deleting all of the dark textures in the materials and see if that helps.
 

PrettyFalcoJodeye

Smash Rookie
Joined
Sep 12, 2016
Messages
13
Any clue on how to get item spawns to work on these imported stages?

I've trying to get item spawns to work on Target Test-based stages for the past few days and it's been driving me crazy

(Items don't spawn despite items being turned to Very High in vs options)
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Any clue on how to get item spawns to work on these imported stages?

I've trying to get item spawns to work on Target Test-based stages for the past few days and it's been driving me crazy

(Items don't spawn despite items being turned to Very High in vs options)
No. They dont spawn on target stages. Best guess is that the item loading function doesnt load for target stages. You could probably look into these functions and asm hack it, but to my knowledge no one has done so.
 

PrettyFalcoJodeye

Smash Rookie
Joined
Sep 12, 2016
Messages
13
No. They dont spawn on target stages. Best guess is that the item loading function doesnt load for target stages. You could probably look into these functions and asm hack it, but to my knowledge no one has done so.
Yeah, that's what I was afraid of. You think it has to do with Start.dol or is it a flag within the Stage .dat's themselves? I feel like it has something to do with the Dat files, but idk.

Pretty new to melee hacking, but I might try looking into this.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Will this be a feature at some point in MeleeBox?
Yes. Ive just been doing other little things to make the conversion process more precise. I just found another flag I needed for color groups in the mdl0, but i still need to figure out how to get around the overall stage being too dark. Ive finally parsed the color groups so I need to understand how exactly brawl shader equations work so I can adjust the colors to be a bit more true to brawl.
 

ninjasmasher03

Smash Rookie
Joined
Jul 28, 2016
Messages
21
There is no feature to add collision. It only adds the first two mdl0s as well so not everything should be expected to import. As farr as the platforms, you might have to go through the objects and set their visibility bone to what ever the singlebind is. Dont change the single bind. theres a 30~40 percent chance you mess up the object if you do and I dont plan to support that. Also try deleting all of the dark textures in the materials and see if that helps.
All models I need are in one mld0. I don't know how to alter the bones to whatever the "singlebind" is. And apparently those dark textures are needed to make the textures show up.

Here, maybe you can take a look.

https://www.dropbox.com/s/f2n14r2dk6fmu3n/GrTSk.dat?dl=0
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
All models I need are in one mld0. I don't know how to alter the bones to whatever the "singlebind" is. And apparently those dark textures are needed to make the textures show up.

Here, maybe you can take a look.

https://www.dropbox.com/s/f2n14r2dk6fmu3n/GrTSk.dat?dl=0
This kinda exactly how that mdl0 looks in brawlbox except darker. There are things you have to edit and play with to make it lighter, but it did what it was supposed to do. There is no background in that mdl0. And there are no collisions for the stage. There also arent any platforms. We might be using different pac files. Which one did you use.
 

ninjasmasher03

Smash Rookie
Joined
Jul 28, 2016
Messages
21
This kinda exactly how that mdl0 looks in brawlbox except darker. There are things you have to edit and play with to make it lighter, but it did what it was supposed to do. There is no background in that mdl0. And there are no collisions for the stage. There also arent any platforms. We might be using different pac files. Which one did you use.
STGPALUTNA with platforms. also has a STGCUSTOM## and a STGDXPSTADIUM pac files as well, both standard and omega variants.
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Found a solution to the color groups making stages a shade or two darker than they are in melee. Only thing left is to find a solution to shadows.

STGPALUTNA with platforms. also has a STGCUSTOM## and a STGDXPSTADIUM pac files as well, both standard and omega variants.
I dont see the platforms in the pac files for those. Other than the texture flags needing to be changed it looks like the program did what it was supposed to do.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Turns out fixing the colors is far more complicated than I thought. Equations are getting way too complicated. Though theres about 4 color options right now.
 
Top Bottom