Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, degenerate_762, ozgur), 1,311 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
bone to bone conection (two models) #309674
02/10/10 16:44
02/10/10 16:44
Joined: Jun 2008
Posts: 402
Germany
S
sebbi91 Offline OP
Senior Member
sebbi91  Offline OP
Senior Member
S

Joined: Jun 2008
Posts: 402
Germany
hi

I have two different Models with much bones and i want to connect this both models with a script!

I want to connect the bone nr. 1 from my human-model with bone nr 1 from my hair-model.

And the same thing with bone 2 and 3!

Is there any way to make this possible
I tried this way :
Quote:



human_ent_p1= ent_create("player1.mdl",NULL,NULL);
human_ent_p1.pan=180;
human_ent_p1.scale_x=0.05;
human_ent_p1.scale_y=0.05;
human_ent_p1.scale_z=0.05;
human_ent_p1.z=50;
human_ent_p1.material = human_material;
set(human_ent_p1,SHADOW||OVERLAY);


//Define the bone points

//PLAYER-BONES
vec_for_bone (Player_Neck_pos_p1,human_ent_p1,"Neck_bone");
vec_for_bone (Player_Head_center_pos_p1,human_ent_p1,"Head_center_bone");
vec_for_bone (Player_Eye_center_pos_p1,human_ent_p1,"Eye_center_bone");



//Create the other parts of the human


hair_p1= ent_create("hair_short.mdl",NULL,NULL);
hair_p1.scale_x=0.05;
hair_p1.scale_y=0.05;
hair_p1.scale_z=0.05;


if(hair_p1==1)
{
//HAIR_BONES
vec_for_bone (Hair_Neck_pos_p1,hair_p1,"Neck_bone"); // Hair_Neck_bone_p1 = ent_create ("barrel.mdl",temp,NULL);
vec_for_bone (Hair_Head_center_pos_p1,hair_p1,"Head_center_bone"); // Hair_Head_center_bone_p1 = ent_create ("barrel.mdl",temp,NULL);
vec_for_bone (Hair_Eye_center_pos_p1,hair_p1,"Eye_center_bone"); // Hair_Eye_center_bone_p1 = ent_create ("barrel.mdl",temp,NULL);


}

