Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (OptimusPrime, AndrewAMD), 14,580 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Attaching large clothing items. #285731
08/19/09 19:40
08/19/09 19:40
Joined: Jan 2009
Posts: 20
T
Tuah Offline OP
Newbie
Tuah  Offline OP
Newbie
T

Joined: Jan 2009
Posts: 20
'allo, I'm rather unfamiliar with scripting and such, but I hope to learn how to attach clothing items to a character. I have my character fully rigged in Blender (ready to transfer to MED), and I also have a model of clothing based from the character model.

It's a jacket! And since he's currently nude, he probably needs to wear it. I've seen how to equip simple one-part items such as swords or shields, but this jacket is different since it's got to be attached to the chest, shoulders, arms, and forearms.

What methods are there to attach these different parts of the clothing to the different parts of the body?

Thanks for reading!

Re: Attaching large clothing items. [Re: Tuah] #285740
08/19/09 20:17
08/19/09 20:17
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Two ways come to my mind:
1. animate the cloth exactly like the model, placed in the right position. In the engine you simply set it to the same position and angle and animation frame of the character.
2. If you use bone animation in the engine, then you name the cloth bones like that of the related bones of the character. In the engine you set the bones with the same names of the bones of the character at the same position and angle.

Re: Attaching large clothing items. [Re: Pappenheimer] #285743
08/19/09 20:21
08/19/09 20:21
Joined: Jan 2009
Posts: 20
T
Tuah Offline OP
Newbie
Tuah  Offline OP
Newbie
T

Joined: Jan 2009
Posts: 20
I plan to use bone animation within the engine, so number 2 seems like the best solution.

So I should probably place the character in root position, as well as my clothing items, then the clothing Master bone should be attached to the character's Master bone?
And when I animate the character, the clothing is animated as well?

Re: Attaching large clothing items. [Re: Tuah] #285744
08/19/09 20:30
08/19/09 20:30
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
The bone version is just an idea, I have no experience with bones so far.
My suggestion was that each bone of the cloth is set to the bone with the same name of the character, not only the master bone.

Re: Attaching large clothing items. [Re: Pappenheimer] #285746
08/19/09 20:37
08/19/09 20:37
Joined: Jan 2009
Posts: 20
T
Tuah Offline OP
Newbie
Tuah  Offline OP
Newbie
T

Joined: Jan 2009
Posts: 20
Hmmm... I'll look around and see if I can find some functions that can do it!


EDIT: Observing David Lancaster's tutorial with an attached weapon, I'll have to reposition the bones to the character's bones each time.

So I'll need to replace the vector things with bone-related things... This might not turn out to be as difficult as I thought. But I'm still a noob, so it might not work. xD

Code:
ACTION attach_weapon {
my.passable = on;
proc_late();
WHILE (you != null) {
vec_for_vertex(temp.x,you,1175); //hand palm base
vec_for_vertex(temp2.x,you,1240); //hand palm tip
vec_set(my.x,temp.x);
vec_diff(temp.x,temp2.x,temp.x);
vec_to_angle(temp.pan,temp.x);
vec_set(my.pan,temp.pan);
wait(1);



Last edited by Tuah; 08/19/09 22:06.

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1