- Home /
how can I set multiple materials to a mesh ?
How can I place multiple materials on a mesh ? I do not mean using them all simultaneously but determining on what triangles what materials should be used and if possible use a coefficient ( having a material manifest lightly and an other one strongly for example ). I need to find how to do this as I am working on procedural generation and am trying to get a smooth transition from sand to grass ( as an example ). Looked at shaders but did not find anything looking like variable inputs. I saw shaders can look at the height of the vertices in order to make a decision on what material to use but I did not find anything about giving them something like an array of values in order to tell it what materials should be used where.
Yeah that's probably not going to be possible, or is it? What about vertex colors? I know for a fact you can procedurally assign them to a mesh (I just don't know if that's the case with materials although I would think so). Vertex colors do transition and might get you the effect you're after.
I think it's possible : many procedural assets like Gaia do it but I have no clue of how