Public Group

# Characters with equipment options?

This topic is 3439 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm wondering how characters with different equipment options is typically implemented? The thing I am wondering is how to make the animations match up for the different models used for the body itself, and the equipment. For example, Lets say I had a basic character, pants, shirt, and shoe mesh and I want to animate them in a game engine. The only way I could think of to implement these, would be to either A) Render every possibly combination on to seperate skinned models and use one for each combination. Which sounds like quite a bit of work, especially as you add more and more combinations. Or... B) Render each piece as a seperate model on the same skeleton. For example, One model of the body skinned to the skeleton. 2nd model of the shirt skinned on the same skeleton. 3rd model of the pants skinned on the same skeleton, and same for shoes. This sounds like it would save quite a bit of work, but I'm not sure if this is the best idea for performance reasons. It would be great if I could just attach them to the body model, but I do not believe it would animate properly without actually being skinned on to the skeleton in an animation program. Are these options typically how it is done? Or is there another way to accomplish this that I am not aware of?

##### Share on other sites
Swapping parts is another variation of the second idea you have where you actually swap the legs for a set of legs with the appropriate pants on them instead of just layering the pants mesh over top.

##### Share on other sites
Ah, I've had that same issue! Let me try and shed some light on that. You seem to be thinking that each equipment (or combination thereof) is unique, which can result in wondering how exactly are you going to handle a change to the next available option. Basically it's trying to work with ambiguity there, which can be a very tedious but thankfully, an unnecessary task.

Normally you would just want to group your equipment in a more general sense.
You say that maybe you could have a character that has a shirt, shoes and pants... Well, that's what they are. If your character was wearing an Aerosmoth T-Shirt or maybe just some "Hawaiian" shirt that looks like vomit, does that mean that either of them are not shirts? Of course, I'm not saying you don't know this, but it is easy to wonder how something is really working when you haven't broken down into how the system might be composed.

Say I have here the, um, Gauntlets of Throat-Ripping and the Claws of These-Were-Made-From-A-Cow or something. You could categorize those under "Hands" or "Gloves". Since you did not specify a programming language, I'll just go with c++.

// List of equipment typesenum eEquipTypes{   EQP_HANDS = 1,   EQP_FEET  = 2,   EQP_HEAD  = 4,};class CEquipment{   // Construct with a desired type   CEquipment( ULONG type ) : m_ulType(type) {}   ULONG m_ulType;    };

In case you didn't get that, this is very basic code that at least gives an Equipment class the ability to know what it is. (Just if it's worn on the head, feet or hands in this example, making for a potentially erotic game.)
That way you can bring in a whole bunch of meshes and have them neatly organized.

Now, regarding animation? I'm no expert, but I can tell you that as long as you ensure that all of the equipment's vertices are affected by the appropriate joint, then there is not much to worry about. Animation techniques, I BELIEVE are up to the developer, and are awkwardly covered by APIs. (Don't hold me to that) But if it's any help, I do know that there are methods used by say, Conitech, to "attach" vertices together to make sure they are placed correctly.

Lets say you have a helmet, and you have a vertex at the lowest point of it's basin, where the up-most point of the head fills. You would get the upmost point of the head and the corresponding part of the helmet to share positions. You couldthen make sure rotations to the helmet behave like the head does to the neck joint, or whatever method animates your characters head.

I'm getting the impression you've been modeling, so make a joint for a basic mesh and fiddle with it. Now put something extra, make sure the joint affects it as well, and fiddle again. Basically when it comes to animation, you want to ensure that the"put something there and influence it too" step is handled in your code. I cannot say the same thing if you are working in a modeler.

If you are modeling something, you're pretty much in the "dressing room" stage.
Just shove something on that looks good and export it when you are ready for use. By 'it', I mean the meshes to eachof their respective classes. Flexible animations will be up to your application though, I'm sure.

As a reminder for your grouping logic... Just make sure you categorize them, and (Assuming you are using c++ here) you could just use a pointer to represent that certain type of equipment's mesh and have it appropriately react to a character.

The finer details... I can't answer yet. Still cracking the books there.

I hope I helped.

• 17
• 11
• 11
• 9
• 49
• ### Forum Statistics

• Total Topics
631394
• Total Posts
2999750
×