Changeable Equipment in Animated Meshes

Started by
0 comments, last by DarkZoulz 19 years, 4 months ago
Well, I've gotten most of my animation and mesh loading and such working in my engine, but I'm to the point where I'd like to be able to change the equipment worn by a given character model. I'm using .x files and skinned mesh animation, and I've got a custom application I wrote that splits the animation set in the exported .x file into named animation sets, and all that is working perfectly. However, I've yet to come up with an acceptable way to add equipment over-top of the character models. I was originally thinking about storing each model for a given style of equipment as a seperate mesh that's been attached to the same skeleton in the editor, and just rendering it on top of the character and applying the same bone transformations. This worked for the most part, but once animated, parts of the character would protrude through the clothing. And, if the clothing was moved farther away to prevent that, it began to look as though it didn't fit. I'm sure there's a good way to do it, but I just can't think of any other way while using skinned meshes. I suppose if nothing else, I'll just revert to using seperate objects for each limb and replacing them as necessary with the objects from a particular type of item. I'd rather stay with the skinned meshes, though, as they do look much better. Any suggestions at all would be greatly appreciated! Thanks in advance.
Advertisement
You can add mesh containers to the frames of the skinned mesh hierarchy and apply the combined transformation to that mesh when rendering. Note that the origo of the mesh in the container will be the bones offset instead of the skinned meshes origo.

This topic is closed to new replies.

Advertisement