Multi material on mesh positioning

I am trying to add two materials on a mesh.
It seems that it is working but I am confused with the results. I really dont understand how to position these materials, I want them to be 100% width and 50% height each, one top and one bottom.
I was following this playground.
This is my playground.


You depend on how the mesh was modeled to do what you want. The first half of the insert would have to be created from a contiguous list of faces, and so would the lower half.

For example, the top half would consist of faces 0 to 100, and the bottom half of faces 101 to 200.

But this is not the case:

The insert has 52 faces, so I divided the sub-meshes to 26: as you can see, the faces were created from left to right instead of top to bottom.

1 Like

Thanks. I am doing this to be able to add multiple dynamic textures on one mesh.
Do I always have to make another material in case to create a dynamic texture?
How would I position dynamic texture where I have to provide the position for material but also for dynjamic texture?
Or is there something that I am missing in case to to this?

We usually use decals to overlay a texture that does not have the same uv layout as the diffuse texture of the material, because you normally cannot know how your mesh geometry will be created and whether the face layout will allow you to position the texture exactly where you want it (as evidenced in your example).

I would like to ask you another question since I saw you answering on this topic.
Could I use ray to detect the face of the model (cube) and set it as face of the plane so it will always face the right direction?

You can use the normal to the point of intersection to orient the plane:

1 Like