Best approach to create visual details and add them on top of a skinned mesh (decal, dynamic texture/material, texture painting)?

Hey everyone!

The last few days I struggled to find a good solution for a problem regarding placing a texture or a decal on top of a skinned mesh. The basic idea is to place scratches or bruises on the forearm of the player character, which consists of a skinned mesh (two FPS-arms) with animations and its own material. The bruises and scratches should be placed randomly in a certain area of the arm. After a certain event is triggered a new scratch or bruise should be added.

So basically this problem consist of two parts: (1) Creating the bruises and scratches as some kind of texture, material or gameobject (prefab), which will fit automatically to the skinned mesh. (2) Placing the object dynamically on top of the mesh in a specific place.

I need some input for the first part. So the question is: What would be the best approach to create small visual details and add them on top of a skinned mesh dynamically in a way that they fit the skinned mesh automatically?

So far I tried different approaches:

(1) I had a look at Deffered Decals (Unity - Manual: Extending the Built-in Render Pipeline with CommandBuffers) This is exactly the effect I want to create but I can’t use Deffered Rendering/Shading in our project.

(2) I had a look at the Simple Decal System (Simple Decal System | Particles/Effects | Unity Asset Store), but it only works for “standard” meshes, not skinned ones (although I could think of rewriting parts of the script, but I’m not sure if it is even possible to just replace the Mesh with a SkinnedMesh inside of the scripts)

Other possibilities I could think of (but haven’t pursuit yet):

(3) Just change the whole material of the arm (but then I would miss the randomly generated placement)

(4) Some kind of dynamic or layerd texture/material (how would I set up the texture/material then to be dynamic and fit the shape of the arm)

(5) Texture Painting

Hope the problem or question is clear enough. I am by no means an expert regarding Unity and still learning a lot of new things. Any help or suggestions would be highly appreciated. Thank you very much!

Hello, I’m also trying to do what you have asked. Have you worked it out? and have you tried @hexagonius suggestion? If so, would love it if you can share how you have done it.