- Home /
Can someone help me understand Unity uvs?
On this uv map I have labeled the vertices by index.
When I try to add uvs for the mesh I find that Unity applies the uv to the vertex with the same index. So vertices[0] gets uv[0], vertices[1] gets uv[1], etc... This works ok for vertices 0, 1, 2, & 3, because there is only 1 instance of each vertex on the uv map.
So when there are multiple different uv coordinates for the same vertex (vertices 4, 5, 6, & 7) how does Unity assign the uv to those vertices? Obviously if it reads uvs 4 - 7 only 1 instance could be correct.
Can someone explain to me how I would create the uv arrays for this cube?
Answer by unit_nick · Oct 23, 2017 at 05:00 AM
Ah, ok, I think I have worked it out. I need to double up on those vertices instead of just having 1 instance of each.
This will mean that each mesh triangle will be comprised of unique indexes (instead of multiple triangles pointing to a shared vertex), which can then be applied to the corresponding uv.
However this concerns me. Do I really need to create all these extra vertices just to add a uv map?
Your answer
Follow this Question
Related Questions
Procedural Mesh UV problem 0 Answers
UV Mapping: extra pixels either side 1 Answer
Remove Distortion on custom UV mesh 1 Answer
UV mapping a hexagon, starting from a 3D space 1 Answer
Md5mesh uvs and vertices bugging 0 Answers