Home Gallery Resources The Team Rules chat Login Register
Pages: [1]
Author Topic: how to make polygons always show, even if they don't always show  (Read 2941 times)
0 Members and 1 Guest are viewing this topic.
Snoopy
Lol Kitten
*********
Offline Offline

Posts: 762


  • Awards Super Saiyan Topic Renowned Hacker Star Hacker Active Contributor

  • View Profile Awards
    « on: August 23, 2011, 08:35:26 PM »


    so i'm doing this tutorial because there aren't many people that know how to do this (i could be wrong), but it's always a good reference.  this will show you how to make polygons always show, even if they usually don't or only occasionally show (extra faces a character has, Olimar's eyes, Kirby's extra body, etc.).

    first off, there is a little bit of hexing involved, but it's really easy to do. 

    and it really only involves moving bone indexes, so here’s how you hex bones.
    yeah, i copied and pasted from my other guide, but with some edits.  lazy, yes, but it'd be the same info if i re-typed it
    extract the model you want to edit from the FitCharacter0X.pac/.pcs, and open the model in a hex editor.  i use HxD, just because it's free.  if you need to, open the model in BrawlBox and find the bone you want to re-index, check it's model offset, convert it to hex (decimal to hex converter, the Windows calculator works just fine), and go to the offset in the hex editor.  once you find it, this is how the bone will look.



    Key: black = the whole bone, blue = beginning of bone, red = bone index number, yellow = NodeId number, purple = flags, green = bone hierarchy, the very left hand numbers outside the box = offset number (if it ends on a number besides 0, just go that many bytes in).

    For those of you who care, here's a list of all the bone properties. i listed the more important ones, but here's the rest of them
    Here's every byte set that's used for bones (4 bytes each):
     
    0x00 - Header Length (Usually 00D0)
    0x04 - MDL0 Offset
    0x08 - String Offset
    0x0C - Bone Index
    0x10 - Node ID
    0x14 - Flags
    0x18 - Pad 1
    0x1C - Pad 2
    0x20 - Scale X
    0x24 - Scale Y
    0x28 - Scale Z
    0x2C - Rotation X
    0x30 - Rotation Y
    0x34 - Rotation Z
    0x38 - Translation X
    0x3C - Translation Y
    0x40 - Translation Z
    0x44 - Box Min. X
    0x48 - Box Min. Y
    0x4C - Box Min. Z
    0x50 - Box Max. X
    0x54 - Box Max. Y
    0x58 - Box Max. Z
    0x5C - Parent Offset
    0x60 - First Child Offset
    0x64 - Next Offset
    0x68 - Previous Offset
    0x6C - Bone Strings/Properties Offset
    0x70 - FrameMatrix Set 1 Float 1
    0x74 - FrameMatrix Set 2 Float 1
    0x78 - FrameMatrix Set 3 Float 1
    0x7C - FrameMatrix Set 4 Float 1
    0x80 - FrameMatrix Set 1 Float 2
    0x84 - FrameMatrix Set 2 Float 2
    0x88 - FrameMatrix Set 3 Float 2
    0x8C - FrameMatrix Set 4 Float 2
    0x90 - FrameMatrix Set 1 Float 3
    0x94 - FrameMatrix Set 2 Float 3
    0x98 - FrameMatrix Set 3 Float 3
    0x9C - FrameMatrix Set 4 Float 3
    0xA0 - InverseBindMatrix Set 1 Float 1
    0xA4 - InverseBindMatrix Set 2 Float 1
    0xA8 - InverseBindMatrix Set 3 Float 1
    0xAC - InverseBindMatrix Set 4 Float 1
    0xB0 - InverseBindMatrix Set 1 Float 2
    0xB4 - InverseBindMatrix Set 2 Float 2
    0xB8 - InverseBindMatrix Set 3 Float 2
    0xBC - InverseBindMatrix Set 4 Float 2
    0xC0 - InverseBindMatrix Set 1 Float 3
    0xC4 - InverseBindMatrix Set 2 Float 3
    0xC8 - InverseBindMatrix Set 3 Float 3
    0xCC - InverseBindMatrix Set 4 Float 3
     
    just don't ask me what they all do.


    Basically, Brawl bones are always 13 rows long, and the bone index number is always at the end of the first row.  and in case you don’t know anything about hexadecimal coding, it’s rather simple to understand how it works.  Decimal has 0-9, while hex has 0-9 and A-F, adding up to 16 numbers before repeating.  So in decimal, you may have 11, but in hex you would have B.

    So to change the index number (in red), all you have to do is find out what index number you want it to have, and change the last bit (in the pic, it would be the 02) to what you want it to be (in hex numbers).  Simple, right?

    And that’s the basics of bone hexing.



    and here's a few examples of why this is needed.



    this first pic is when you just replace the models with the fighters, no hexing.  the Mario Bros are missing their hats, only Lyn's legs and sword appear, and Tails' tails appear.  they all have a model bone over the EyeYellowM of the replaced characters.



    this second pic is the after shot, when the Model bones are moved.  old pics are old, but still applicable.  with all 3 of them, if they all had a smash ball, they'd all look like the second pic. 

    since that's an older example, lets go over a better one now.

    say you want Sonic to have one of his other faces always showing, and not switch between the others.  all you would have to do is change the bone index of the face to a bone that's after the TransN, and it will always show.  you'll still have to remove the other faces, though, either through Materials1 editing (changing the Type to 3, making it invisible in game, but not BrawlBox) or through shrinking the other faces (vertex editing, or hex editing (finding the polygon you want to shrink, and filling everything after the header with 00 bytes))

    as a note, if a bone isn't directly attached to the model, then it can be moved wherever you want it to be.  to see which bones are attached to the model, just preview your model in BrawlBox, choose the bone you want to move, and then increase the translations of the bone.  you will quickly see if it is or isn't based on if anything on the model moves besides the little lines that represent the bone, that's supposed to move when you do this.   Examples of unattached bones would be the BodyM, ThrowN, and the HaveN bones.  the reason i bring this up is some bones don't want to be re-indexed, especially if they're directly connected to the model, like an arm or leg bone.  it may cause some animation issues in game.

    And another note, bones can share the same index number.  Just make sure the bone isn’t attached to the model first.  and from what i can tell, it's okay if a bunch of bones share the same index, as in having 7 bones all with the index that the TransN has.

    easy, right?  just one simple change.  as one last note/warning, sometimes bones won't like where you move them.  you may experience some odd things, like the polygons you want always showing could float way above the character, or maybe the entire character is in the ground for certain animations.  if that's the case, just re-index the bone you moved to a different index.  it may take a few tries, but it will eventually work.

    and as always, if you have any questions or need help, just ask and i'll do what i can to help.
    Logged


    SuperBarrio
    Expert Kitten
    ****
    Offline Offline

    Posts: 69


    It's a Me, Barrio!

  • Awards Boygos Certified: Pokemon Master

  • View Profile Awards
    « Reply #1 on: September 05, 2011, 02:17:02 PM »


    I hate to sound like a noob - But this could do with being less wall of textey. I'm sure its all correct, but I looked at it and jsut went "wha.."

     For example, you say to extract the mdel, presumably this is the MDL0. why not tell us how and where? Wink

     And "Find the bone you want to hide"
    While I'm sure everyone else knows what you mean, as a complete amature, I can unashamably say I have no idea which bone corrasponds to which polygon.
     (specifically in my case, I am looking to make Kirby's Polygon 8 and 9 permanant, but I got as looikng at the bones and not knowing which was which.)

     I'm sure if I didnt have potatoes for brains this would be very helpful though, you just seem to assume a lot Tongue (A lot for a tutorial..)
    Logged

    Vertexing my way throguh Nintendo's B list - One failure at a time.

    Snoopy
    Lol Kitten
    *********
    Offline Offline

    Posts: 762


  • Awards Super Saiyan Topic Renowned Hacker Star Hacker Active Contributor

  • View Profile Awards
    « Reply #2 on: September 05, 2011, 11:21:12 PM »


    trust me, this is nothing compared to my other one.  it could probably use some pre info though...

    anyways, to extract the model, all you have to do is open the FitCharacter0X.pac/.pcs in BrawlBox, expand the ModelData[0] until you get to the .mdl0, then right click it and hit export.  it doesn't matter where you save it to, as long as you can find it again.

    as for the 'finding the bone to hide', the polygons that disappear usually have a Model bone that Brawl decides when to show (an easy way to see which bones are Model bones is to look at the last letter of the bone name, if it's an M, then it's a model bone).  example, the EyeYellowM bone for most characters (it's when the character's eyes go yellow).  it's usually the second bone they have (bone index 1).  it only shows when the character has a smash ball.  to make it always show, you just have to change the bone index to something else, like index 2.  now it will always show.

    for your case, that's actually a good question.  it looks like Kirby has 2 sets of yellow eyes.  so it's going to be either EyeYellowBigM or EyeYellowM.  so to find out which bone it is, you'll have to look at the Polygon data in BrawlBox, but not in the model viewer (this is probably something i didn't mention how to check).  it's going to be different depending on which BrawlBox you're using, but expand the FitKirby00.mdl0, and go to Polygons (BrawlBox V 0.63) / Objects (BrawlBox V 0.64).  the NodeID will usually show what bone the polygon is attached to (Kirby's are all -1 for some reason).  but in BrawlBox V 0.64, it also shows what Materials are attached to the polygon, which can also say which bone it's attached to.  or at least i'm assuming it is, because it's saying that Kirby's Poly 8 and 9 are attached to the regular EyeYellowM, thus you need to re-index Kirby's EyeYellowM bone to not be index 4 (do 5, that way it's the same as the TransN, and won't disappear).

    sorry for the long explanation, this probably should have been in the tutorial already.  my bad for just copy pasting it from my other one, which is why it seems like i assume everyone already knows what i'm talking about.
    Logged


    Naruto200Man
    Badace Kitten
    *****
    Offline Offline

    Posts: 5100

    Guy: Go fourth and Brawl! Lee: Yes Guy Sensei!

  • Awards Hot Topic Heart Container Dedicated Hacker KCMM Veteran

  • View Profile WWW Awards
    « Reply #3 on: December 06, 2011, 02:36:10 PM »


    Can I use this process to say, make a polygon show when I want it to, and have it not show when I don't want it to through psa?
    Logged


    Snoopy
    Lol Kitten
    *********
    Offline Offline

    Posts: 762


  • Awards Super Saiyan Topic Renowned Hacker Star Hacker Active Contributor

  • View Profile Awards
    « Reply #4 on: December 07, 2011, 10:55:30 AM »


    i would assume so, yes.  i think as long as the polygon is single binded to one bone, you can do that, since that's how a lot of the disappearing and reappearing polygons work.  and single binded just means that the polygon is only rigged to a single bone.  i'm not entirely sure how the PSA portion works though, but i assume you tell it which bone the polygon is attached to, and it will make it come and go.
    Logged


    Protoman.EXE
    Extreme Kitten
    *******
    Offline Offline

    Posts: 427


    Netbattler pro.

  • Awards Hot Topic Shadow the Pinhog

  • View Profile Awards
    « Reply #5 on: December 07, 2011, 02:15:32 PM »


    I dont think this tutorial is nessecary anymore, seeing as how we can change the how a Object appears and Disappears using a Visibility Bone in BrawlBox.
    Logged

    Sig by Segtendo. Epic

    Naruto200Man
    Badace Kitten
    *****
    Offline Offline

    Posts: 5100

    Guy: Go fourth and Brawl! Lee: Yes Guy Sensei!

  • Awards Hot Topic Heart Container Dedicated Hacker KCMM Veteran

  • View Profile WWW Awards
    « Reply #6 on: December 07, 2011, 05:27:24 PM »


    i would assume so, yes.  i think as long as the polygon is single binded to one bone, you can do that, since that's how a lot of the disappearing and reappearing polygons work.  and single binded just means that the polygon is only rigged to a single bone.  i'm not entirely sure how the PSA portion works though, but i assume you tell it which bone the polygon is attached to, and it will make it come and go.

    Yeah I'm using single-binding on Kunai for Hinata :l in fact....oddly that was my thought on rigging the kunai to zelda's armor n bones I didn't need for Hinata's rig. (yay for making useless stuff useful Cheesy ) And that it would keep the hack wifi friendly, two birds with one stone. *shrug*

    I just need to figure out the psa part of it before I think of importing/psa-ing it.
    That and finish the rigging...*sigh*

    At least even if I don't have the kunai in V1 of the psa-ing I can just scale the bones for the kunai down when they're not needed ^+^; *is glad you mentioned that bit*
    Logged


    Pages: [1]
    Print
    Jump to: