HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Attaching meshes to meshes

07-28-2003, 04:21 PM#1
Fenris Ulf
I know it's possible to attach a mesh to another mesh. (The ! above a characters head for example.) I found another thread on this subject and it looks like you can use a tag embedded in the model like "head" or "hand" as a location to where the secondary mesh should be attached to. So what are these things in the actuall model? Are they bones or names faces? How do you prepare a model to have things attached to it?
07-28-2003, 04:45 PM#2
ChoboMapper
those are actually called attachment points, and can be added by hand quite easy. There is 2 steps to adding them, first you need to add the actual point, something along the lines of

Attachment "Head Ref" {
ObjectId 52,
}

which names and places the object id for the attachment point. Then you need to go down to the pivot points area, in blizz models it is below all the geosets and above the emmiters. What you need to do here is define the location of the ref, by adding an

{x,y,z},

in this case as the 52nd pivot point listed (becasue of the object id of the attachment ref)
07-28-2003, 05:03 PM#3
Fenris Ulf
So how does the direction work?

Take this example: I want to be able to swap out a guys weapon with another. If I can attach a mesh to his right hand that only gets me halfway there. I also have to make sure the rotation is correct. (The weapon, a sword for instance, must be perpendicular to the forearm.) Is something like this doable?
07-28-2003, 06:45 PM#4
ChoboMapper
how the object is placed into the hand isn't defined in this model, but how you place the attached model in max. for example in this picture, this sword will appear out of the attachment at a 90 degree angle upwards.
07-28-2003, 09:38 PM#5
Fenris Ulf
But it must be related to the direction of something in the primary mesh or else the sword would not rotate/move with the hand correctly. If it was simply based on the orientation of the secondary model then it's position and orientation would be fixed. The secondary models axis must get tied to the axis of something in the primary model to determine what direction X, Y and Z are. If it used the base coordinates then it wouldn't know what direction to face initially nor would it be able to move.

Basically "hand" or "head" or whatever must have a local XYZ axis that the secondary objects XYZ axis attaches to.
07-29-2003, 01:52 AM#6
ChoboMapper
yes, attachment points (besides overhead and others that dont move) have parents also. This is declared with the syntax

Parent xx,

where xx is the object ID of the bone/helper that you are using as the parent. Attachment points will still exisit at the location of their pivot points, but will translate/rotate along with the parent bone.