Replies: 1 comment
-
The texture data (faces.texture_idx and aux.verts_uvs) makes a link between each triangular face of the mesh and a triangle of UV space. But there is no guarantee that if multiple faces intersect at the same vertex then the corresponding corners of those faces at that point in space will have the same UV values. So getting the "uv positions of vertices" isn't well defined. If you aren't concerned how these ambiguities are resolved, and you don't care about vertices which aren't used at all, then you can get a uv coordinate for each vertex with something like the following. Note that the desired behavior closely matches the idea of an indexed assignment in torch/numpy; after realizing this it is straightforward to come up with the code.
|
Beta Was this translation helpful? Give feedback.
-
Moved from issue-586
Beta Was this translation helpful? Give feedback.
All reactions