Custom mesh texture for a cube

hello guys I want to create a custom mesh for a cube, and set a different texture for each face,
the problem is that we can only assign the texCoord 1 time per vertex, it doesn’t work in my case because I want each face to have different texture, so a vertex shared between 4 faces needs to have 4 texCoords.

what is the best practice in that case? do I just duplicate the vertex and create different index for each face?
is there a better solution?

texture atlas

1 Like

I am indeed planning on using a texture atlas but the problem is taht for each vertex i can only set the texture once, each face has its own texture like I can have green on top, and dirst on one siide and ice on the other, and it can be dynamic :confused:

I can have multiple textures in the atlas, and each side is mapped on some texture coordinates?

@navycougar said: I can have multiple textures in the atlas, and each side is mapped on some texture coordinates?

Yes

1 Like

Just have as many vertices as you need. Read: Make your box out of 6 quads.

1 Like
@normen said: Just have as many vertices as you need. Read: Make your box out of 6 quads.

alright! thanks guys! :), i’ll just make a cube made of quads! :slight_smile: