This is something I really know nothing about yet, so this is a very general question about what methods exist and make sense to mix heads, body types, and outfits for NPCs.
For my game, I want to have fairly simple character models like Metal Gear Solid or Half-Life.
But what I would like to be able to do is to create an mesh and a texture for an outfit, which I can then make assume the proportions of the respective body types of the different alien species. And being able to swap between different heads models that go on the body. Being able to put hats on the heads would be a neat bonus.
I could make a different model for a wide range of possible combinations between outfits, body proportions, and heads, but that would be a lot of repetitive work, and lots of games have moved way past that literally decades ago.
From my idea how this could work, there seem to be three main things that would need to be done, and I really don’t know how they would work in Godot:
Combining head models with body models.
Matching the skin color on the hands with the color of the head.
Morphing some of the proportions of the body mesh according to different body type presets.
Does this make sense as an approach? Or are there other ways that would be even simpler, or possible problems that could come later if doing things like this?
Any advice, pointers, and suggestions on this would be very welcome.
You can use the same texture for the body and head models, I don’t believe there is an “automatic” solution to this, but it wouldn’t take too much programming; you’ll have to assign the correct material to both mesh instances.
Just because the hands are part of the body mesh doesn’t mean they have to use the body material. I could have a full body naked texture material and a clothing texture material, and then on the body mesh I can define any faces of exposed skin to use the skin material. That should be easy to do. Thanks for giving me a hint in that direction.
Also thanks for mentioning shape keys. I had never heard of those, but those seem also like a great fit for my problem.
If your characters use skeletal animations, you’d probably want to keep a single mesh and a single material per character. You can assemble the final single mesh from modular pieces of mesh data and blit texture patches into final textures - at runtime.
You can “link” the arms and head so that when you change the head, the arms change as well (using the same rig but with a slightly different mesh). This can look even more interesting than simply replacing the head.
Too many shape keys significantly reduce performance.
What I am imagining is to have a “naked body model” for each body type with the same faces and vertices and the same bones, just differently scaled and slightly stretched.
And then making separate outfit models that have additional geometry for skirts, wide sleeves, backpacks and, so on, which can be pulled over the body models and will stretch to conform to the differences between the default body and the alternate bodies.
That way I could be making every outfit just once with one mesh and one texture, and get the same outfit for all the other bodies for free.
Someone on Mastodon suggested simply scaling the bones of the rig in Blender in pose mode. I didn’t know it could do that, and it does exactly the thing I had in mind.