Hi all,
I’m facing an issue for texturing a custom mesh. My mesh covers a block of a few tiles, and I would like to texture the tiles differently.
To reduce vertices number, and to connect properly the (non square) tiles together, a single vertex is part of up to 4 tile faces (think of the X vertex in the following schema, where faces A B C D should be texture mapped to different part of the image)
[java]
==================*
| | |
| A | B |
| | |
=========X=========
| | |
| C | D |
| | |
==================*
[/java]
So I want to texture each face with a different part of my texture image. If texture coords were given for each face, that would be straight forward, but according to the doc one vertex can have one uv coordinate associated, so how to handle this case the best ?
- Use 4 vertex by faces, allowing multiple vertices in the same position ? It seems to me the least efficient
- Handle texture mapping in the material shader?
- Use a different texture image for each face texture, and wrap it for tiles with the same type? I would need to create extra vertices only for tiles with different types then.