Topic was automatically imported from the old Question2Answer platform.
Asked By
Nafis
Old Version
Published before Godot 3 was released.
I have low poly 3D character with dress. But as it animates, some faces of body comes out through the dress. Is there a way I can hide the poly behind the dress mesh whenever the character is wearing a dress?
You’ve entered an exciting world of multilayered meshes. This topic is kinda complex but there are several solutions.
Fix the animation of clothes in Blender (or Maya/Max/whatever). This involves a lot of fiddling with weight painting and it can take a lot of time. The idea is that you have the body mesh under the clothes but the animation is clean without clipping.
Select in Blender every face which is under the clothes and put them to one vertex group. At the export time, select the group and delete the faces. It’s not the best solution because you can accidentally save file with deleted faces. And some faces still will be partially under clothes so some clipping can occure.
Create a custom shader for clothes. Multiply a vertex in vertex shader by value between 0 and 1 (VERTEX = VERTEX * 0.05). Play with lower values first. This will push vertices closer to the camera which means less clipping. Or try the opposite. Multiply the vertex by value higher than one in shader for body.
Simulate clothes in Blender and bake the simulation. It will be hard to get results you want but I think it should be possible. Godot right now doesn’t have cloth simulation but you could bake the animation elsewhere. This should prevent clipping too.