...
while(1)
{
if(hair_p1)
{
vec_for_bone(hair_p1.x,human_ent_p1,"Head_center_bone"); // place gun at hand position

vec_for_bone(Hair_Neck_pos_p1.x,human_ent_p1,"Neck_bone"); // place gun at hand position
vec_for_bone(Hair_Head_center_pos_p1.x,human_ent_p1,"Head_center_bone"); // place gun at hand position
vec_for_bone(Hair_Eye_center_pos_p1.x,human_ent_p1,"Eye_center_bone"); // place gun at hand position

ang_for_bone(hair_p1.pan,human_ent_p1,"Head_center_bone"); // rotate gun by hand angle

// vec_for_bone(hair_p1.x,human_ent_p1,"Head_center_bone"); // place gun at hand position
// ang_for_bone(hair_p1.pan,human_ent_p1,"Head_center_bone"); // rotate gun by hand angle

}
..



regards sebbi

Last edited by sebbi91; 02/10/10 18:47.

3D-Gamestudio A8 - Commercial
Re: bone to bone conection (two models) [Re: sebbi91] #309871
02/11/10 18:53
02/11/10 18:53
Joined: Jul 2007
Posts: 424
EUROPE
maslone1 Offline
Senior Member
maslone1  Offline
Senior Member

Joined: Jul 2007
Posts: 424
EUROPE
I think you wanna connect some bodyparts to each other,
and than do some script-rigging, don't you? Am i right?


A8c, Blender, FlStudio, Unity3d
Re: bone to bone conection (two models) [Re: maslone1] #309884
02/11/10 19:34
02/11/10 19:34
Joined: Jun 2008
Posts: 402
Germany
S
sebbi91 Offline OP
Senior Member
sebbi91  Offline OP
Senior Member
S

Joined: Jun 2008
Posts: 402
Germany
exact ^^
i have the player.mdl and the hair.mdl!
I create the player in my game and than i create the hair.mdl!
Now i want to stick them together!

bone 1 from the player.mdl with bone 1 from the hair.mdl.
bone 2 from the player.mdl with bone 2 from the hair.mdl.
bone 3 from the player.mdl with bone 3 from the hair.mdl.

and all this with a script!
But i cant get it working ^^

I hope you could help !

regards sebbi


3D-Gamestudio A8 - Commercial
Re: bone to bone conection (two models) [Re: sebbi91] #309887
02/11/10 19:46
02/11/10 19:46
Joined: Sep 2009
Posts: 496
P
Progger Offline
Senior Member
Progger  Offline
Senior Member
P

Joined: Sep 2009
Posts: 496
why you want to use bones and why you do not use vec_for_vertex?
WFG programmer


asking is the best Way to get help laugh laugh laugh
Re: bone to bone conection (two models) [Re: Progger] #310001
02/12/10 16:03
02/12/10 16:03
Joined: Jun 2008
Posts: 402
Germany
S
sebbi91 Offline OP
Senior Member
sebbi91  Offline OP
Senior Member
S

Joined: Jun 2008
Posts: 402
Germany
because i have some different Playermodells with different numbers of vertices, and the same at the other modells like the hair!
my game should be a MORPG and so the player can select the hairstyle & the other parts like cloths,...

I thought the best way to make this system possible are bone to bone connections!
the bone names are the same only the modell must be changed!
And if i want to script 50 different kinds of model connections with vertices the script gets very worse big!

Any ideas?

Last edited by sebbi91; 02/12/10 16:05.

3D-Gamestudio A8 - Commercial
Re: bone to bone conection (two models) [Re: sebbi91] #310174
02/13/10 15:01
02/13/10 15:01
Joined: Jun 2008
Posts: 402
Germany
S
sebbi91 Offline OP
Senior Member
sebbi91  Offline OP
Senior Member
S

Joined: Jun 2008
Posts: 402
Germany
no ideas?


3D-Gamestudio A8 - Commercial
Re: bone to bone conection (two models) [Re: sebbi91] #310178
02/13/10 15:26
02/13/10 15:26
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
i'd use vec_for_vertex, store each vertex in an array for the model type

though i don't see why you using a bone in the hair too, surely the hair.mdl coordinates for 0,0,0 should match the bone position?

Re: bone to bone conection (two models) [Re: MrGuest] #310186
02/13/10 16:33
02/13/10 16:33
Joined: Sep 2009
Posts: 496
P
Progger Offline
Senior Member
Progger  Offline
Senior Member
P

Joined: Sep 2009
Posts: 496
it will work with vec_for_vertex and ent_morph to change hairs etc.
WFG programmer


asking is the best Way to get help laugh laugh laugh
Re: bone to bone conection (two models) [Re: Progger] #310190
02/13/10 16:43
02/13/10 16:43
Joined: Jun 2008
Posts: 402
Germany
S
sebbi91 Offline OP
Senior Member
sebbi91  Offline OP
Senior Member
S

Joined: Jun 2008
Posts: 402
Germany
ok I will try it ^^
THX a lot


3D-Gamestudio A8 - Commercial
Re: bone to bone conection (two models) [Re: sebbi91] #310318
02/14/10 12:45
02/14/10 12:45
Joined: Jun 2008
Posts: 402
Germany
S
sebbi91 Offline OP
Senior Member
sebbi91  Offline OP
Senior Member
S

Joined: Jun 2008
Posts: 402
Germany
ok it works fine but only for the hair, the boots and the gloves! o.O

If i want to connect the t-shirt with the body and the trusers with the legs it doesn't work!
It's because the ragdoll!

If my player dies, the t-shirt and the trusers dindt move with the player!
At this point i realy need bone to bone conections!

I hope someone can help!


wfg Sebbi


3D-Gamestudio A8 - Commercial
Page 1 of 2 1 2

Gamestudio download | chip programmers | 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