Download

Modular equipment system for multiple characters -- best practices

Please help me make sure I’m taking the most efficient approach to applying equipment system to multiple character meshes

My game is a party-based traditional RPG in which the player controls up to 6 characters. The player can choose from 20 different character meshes to fill the six slots in the party.

The player can also use the equipment system to equip each character with armor, boots, etc.

My current approach is to first create the 20 character meshes using Character Creator 3, and adding animations in iClone. Then, when I want to create an item that can be equipped – let’s say a set of Leather Armor of Awesomeness – I first go into CC3 and, on each of the 20 character meshes, I add the Leather Armor of Awesomeness, hide the character body mesh, and export just the Leather Armor of Awesomeness on that character into UE4. I assign each of those armor meshes to the corresponding 20 character skeletons. I have to do that 20 times (once for each character mesh). Then, when the player equips the Leather Armor of Awesomeness on a particular character, I simply add the corresponding armor mesh as a static mesh component to that character.

The problem is that I’m having to make the same armor 20 times, and the same process for every other equipment item in the game. Is that the most efficient way to do it?

This is why Unreal has the “standard skeleton,” and also has the “skeleton retargeting” system.

So, in a fantasy setting, you may want to make maybe four skeletons: diminutive, human-male, human-female, and massive. Then you make the meshes for each of those four skeletons. (If everyone’s human-androgynous, you only need one skeleton.)

Once you have the meshes, you need animations. You can re-target each of the skeletons to one “master” skeleton, using the retargeting manager, and then any animation that can play on the master can also play on the others. I think it used to be you had to re-target each animation (creating new animation assets,) but as of some somewhat-recent version, you can now do it by-skeleton.

Finally, for attachments: You have to make sure each skeleton has the same named attachment points. Typically, “righthandpalm” “lefthandpalm” “rightbelthip” “leftbelthip” “backpack” “chestnecklace” and so on. These can be (unused) bones in your rigs, or you can define them as sockets in the skeleton rigger in the engine.

Then, each piece of equipment is either clothing, which ends up getting combined into the skeletal mesh and/or master pose component, or it’s static objects, which are attached to the named socket. Additionally, attached objects may want to affect the animations being played, typically using some montage going into the override slots of your animation blueprint. “Grabbing the hilt with fingers” and “leaning forward under heavy backpack” fall into those kinds of changes.

Anyway: Most importantly: Try to get away with as few skeletons as possible, and build multiple characters / character classes on the same skeleton, because that makes the number of meshes you have to build smaller. Unfortunately, there doesn’t seem to be any mesh retargeting in UE4, although there’s no reason why there couldn’t be, technically speaking. (Artistically speaking, I imagine they haven’t ever needed/wanted this, as it does make many meshes look squished and unnatural.)

1 Like

This is super helpful. Thanks!

Sorry but…

Isn’t the whole point of ccreator and Iclone that you don’t need to do that because the clothing is changed with morph targets?

If that’s not the case, then yes the approach described is what you have to do.

If that is the case, then the leather armor can just be for a standard skeleton and be adapted with changing morphs.

Personally I would do just 1 skeleton here - if you don’t have a need for hand or more particularly foot IK stuff.

If you do need to do IK. Then 30 different skeletons is kind of a must if you want quality.

I think it’s also a lot easier for you to export 30 different ones than to make the same skeleton work for 30 meshes with the programs you are using…

However they all share the same nomenclature, so runtime retargeting will work if properly set up.

Thank you.

I’m not an expert in CC3/iClone, but I think the only way to to morph between different clothing items would be to put them all on the character and then morph the opacity of them to make the ones you don’t want invisible. If that’s the case, it seems like there we’re throwing a lot more data at the character than necessary. But I would be very interested to hear that I’m wrong!

My thinking is
You’d swap meshes, but you would place the same mesh on different skeletons, and modify the curve values of morphs to get it to fit without clipping - in engine.

Got it. Thanks!