2

I'm currently implementing a mesh extrusion algorithm for plane shapes, let's assume for a rectangle.

When I extrude this rectangle I create four new sides (resulting in 8 new triangles) and a new bottom for the 3d shape.

This works fine when I duplicate all vertices so that my final cube has 24 of them. But I'd like to avoid these extra vertices now so that I have only 8 vertices. Unfortunately, in this case I do not know how to calculate the UV coordinates and I keep getting wrong results as shown in the image below.

enter image description here

The correct result would look like this (with duplicated faces):

enter image description here

My first question is: Is it possible to generate a good uv map with just 8 vertices (and hence 8 uv coordinates) for a cube?

Second is: How? :)

Thanks for your help.

padmalcom
  • 1,156
  • 3
  • 16
  • 30

0 Answers0