Brawlbox Resources & History

Started by BlackJax96, December 14, 2010, 03:39:11 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Sweet. I can get models from sketchup to BB now. Proof:
Sorry but you are not allowed to view spoiler contents.

FC: 2191-7379-6272


September 10, 2011, 02:18:48 AM #3797 Last Edit: September 10, 2011, 03:57:53 AM by BlackJax96
Quote from: ForOhFor Error on September 10, 2011, 01:15:32 AM
Sweet. I can get models from sketchup to BB now. Proof:
Sorry but you are not allowed to view spoiler contents.


Dude, Megas is awesome. :srs:

Quote from: L-a-t-e-r-a-l-u-s on September 10, 2011, 01:23:45 AM
Chicks dig giant robots.

We dig giant robots. :vyse:

__________________________________________________

RTB, here's an explanation of how the rig works:

Each object has a vertex node with vertices. Each vertex has an influence, which is either a "hidden" influence or a "bone" influence.

Each bone and hidden influence has a node id. Bone and hidden influences are added to an array called "NodeCache" in the location specified by their nodeId. The NodeCache's size is specified by the nodeCount before the start of the node table at the beginning of the MDL0 (although sometimes it is incorrect for models that aren't v9, so it's safer to correct its size by the highest node id of one of the bones).

Hidden influences have weights, and each weight references its own bone so that the vertices move how you want them to.
Bone influences literally make the vertex follow it with a weight of 1.0.

All of the influences, hidden and bone, are stored in the NodeMix.

Type 5 nodes are for bone influences and are 5 bytes long:
1 byte is 0x05 (the type),
2 bytes (an unsigned short) is the node id, and
2 bytes (an unsigned short) is the bone index.

Type 3 nodes are for hidden influences. This type has entries, for each weight it has.
A type 3 node is 4 bytes long, and each entry it has is 6 bytes long.

Type 3 Node:
1 byte is 0x03 (the type),
2 bytes (an unsigned short) is the influence's node id, and
1 byte is the weight (or type 3 node entry) count.

Type 3 Node Entry:
2 bytes (an unsigned short) is the weight's bone's node id, and
4 bytes (a float) is the weight.

0x01 is the terminating byte of NodeMix.

As you read these, you add the hidden or bone influence to the NodeCache in the location specified by the node id.
Once you finish, the NodeCache should be fully populated with hidden or bone influences. We will use this array later to assign the influences to the vertices.

Now when you read the primitives of each object, 0x20 holds the node id that the facepoints will get the influence from.

A 0x20 Matrix is 5 bytes long and is read like this:
1 byte: 0x20
2 bytes (unsigned short): node id
2 bytes (unsigned short): index multiplied by 12 (0x0C)

0x20 matrices can only go up to 9 in count, and then afterwards follows all the facepoints that use one of the 9 node ids in the list above.
When you read the vertex id from the facepoint, you create a new vertex by getting its value from the vertex node assigned to that object at the location of the index and then adding it to a new list of vertices, and then give it an influence by reading the pos/norm matrix id.

The pos/norm matrix id is always the first byte of a facepoint if the object is weighted, and it is an index in the 0x20 matrices that is multiplied by 3.

So, to match up a vertex to its influence, you divide the facepoint's pos/norm matrix id by 3 and then match it with one of the 0x20 matrices' indexes divided by 12. You get the node id of the matched matrix and then retrieve the influence from the NodeCache from the location of the node id.

Sometimes facepoints are repeated (like in triangles) so you need to check the new list of vertices if the vertex exists already, and then edit the index to match that vertex instead. This doesn't matter if you're writing the model though.

That should be it, I think.

Quote from: ForOhFor Error on September 10, 2011, 01:15:32 AM
Sweet. I can get models from sketchup to BB now. Proof:
Sorry but you are not allowed to view spoiler contents.

o.o... me... want.... megas.... now...

i do see some textures missing tho >.>'
https://privateladyescorts.com - Free Local Dating - No Selfie - Anonymous Casual Dating -   Video Chat Private Lady

Quote from: DSX8 on September 10, 2011, 03:54:20 AM
o.o... me... want.... megas.... now...

i do see some textures missing tho >.>'
That's cause they were missing on the source model.

FC: 2191-7379-6272

