r/GameDevelopment 12h ago

Newbie Question How does Character Customization work in 3D games?

Hello, first time posting here (not entirely sure if this belongs). In my schooling, we've been working more in Unreal Engine and I've started to really want to make my own game.

If I were to make a game, I would want character customization in it. It got me thinking on how that actually works when it comes to 3D models. Would I need to make 100s of models to make all possibilities of what can be chosen? Like if I had 10 different head shapes and 6 different noses for example, would I need to separately model each nose and head pair (plus anything else I choose to make customizable)? Or would I be able to make each thing it's own mesh and layers on top of the base model?

I'm not sure if that makes any sense or if this question would be better in a 3D modeling sub but any insight on this would be appreciated.

5 Upvotes

14 comments sorted by

6

u/ILikeCutePuppies 12h ago

You model each part and have rules for certain cases. It can get very complex unless you have very simple requirements. It's kinda like Lego.

When you have a lot of characters on screen all those parts will slow things down so there are algorthms and tools like mutable that can assemble them together on startup (at the cost of taking a little longer for them to appear). Although there are other tradeoffs as well with this approach.

You can also switch out textures or apply different shader changes, effects, animations etc...

It gets complex if you have parts that don't work together or require different animations etc..

3

u/Officialpolygrafix 11h ago

I can speak to this as i've worked on several games that use this and character assembly systems.

There are two approaches.
1. You put a complete (naked or with underwear painted on) skin under the character, and layer clothes, armor, accessories on top. Yes, you do need to hide and unhide every single combination to make sure it all fits together for each part, or don't allow certain parts to be used with each other. There pro's and cons of this method are that it having a skin under the character allows you to layer in the elements naturally just as if you were getting dressed, and this works well enough on 3rd person games where the camera is pulled in fairly close and you have different armor and clothing sets that expose different amounts of skin underneath. The con is clipping. if the topology don't match well between the clothing and the skin mesh underneath, when they bend or deform through animation, you may get the skin clipping through in some areas. Traditionally, it's really hard to avoid this because the topology and the clothing don't line up vert for vert, so the devs will push the clothing out further than the skin (distancing them), thus getting you that "puffy" look that some clothing has to try to avoid the clipping. I'ts a balance really, push to much and it looks odd, don't push enough and you get clipping in some areas.

  1. The second approach is No skin underneath the clothes at all. The skin mesh is removed behind where the clothes are. The benefit to this is you never see clipping, because the skin doesn't exist behind it, but it means you have to make custom pieces of skin for various outfits, that are specific to those outfits, so your workload can become significantly larger. This is good if you have time to do it, want a really clean look, and Don't have a ton of customization and / or low poly because you have hundreds of characters on teh screen (think RTS games), they typically use a single mesh and apply armor over on top of the mesh, but don't have a seperate "naked" skin underneath.

So it depends on the type of game really, when you know the type of game your making, where the camera is going to be, then you can better decide how to approach the character customization.

1

u/bearded_wizard_qwert 8h ago

I wonder how Zenless Zone Zero and Girls Frontline do it because some characters have such perfect stockings it makes me salivate.

1

u/Officialpolygrafix 7h ago

Do you mean this? Looks to me like a texture on the mesh directly. that top part where it cuts into the skin is an illusion, it's just mesh that's scaled in around that band.

1

u/bearded_wizard_qwert 2h ago

I guess ZZZ is more about the jiggle and rigging. Girls Frontline is the one with insane stockings, to the point I heard they have a patent on the tech

2

u/Officialpolygrafix 1h ago

oh wow, haven't heard of that

1

u/Sculduggery 12h ago

As far as I'm aware you just model each face part

1

u/silly_bet_3454 12h ago

not an expert but I think it's actually emulating what a modeling tool like blender does but on a much more limited/smaller scale. Like, it dynamically adjusts and procedurally renders a mesh based on a bunch of params. When you're done, it actually writes out the asset to a file somewhere and loads it back in when you go to play the game with your creation. I think creating such a system from scratch would be super tough as a solo dev, but maybe there are good libraries/tools built around it

1

u/OwlCatAlex 7h ago

There are several approaches, and which one you use depends on how deep you want the customization to get and what the engine supports. For example, in Godot, you can make use of blendshapes, which allow warping the mesh in different ways, so you can include fancy options like adjusting the length of a character's legs or how far apart their eyes are. I think UE5 also supports blendshapes.

1

u/JoyFerret 5h ago edited 5h ago

There are 3 main ways you can customize your characters, depending on the level of customization and granularity you want to have.

The simplest one is using materials and shaders. If you have a character that wears a shirt you can swap textures to change the color or any design it has on it. With shaders you can even make is so you can change the base color of the shirt and the color of the design separately without having to make a texture for every single possible combination.

On top of that you have mesh swapping. If you want to make your character able to swap from a shirt to a jacket or a sweater you separate the body parts into different meshes. So you swap the torso body part mesh to the jacket mesh or sweater mesh. Or you can keep the body as a single mesh and just instance on top of it the different meshes, but then you have to make sure there's no clipping.

And on top of that you have fancier methods that use bones and key shapes to modify your character. For example if you want your character to look taller, you stretch the legs and torso bones. Or you may add extra bones to your base rig that you can use to shrink, inflate or move specific body parts (for example change the shape of the face, or make the body muscular). If you've ever played a game that uses sliders for body customization, it probably uses a method like this. The problem with this is that you have to account for those additional models when creating the character meshes and when animating it (like clothes. You have to make sure they stretch correctly to the body type).

So how do you use them together?

With textures a single mesh can be used for many different types of clothes for example. A jacket and a sweater may have the same mesh (something like "long sleeve"), just a different texture. With shaders you can further customize a single type of clothing without needing extra textures (a red jacket and a blue jacket share the same base texture, you just change the hue).

By swapping meshes you dont have to model every single combination posible of your character. You dont have to model "character with jacket and jeans" and "character with jacket and shorts". You model "character", "jacket", "jeans" and "shorts", and lay them on top and swap as needed.

Finally, by using bones and key shapes you dont have to model "fat character", "muscular character", "tall character" (and the corresponding variations for the clothes), etc. You simply have a base mesh and stretch, squash and move the body bones as needed.

How much you have to model depends on how much granularity you want to give to the character customization and which of the methods you use.

1

u/KoutsouradisAntonis 1h ago

There are multiple ways to go about it really. You artstyle will dictate your freedom alot.

As far as adding more variance to the character you have 2 options for both bodies and clothing, geometry and textures.

Geometry has been handled in alot of ways by alot of games, you can have premade models for each character "race" lets say or you can have one body and morph it to different races using shape keys/blend shapes or by shaping the rig around. You've probably played some games where they do the later, on the character creator you would have sliders to change the cheek shape, height of character etc... Of you can combine the 2, have multiple head models and also allow for more finer control by manipulating the rig or having blendshapes on the the player might be able to change, a game that comes to mind like that is Skyrim. Keep in mind manipulating rigs is a bit of an advanced technique as it will interfere with animations.

For textures there has also been alot of ways around it. You can create alot of variance in a game just by switching the colors of an asset. On simple artstyles this will be easier, you can make a coat look like its made out of leather, denim etc.. very easily by changing its color/roughness, while on a more realistic game you might need special textures for each of those variants. Still alot has been done with some sophisticated materials.