TL;DR: Is there a way to get vertex group names from loaded Models?
Right now I have an idea for a game that will involve basically joining different models based on character parameters.
I would have a “library of body parts” and the models should be composed at load-time, because they can pretty much be any assembly of different parts.
The idea is to have clues from the modelling software embedded on the object data, I was thinking of named vertex groups.
As an example, think about Skyrim. Suppose we have a single Mesh for the torso of all humanoid characters. At the base of the neck we create a vertex group with a known shape, and we name that group something useful, like “Head.Connection”. Now, for the different races, we have just models of the heads with a vertex group with the same name and of the same size, and we sew those together at load time.
I’ve read the dynamic geometry example, which was greatly enlightening towards that goal, but while it modifies the raw vertex data from the geometry, it does not actually assemble different geometry via connections.
The problem is I cannot figure out how to get the vertex group names from the models.
I took a look at the APIs for Model, Geometry and some other classes, trying to figure out if I could grab a vertex group name from it, but could not find that info.
I don’t know if this is a limitation form assimp or Urho’s API.
What I did see was that when exporting from blender to wavefront (.obj) it did list a group (line that was like “o Head.Vertices”), though I might have done something wrong and it didn’t seem to have any vertices within.
Another possibility I was thinking about is using the scene graph to compose the objects, and loading the connection information from a json or xml file. But this would be kind of a pain to do by hand, and it seems like it would not allow for a proper mesh-deforming skeleton, please correct me if I’m wrong here.
Anyway, any insight is greatly appreciated!