Let’s say we have a character with animations in 3d scene, and when another object intersects with it, we create transparency on the texture at the points of intersection. I know that this is possible using geometry deformation tools, but that doesn’t suit me, of course. I tried to illustrate this:
The biggest problem I encountered in my idea is that I cannot translate the intersection point of collisions into flat UV coordinates. (At least that’s how this implementation looked in my head).
Based on this system, I wanted to create something like a damage system that hides, for example, destroyed fragments of armour on a character model at the point of impact. If I’m not mistaken, the only way to do this is with raycast, but if I want to do cutting damage, for example, and not just piercing damage, then things get more complicated.
As far as I know, Decals does not allow you to make certain elements transparent, does it? It is suitable when we want to apply a texture to another surface, but I clearly stated in the description that I was looking for a way to make the texture on a character transparent in certain places.
Depending on the visual style you may get away by drawing what’s underneath - over it.
For suggestions about fetching UVs or drawing holes otherwise, you’ll need to provide more context. Show some actual visuals, it there skeletal deformation involved etc…
I am still at the initial stage where I do not have any models. To be more specific, what I want is a dynamic system for registering visual damage.
Let’s imagine that we have a torso model with several layers of geometry that are nested within each other in a hierarchy:
1 - Clothing
2 - Skin
3 - Muscles
4 - Skeleton
5 - Internal organs (only relevant for the torso or head, where the brain is located)
The idea is to make the texture of a certain layer transparent in places of damage so that the next layer is visible. Let’s say we can use Reycast in shooters where such a system would work easily because we can get UV coordinates according to the bullet’s point of impact, but what about games where all weapons are cold and not quite suitable for Reycast in terms of shape?
Well raycasts hit colliders and skeletons deform renderable meshes and not colliders. Obtaining an exact hitpoint on a deformed mesh wouldn’t be trivial.