3
\$\begingroup\$

I am in the process of developing a character customization system and I want to setup the base character model (the body) so that it works with which ever process I end up using. There are 2 aims here:

1) Ensuring that the base mesh (body) does not poke through the clothing mesh and vice versa 2) Ensuring that a customized character is properly optimized, i.e. there are as few unseen polygons being rendered as possible

The clothing is a rigged and skinned mesh, which in T pose has no poke through at all. However unfortunately when animating, despite my best efforts, there is always some poke through happening between the clothing and base mesh. I have considered having a few different versions of the base character model (body) which is switched out based on what kind of clothing the character has equipped. Therefore only the parts of the body which will be visible (not covered by the clothing) are actually rendered. Please see the image below:

enter image description here

The problem with this approach is that there could potentially need to be a large number of base meshes to cover all possible clothing variations. For example, a t-shirt alone could have any number of sleeve lengths or not have sleeves at all. Combined with other clothing such as pants or skirts, these could also be any number of lengths; and the player has the option to mix and match these in any way they want eg. t-shirt with short shorts, shorts, 3/4 pants, pants etc.

So I am wondering whether this approach is a good option or whether a better alternative exists. I look forward to some advice on this.

\$\endgroup\$
  • 2
    \$\begingroup\$ i like that 'issue' in back-left tho, don't fix it. Now serious, usually only the visible part is rendered, can you imagine the performance difference that you would have with a whole city dressed up? \$\endgroup\$ – PRDeving Jun 6 '16 at 8:14
  • 1
    \$\begingroup\$ Have you considered to replace segments of the body mesh with the clothes meshes instead of having both meshes? \$\endgroup\$ – Philipp Jun 6 '16 at 8:20
  • \$\begingroup\$ Sure that is an option. The reason I kept them separate is because the player is able to choose different clothing independently. For example they can choose a top, independently to the bottom, independently to the shoes etc. I was also considering using a shader that will stop rendering parts of the base mesh, not just make it transparent but actually not render those polygons/triangles. But I'm not sure about the performance of that. \$\endgroup\$ – FrontEnd Jun 6 '16 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.