Jump to content

[SOLVED] How to preserve order of vertices from .OBJ file?


Recommended Posts

I have an OBJ that starts like this:

v -212.947922 761.461914 28.203093
v -213.405563 766.404602 28.193245
v -214.460007 771.238403 28.648092
v -214.639648 776.197327 28.477924
v -215.033905 781.149658 28.498495
v -215.717438 786.059753 28.729038

I copied the vertices to an array using mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind)

When I look at vertices[0] I expected to get -212.947922 (the first value in the OBJ file) but it comes up with a value that's somewhere else in the OBJ file.

How can I map a value from getVerticesData() to a location in the OBJ file? So for example a value I get from getVerticesData could be -215.033905 which would map to 12th value in the OBJ file.

Link to post
Share on other sites
  • ozRocker changed the title to [SOLVED] How to preserve order of vertices from .OBJ file?

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...