Hiding or deleting specific faces of a mesh with a texture or LUT?

Hi, is there a way of hiding or deleting certain faces using a texture or LUT? I’m making an RPG type character generator and certain armor penetrates the body mesh and I’d like to hide certain parts of that mesh based on which armor is selected.

Is there a way to hide or delete just some polygons on a unified mesh with a shader or LUT of polygon indices? I’m currently going to try and do this by splitting out the mesh into different meshes that fit with the armor, so say I’ll have a normal set of legs, and then legs that fit with that armor, but I know this is way inefficient and since I’m planning on releasing on mobile, I’d like to find a more efficient method.

What would be the best way to do this?

The best way (and probably easiest in the long run) is to edit the mesh in 3d modelling software. Just remove them there. If you need both versions, make 2 versions and apply the one with deleted faces when you put on gear that requires the faces deleted.

Depending on how your game works… after character creation you bake the skinned mesh into a single mesh. Not quite sure how to do that as I havent attempted, but I do know its possible. I have seen assets on the store that do this exact thing.

@beeboks

I don’t know the exact specifics, but what you can do is apply a material with a transparency texture to your model at run time. You can even have this material set on standby and add it only when needed via script. You can even have more then one material on standby (like 20 if needed) to give your model, if it needs to have more then one material type change.

You could also split your model’s UV so your model can use many materials through one UV and just adjust the transparency to each material individually via script, rather than swap materials.

Either method to me would be the least complicated method I can think of. It would take some knowledge of scripting to pull it off, but I am sure it would work, and work fast. Fast enough for mobile.