Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I've watched quite a few Blender tutorials, but I have yet to see examples of how to swap out sub-models. So my question is, how do you swap out equipment on a character model? Specifically I’d like to be able to dynamically add/swap clothing and items held by a character model in XNA. Ideally the items would follow the bone structure of the character model.

For example; starting with a naked character in XNA, I’d like to be able to have the character hold an axe and wear chainmail that follows the character’s animations. I’d also like to be able to switch this equipment for a sword and plate mail at any time during the game. I’d rather not create a model for each equipment combination. Is there some way to just add the bones (say a sword bone) and meshes of one model to another model bone (say a right hand bone)?

Thanks…

share|improve this question

1 Answer 1

up vote 13 down vote accepted

For items that are carried by the character like a sword, shield or similar, you can create a special hand-bone, where you attach the new item/geometry at runtime.

When it comes to different armors/clothing, this is going to be slightly more complicated. An approach that is widely used (I think also by WoW) is using segmented models:

You model your character with all different armor and cloth-pieces as sub-meshes (in blender, you would use vertex-groups for that). Then you just toggle the visibility (or attach) the needed parts and hide (or detach) the unneeded parts. All the parts will share the same skeleton.

You can also achieve a lot of different looks by just swapping the texture.

share|improve this answer
1  
yep, WoW seems to do just that. The only "external" parts are shoulderpads, helms and weapons, afair. –  Raine Jun 16 '11 at 19:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.