1

A cube has 8 different vertexes. texture Mapping the faces to the texture is a problem because the 2d-texture has 14 different xy coordinates.

I like to know:

Is it common that one vertex has only one uv coordinate pair?

Grim
  • 1,938
  • 10
  • 56
  • 123
  • As a example, in OpenGL a "vertex" means a 3D point and all attributes associated with it, e.g. a texture coordinate. In higher-level APIs e.g. WPF / Unity they are usually decoupled. – meowgoesthedog May 05 '19 at 17:03
  • @meowgoesthedog How are they decoupled? – Grim May 05 '19 at 18:58
  • 1
    Each "triangle" has separate vertex / UV indices and they are stored in separate buffers. The vertex data is then duplicated when passed to the underlying graphics API if necessary. – meowgoesthedog May 05 '19 at 19:00
  • @meowgoesthedog "if necessary" sounds wague. To me, it looks like WPF/Unity must technically hold behind the scene a open cube/dice with additional 4 vertexes for one closing-side. The 4 vertices of the closing-side have the same position like the open side of the cube but different uv-coordinates. – Grim May 05 '19 at 19:31
  • 1
    By "if necessary" I meant depending on the API; OpenGL definitely requires duplication (not sure about Vulkan / D3D) – meowgoesthedog May 05 '19 at 19:42
  • This answer may help you: https://stackoverflow.com/a/25483486/1479630 – kolenda May 06 '19 at 12:42

0 Answers0