So i was trying to do the same thing that was described in this guide before animation: Texture masks using a shader | Playing in Canvas
However as I may see (even looking at the example project) this doesn’t work anymore.
To try to understand this I am trying this on simple cube model
Well, I have a model of a character. It has a mesh for a face texture, but there is going to be a customization of the character where we can change eyes, lips etc. So I need to find a way to mix two textures using one as a “background” and others being texture masks overlaying it.
But that is potentially going to be limited as you want something that works for eyes/nose/lips.
@Leonidas, any ideas on this one? I was thinking about using multiple materials on a single mesh so you can do eyes, nose and lips per material with the same face texture as the base.
Either that, or use a custom shader chunk that would take the multiple textures for the base face, eyes, nose and lips and then blends/overrides them together which actually sounds easier to do in theory
For example, the eyes texture would be pink expect for the eyes and it would only apply the pixel to the final diffuse color if it’s non-pink?
This is one method and you will have to do this via code as it’s not exposed via the Editor. With the detail channels, you can set a separate UV offset/tiling to position if need be.
I don’t understand any of these .
I tried both methods some way, but the shader method was old and doesn’t work anymore and at multiple materials on the same mesh I just didn’t come up with anything that worked the way I expected.
Is there an example for any of those methods?
In the meantime, the simplest workaround is to have separate meshes that on top of the face for the face features that you can swap out the materials for.
The detail channel didn’t work as I expected it to unfortunately but here’s a small example of using a custom shader to add a decal on top of an existing diffuse texture: