Jump to content

Babylon Exporter and Vertex Groups


adam
 Share

Recommended Posts

Using a .babylon file, no, at least not directly.  Neither FileLoader, nor BJS,  support Vertex Groups, so there is no path to export them.

 

That said, BJS does support Submeshes.  If you assign the vertices of the Vertex Group to a separate material on the mesh, then a multi-material will get exported, and a submesh containing the vertex group will be created.  Ease of access wise, you are on your own, but you have got your data across.

Link to comment
Share on other sites

I'm not seeing any change to my model after updating vertex positions.  I saw that the vertexbuffer has updatable = false, so I set _updatable = false, but that didn't work.  What is the correct way to make vertex positions updatable?

Link to comment
Share on other sites

It turns out that some vertices are moving with mesh.updateMeshPositions.  They just aren't the correct vertices.  I'm using the indexStart of the submesh for the first index in the positions array and indexStart + verticesCount for the last index; 

Link to comment
Share on other sites

I finally figured it out.  After getting the values for each of the vertices from the submesh, I need to search the entire vertices array to find every reference to those vertices.  I didn't realize that one vertex in Blender can be inserted into that vertices array multiple times.

Link to comment
Share on other sites

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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...