Questions on Customizable and Modular characters

Looking for advice on workflows for creating characters that are both modular and customizable. I’m curious if my current thinking is correct or not and I’d like to make sure I don’t run into any deadends or pitfalls.

Firstly, I’ve sliced up my character’s base model into different pieces (hands, arms, head, torso, legs, etc.). These pieces can be swapped out for other meshes for clothing or armor to maintain modularly. But given that skinned meshes can’t be batched, approach ramps up the draw calls. Even more if these pieces use shadow casting. I was curious if merging these meshes during runtime would be a valid solution? Assuming characters are between 30k-50k polygon, with a bunch of blendshapes, is this realistic?

I also have a question on the shader end. I’d also like to include make up layers for my shader. Eyeshadow, eyeliner, lips, blush, nails, freckles, as some examples. All of which are separate texture samples. I believe a single shader pass is limited to 16 textures. Should I be worried about using so many textures for literally every single character?

Any other optimization tricks I should know would be greatly appreciated!

If you do a search for “Unity skinned mesh combine” There are multiple solutions on the asset store and github, so it’s definitely possible.

Well I know that it’s possible, I’m just unsure if it’s viable or not for my use case.

That’s not true anymore if you’re using SRP batcher and correctly setup your “parts” to batch (by making sure they are using the same shader variant).

I don’t think you’d want all of those to stack on all of each other, maybe a few of them. So, instead use a mask to lookup into the corresponding layer/texture. Then you’re not sampling them all for every pixel.

I was under the impression the SRP Batcher doesn’t actually batch draw calls, and instead does some GPU wizardry, so I was hesitant on relying on it as a solution for dozens for multi-part characters. But you’re saying I don’t have to worry about that?

I don’t quite understand what you mean by this. Could you give me more detail?

It batches them in the sense that it puts draw calls using the same shader variant together and makes each of those calls very quick thereby avoiding the cost that other batching strategies are trying to eliminate. I’m not saying you don’t need to worry about it, profile various strategies yourself. For skinned mesh renderers you still have the deformation cost which may or may not be faster depending on combined parts or not.

A splatmap is a simple example.

I apologize, I’m still not quite getting it. I understand how a splatmap and mask texture works, but I don’t quite see how it solves my problem. For character make up, are you saying to merge things like eyeshadow, lips, blush for example into a single mask texture?

EDIT: Ah, I think I misunderstood what you meant. I just realized you said: not sampling them all for every pixel. I confused this with not sampling every texture. Right, this was always my intent. My current make up textures are a single channel mask with a color lerp. There’s just… a lot of them haha.