Kitty Corp Meow Mix Forums

Help & Tutorials => General Tutorials => Topic started by: DrPanda on April 27, 2011, 11:10:46 AM



Title: Re-attaching Polygons
Post by: DrPanda on April 27, 2011, 11:10:46 AM
I've been meaning to make this tutorial for a while now... >_>

First off, this tutorial is incomplete.
At the moment, You can use this method to re-attach polygons that are only wieghted to a single bone.
I have yet to fully figure out how to re-attach multi-bone polygons but I am working on it, along with some other applications this could be used for...
I will update this when I have figured out how to flawlessly re-attach multi-bone polygons.

If you think this will be too complicated for you (or you are lazy, like me) ForOhFor Error has created a program that can do this for you automatically.
You can check it out Here (http://forums.kc-mm.com/index.php?topic=23996.0)

You will need:
> Brawlbox
> A hex editing program
> FitCharacter##.pac file


For this example I will be attaching Shiek's Dagger to her head... For lols :P

To start off you will need to open up your character in brawlbox and export the model.
Once you have done that, expand the model data tabs until you find the polygon you wish to re-attach.
Take note of the Mdl0 offset.

(http://img153.imageshack.us/img153/707/reattach1.png) (http://img153.imageshack.us/i/reattach1.png/)

Next, find the bone you wish to attach it to, and take note of the NodeID.

(http://img863.imageshack.us/img863/4104/reattach2.png) (http://img863.imageshack.us/i/reattach2.png/)

Head on over to your hex editor and open up your Mdl0.
Scroll down until you find the polygon offset you'll be changing.

Now, I'm using HxD as my hex editor so I can simply click where it says "offset(h)" to make the offset appear as it does in brawlbox. I don't know if other Hex editor's do the same, but if they don't, you will have to convert the polygon offset to hex before trying to find it.

(http://img52.imageshack.us/img52/3306/reattach3.png) (http://img52.imageshack.us/i/reattach3.png/)

So now that we have arrived at our destination, what do we do?
Well, by looking at the NodeId the polygon is currently attached to in brawlbox, we can determine that it is this value is what needs changing.

(http://img219.imageshack.us/img219/6440/reattach4.png) (http://img219.imageshack.us/i/reattach4.png/)

Now all that is left to do is punch in the Bone NodeId you found earlier (remember to convert it to hex first!) and save your work.

(http://img854.imageshack.us/img854/2786/reattach5.png) (http://img854.imageshack.us/i/reattach5.png/)

Finally, replace the model in brawlbox and voilá.

(http://img269.imageshack.us/img269/5623/reattach6.png) (http://img269.imageshack.us/i/reattach6.png/)


Notes:
~ Sometimes, the bone you are re-attaching the polygon to has a different default rotation, so you will have to vertex it to be the right way round.

~ Because you have altered a polygon, you can no longer convert the ModelData to DAE.
If you need to do vertex editing, my advice is to either export the vertices first then re-attach the polygon, or vertex that part last to avoid patching.

Appearently, I'm wrong :laugh:
Check out Beyond's post below vvv

~ This can infact be done with multi-bone polygons. If you are lucky, you might be able to re-attach a multi-bone polygon with this method, but I have only successfully done it thrice.

Examples:
Here are a couple of examples of where this has been used-
Gallade (http://forums.kc-mm.com/Gallery/BrawlView.php?Number=16678) by Starwaffle
Ulquiorra (http://forums.kc-mm.com/Gallery/BrawlView.php?Number=16992) by Jokekid
Right-handed Link (http://www.mediafire.com/?78enj5ujj7ne35f) by Moi


If anyone wishes to expand on this, please, be my guest ;D
Alot of people should be able to figure out the ins-and-outs of this pretty easily, so any additional info would be greatly appreciated.


Title: Re: Re-attaching Polygons
Post by: Beyond on April 27, 2011, 11:38:17 AM
Good tutorial but one thing. Uhh...

When I did this for Zero I was still able to convert it to a .dae and continue editing it just fine. Altering polygon data is fine as long as the structure of the header is in tact, which is why .mdl0s with hexed out polygons dont work with a.i.s since the polygon header is completely replaced with zeros.


Title: Re: Re-attaching Polygons
Post by: Psycho Philia on April 27, 2011, 11:40:25 AM
What you say Beyond interests me a lot, maybe in fact I would be able to vertex what I want to move to an other bone after the moving in fact.

Anyway, DrPirako: Good tutorial, that is very useful, one thing though, the mdl0 offset, you use it like this? You don't even convert the number in hex by using calculator?


Title: Re: Re-attaching Polygons
Post by: DrPanda on April 27, 2011, 11:46:38 AM
Good tutorial but one thing. Uhh...

When I did this for Zero I was still able to convert it to a .dae and continue editing it just fine. Altering polygon data is fine as long as the structure of the header is in tact, which is why .mdl0s with hexed out polygons dont work with a.i.s since the polygon header is completely replaced with zeros.
That's interesting, when I made right-handed Link it wouldn't let me convert it at all...
Eh, Maybe I just overlooked something :P

Good tutorial, that is very useful, one thing though, the mdl0 offset, you use it like this? You don't even convert the number in hex by using calculator?
Don't quite get what your asking but I'll give it a shot at answering...
I personally do it this way because it is easier and quicker, but Converting the numbers into hex is essential to get it to work ^-^


Title: Re: Re-attaching Polygons
Post by: Psycho Philia on April 27, 2011, 11:55:36 AM
I understand much more what you were saying about the mdl0 offset. When you use hxd, you make the numbers appear like it does in brawlbox (in decimal), this is why you don't convert the mdl0 offset in hexadecimal, I didn't knew it was possible to do something like this.

Last question, and after that I will leave you alone (it's probably about time :laugh:), can you know in advance if a polygon is attached to multiple bones?


Title: Re: Re-attaching Polygons
Post by: DrPanda on April 27, 2011, 12:03:30 PM
Last question, and after that I will leave you alone (it's probably about time :laugh:), can you know in advance if a polygon is attached to multiple polygons?

Yes you can.
In brawlbox, the NodeId for the Polygon will be displayed as -1


(http://img849.imageshack.us/img849/515/wavysnail.png) (http://forums.kc-mm.com/index.php?topic=24174.0)


Title: Re: Re-attaching Polygons
Post by: Psycho Philia on April 27, 2011, 12:05:34 PM
Excuse me I said multiple polygons, I meant attached to multiple bones. Anyway, thank you for the answer, I have nothing more to ask you, thank you very much!


Title: Re: Re-attaching Polygons
Post by: DAO_Ibuki on May 04, 2011, 01:26:59 AM
I'm just here to thank you for your great guide so... Thank you , Thank you , Thank you , Thank you  :af:
now, thanks to the re-attching polygonos I could do to cirno
(http://img7.imageshack.us/img7/6740/al10122522011binout.jpg)

Thank you , Thank you , Thank you You are the best  :kdance:  :kdance:  :kdance:


Title: Re: Re-attaching Polygons
Post by: ShadowSnake on May 04, 2011, 07:40:25 AM
Nice guide here Doc, im sure this will be useful. i wonder if i can make sheik hold her dagger... :>.>:

isnt this also how you make jiggs hats as well?


Title: Re: Re-attaching Polygons
Post by: DrPanda on May 04, 2011, 02:53:14 PM
Nice guide here Doc, im sure this will be useful. i wonder if i can make sheik hold her dagger... :>.>:

isnt this also how you make jiggs hats as well?
Indeed you can... I was actually going to do that as the example, but from just re-attaching it, her Dagger stabs through her hand :laugh:

And I really have no idea how the Jigger hats work :P


Title: Re: Re-attaching Polygons
Post by: ForOhFor Error on May 05, 2011, 01:25:42 PM
I made a program to do this automatically:
http://forums.kc-mm.com/index.php?topic=23996.0


Title: Re: Re-attaching Polygons
Post by: DrPanda on May 05, 2011, 04:35:59 PM
I made a program to do this automatically:
[url]http://forums.kc-mm.com/index.php?topic=23996.0[/url]

Added that link to the Op ;)


Title: Re: Re-attaching Polygons
Post by: ForOhFor Error on May 05, 2011, 06:12:18 PM
Really isn't that much of a program. A lot of the coding I went through involved applying the correct logic to the wrong variable.

XD


Title: Re: Re-attaching Polygons
Post by: Mansta8 on May 05, 2011, 08:29:45 PM
I'm working on attaching Mario's hat to his back for my Tron Legacy Mario.
Man, this is awesome!
EDIT: Damn, looks like I have to vertex the hat to put it on it's side.
Does the bone tree editor work for attaching added bones to other ones? If so I might be able to attach the hat to an added bone connected to his BustN bone and turn it to it's side. (lol using multiple programs just to do one thing.)
EDIT 2: lulz
(http://i.imgur.com/ldgVj.png)
 :af:


Title: Re: Re-attaching Polygons
Post by: BlueBrain on May 08, 2011, 10:38:45 AM
somebody should make base models like:

mirrored sword fighters (link is already done) and sheik with dagger in hand (two versions) ^^