Managing scalability of skeleton, animation and outfits for 3D characters from Blender to Godot

Godot Version

4.5

Question

My mileage is still limited on this so please correct me if I am wrong. How do you guys manage clothing, animation and skeleton for 3D characters that have multiple outfits?

Note: physics will not be used for the clothes here.

Imagine you have a character that will have 10 different outfits. I am now thinking of the following:

  1. A single .glb file for each outfit of the character.

In Blender, I create one .blend file for each outfit of the character that will be exported as .glb.

This means 10 .glb files for this character, which means 10 scenes in Godot. When it is time to use an outfit, you simply load the scene of that outfit. The skeleton animation and all the weight painting on both the character’s body and cloth are applied on Blender side. This means you probably have to do all the animation such as idle, running, jumping first, and then do the weight painting for each outfit afterward.

This method seems to be more memory friendly as unused meshes do not have to be loaded. (but honestly, with the amount of VRAM we have nowaday, this is irrelevant)

Another issue is if I would like to create a new animation, for example, dashing, I now have to go through all 10 files and adjust the skeleton and re-export all 10 files into Godot again. This method is not so good, so comes method 2 below:

  1. A single .glb file with all outfits of a character.

In Blender, I have a single .blend file with ALL outfits. This means adjusting all outfits could be managed from a single file conveniently.

If a new animation is to be added, you only need to add it once in a single file and that’s it, assuming all the clothes’ weight paint are in place.

In Godot, upon importing, each outfit will be a MeshInstance3D which could be toggled on or off. This means you render the only current outfit. The GPU does not render currently unused outfits, but it will have to hold the data of unused outfits.

So if you only have a few outfits, this is fine. But when you have 50+ outfits, this translate to 50+ MeshInstance3D nodes per character on Godot side. All outfits are loaded into VRAM regardless of whether you are rendering them or not. This is ok for a few hero characters, but if you are to have more characters, the number of nodes go up linearly in relation to the amount of outfits they have.

For a more simple game, this simplicity is definitely the way to go, but I am thinking of scalability just in case:

For 3D games that allow you to customize your outfits freely, normally, how do they approach this problem? It seems more scalable if we could have a .glb file for a character and split each outfit into each .glb file and then somehow “pin” the current outfit on to the character in runtime in Godot. This also allows you to have different characters sharing the outfit too.

Some games also allow you to change your hat, shirt, shoes, etc., so how will this be like on Godot side with respect to character’s skeleton, animation and weight painting on Blender side?

You can be selective with the stuff inside the GLB after importing it to Godot. You make a temporary scene, then instance your GLB, then make children editable, then make unique. Now you can delete stuff from it, rearrange, whatever, and save it with a different name. You can also click on nodes and ‘save branch as scene’ or something like that.

I imagine you could import a GLB with like 500 outfits, then do what I said to save different combinations including just one set each. Will it take a long time? Sure, but you could do it if you have to. You can probably script it though.