(Warning: long post and potentially moronic idea. Proceed on your own risk)
So I was thinking about the following situation. Imagine we have material consisting of two layers - some kind of “base” and a layer with discrete details - stones, lizard scales or whatever.
Layer B uses a mask to reveal layer A
But here is the catch: individual stones must be hidden or revealed based of where their center point positions fall on mask , otherwise it will look ridiculous
Setup must work with different masks and most likely with different tiling values of A and B, so painting individual bricks on the mask is out of the question
I got an idea of creating the “centerpoint map” for the bricks.
It has their centerpoint UV positions marked as 2d vector (RG). So using this map as UV input for the mask texture should solve the problem, as long as I can handle issues with tiling. But obviously, since texture lookup by specific UV points needs to be performed, it will only work with image texture as a mask. So the question is: can this method be adapted for vertex color mask instead? It would made it more flexible