September 10, 2011, 06:36:46 PM #3800 Last Edit: September 10, 2011, 06:37:48 PM by TokoyamiTheDark
I think I've figured out the problem of my BrawlBox ; for some reason, it doesn't accept any models that aren't from Brawl. I downloaded and tried various DAEs from Wii games, like Super Mario Galaxy or Mario Kart Wii, still NOTHING in the Model viewer. I then took a Gerudo Guard and a Dodongo from the N64 Zelda games, nothing, but I was able to extract something called a "Guitar of Waves" that is actually FISH BONES. :srs: I was like 'LOL WTF!? They DARE call this an instrument???' but maybe I'm gonna use those fish bones over the Beam Sword, who knows where they came from...  :af:
I lost EVERYTHING from my DropBox storage due to the server crashing, so I no longer have my hacks on the Vault... Sorry! :(

those fish bones are actually the guitar Zora link used instead of an ocarina
https://secrelocal.com - Chat With Girls - No Verify - Anonymous Casual Dating -   Secret Live Dating

Quote from: ForOhFor Error on September 10, 2011, 03:33:40 PM
That's cause they were missing on the source model.
oh i see.. so in other words u have to make them from scratch?
https://privateladyescorts.com - Free Local Dating - No Selfie - Anonymous Casual Dating -   Video Chat Private Lady

Two things I want to ask after watching the tutorial.

1: Could I for example rig ZSS(The BRAWL model, not from the games) to Links Bones and import that model over link?
2: If I did that couldn't I just take ZSS's normal shaders and port that over to the model by replacing the new one with the exported one?

Quote from: NaruZeldaMaster on September 10, 2011, 09:42:22 PM
Two things I want to ask after watching the tutorial.

1: Could I for example rig ZSS(The BRAWL model, not from the games) to Links Bones and import that model over link?
2: If I did that couldn't I just take ZSS's normal shaders and port that over to the model by replacing the new one with the exported one?

1. Already answered, and it's pointless anyway
2. Not really

I'm on my cousin's PC, and even with the newest BrawlBox, I can't see anything :( I don't get it... it isn't the Windows versions that affect BrawlBox, but something I don't know... I mean, even textures from other Wii games are unseeable in my Brawlbox...
I lost EVERYTHING from my DropBox storage due to the server crashing, so I no longer have my hacks on the Vault... Sorry! :(

September 10, 2011, 10:18:00 PM #3806 Last Edit: September 10, 2011, 10:25:03 PM by Segtendoman.EXE
IDK what you guys are having troubles with.

I can see imported DAE's just fine... (besides them laying on their faces)

(Well, except for DAEs I converted from other model formats. They have texture problems in BrawlBox).
[white]: SW-2632-7270-6724[/white]


Quote from: Segtendoman.EXE on September 10, 2011, 10:18:00 PM
IDK what you guys are having troubles with.

I can see imported DAE's just fine...

(Well, except for DAEs I converted from other models. They have texture problems in BrawlBox).

Then, could you check these? http://www.mediafire.com/?z9d6ygilm1hat4d
They are the ones I worked so hard to make, but ended wating my time since I cannot view them in BrawlBox... If you can see them, could you please export them as MDL0s and sent them to me via PM? And I was wondeing...Must I download every BrawlBox plug-ins to see everything correctly?
I lost EVERYTHING from my DropBox storage due to the server crashing, so I no longer have my hacks on the Vault... Sorry! :(

Quote from: TokoyamiTheDark on September 10, 2011, 10:23:29 PM
Then, could you check these? http://www.mediafire.com/?z9d6ygilm1hat4d
They are the ones I worked so hard to make, but ended wating my time since I cannot view them in BrawlBox... If you can see them, could you please export them as MDL0s and sent them to me via PM? And I was wondeing...Must I download every BrawlBox plug-ins to see everything correctly?
brawlbox has no plug-ins at all... and if u export that .dae as a MDL0, u wont be able to see anything in it yet, or it will crash on u!!
https://privateladyescorts.com - Free Local Dating - No Selfie - Anonymous Casual Dating -   Video Chat Private Lady

I told you guys importing new models wouldn't be easy (unless you know what you're doing).
It's still just as noob-proof as vertex hacking :vyse: