ozRocker Posted June 20, 2018 Share Posted June 20, 2018 I'm referring to the list of vertices coming from this: mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind); I used to think it would list the vertices referred to by the definition of the faces and that it was unique, so no vertices would appear more than once. for example, if you had this in the OBJ file: f 5/5/5 9/9/9 8/8/8 f 7/7/7 6/6/6 8/8/8 f 5/5/5 8/8/8 6/6/6 f 5/5/5 4/4/4 9/9/9 it would list 5th vertex, 9th vertex, 8th vertex, 7th vertex, 6th vertex, 5th vertex, then 4th vertex. Once a vertex is listed it will not appear again so repeated vertex indices are ignored. However, that does not seem to be the case here: f 90/90/90 91/91/90 92/92/90 f 62/62/62 77/77/77 61/61/61 f 77/77/77 79/79/79 61/61/61 f 61/61/61 79/79/79 60/60/60 f 93/93/91 94/94/92 95/95/93 f 96/96/94 97/97/95 95/95/93 f 90/98/96 98/99/97 99/100/98 The vertex at index 90 will appear from 90/90/90 then its repeated when we hit 90/80/96. So I'm thinking maybe its not just unique position index (90) but a combination of position and texture index (90/90/90 and 90/98/96). However, this is not the only case. There are other instances where vertex is repeated. I'm wondering if anyone knows exactly how they are listed and under which cases a vertex is repeated in the "getVerticesData" result. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.