adam Posted October 23, 2015 Share Posted October 23, 2015 Is there a way to export and then access vertex groups? I'm trying to make my character's eye blink and need to be able to easily access the vertices of the eyelid. Edit: Title should have been Blender Exporter and Vertex Groups. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 23, 2015 Share Posted October 23, 2015 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. Quote Link to comment Share on other sites More sharing options...
adam Posted October 24, 2015 Author Share Posted October 24, 2015 I think I can work with that. Thanks Quote Link to comment Share on other sites More sharing options...
adam Posted October 24, 2015 Author Share Posted October 24, 2015 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? Quote Link to comment Share on other sites More sharing options...
adam Posted October 24, 2015 Author Share Posted October 24, 2015 mesh.updateMeshPositions isn't working for me either. I'm probably going to need to make a PG. Quote Link to comment Share on other sites More sharing options...
adam Posted October 24, 2015 Author Share Posted October 24, 2015 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; Quote Link to comment Share on other sites More sharing options...
adam Posted October 24, 2015 Author Share Posted October 24, 2015 I got the vertices to move, but unfortunately the faces don't stay connected to the rest of the mesh. Quote Link to comment Share on other sites More sharing options...
adam Posted October 25, 2015 Author Share Posted October 25, 2015 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.