- Home /
Decal Question
I have been looking for a way to do this for a while, but haven't found an answer. What I want to know if this can be done is that I am working on a character creator. I want to add tattoos to the character's skin or makeup on the face. I don't want to have 100 different textures and colors I have to make and then let people apply.
My question is would decals work for this, and how do you apply them to already on the model materials? And if anyone can point me to the right documentation or if I have to make a new shader or something.
I don't think decals are the most adequate way to do it. A shader blending the main skin texture and the tatoo/makeup one is how I would do it.
I was thinking of trying splat maps, but I don't think they'd do it accurately either. So, I'm guessing a shader able to use more than one texture would be the way to go? I had an idea for it, but I wanted to see if decals would be something that might be a better work around. :D
Answer by JonPQ · Jul 31, 2021 at 12:19 AM
makeup is easier... tattoos a bit harder... First I'd suggest seperating the material for head and the rest of the character.
for the skinned mesh on your character's face... if you just drag in an extra material into the mesh's list of materials it will draw that material after the base material ( on top). ( bit of performance cost , due to 2 renders ) That material's texture will use the same UV mapping as the original face... so use the face texture as a basis for making layers of makeup.
for that material, you probably want a custom shader.. but you could split the r,g,b,a channels into areas, for lips, rouge, blush, & something else. then have 4 shader parameters for color tint for each channel and 4 params for strength/power. Then have a scriptable object setup with an array of sets of color/strength. for different make-up configurations... So you have only uses 1 extra material, 1 extra texture.
for tattoo.... more tricky as uv-mapping is not conveniently setup. ideally yu'd pic a spot / spots where the tattoos will be applied, and have artist make a second UV set on those areas of the mesh, Then you make overlay materials for those custom areas on the mesh for the tattoos. Clone the materials and replace them, but change the texture used to that of different tattoos.
For tattoos, you'd need second uv map, one material per tattoo zone. and one texture per unique tattoo