1
\$\begingroup\$

I have a 3d-models from old game. They have the following structure:

Model {
    List<Vertex> Vertices;
    List<Bone> Bones;
}

Vertex {
    // point
    float x;
    float y;
    float z;
    // normal vector
    float nx;
    float ny;
    float nz;
    // texture
    float u;
    float v;
    // bones info
    byte boneIndex1;
    byte boneIndex2;
    float weight;
}

Bone {
    float[,] matrix = new float[4,4];
}

I want to convert models to any other format that is supported by 3D editors. I learned how to convert a mesh (to obj, fbx). But I can't convert the bones. As I understand it, a 4x4 matrix is ​​enough to form a bone. The role of the bone index is performed by their index in the array. Unfortunately, as I understand it, there is no data on the hierarchy of bones.

I looked at various specifications of file formats, but I did not find one where the bones can be specified as a matrix.

Maybe there are some formats that support such a recording of bones in the form of matrices? Maybe I just misunderstand something and I need to look for something completely different?

\$\endgroup\$
1
  • \$\begingroup\$ Converting matrices to other transformation descriptions is usually not difficult, if you can tell us what specific format you want to convert them to (and what the conventions of the source & destination formats are - which direction each axis points, whether you multiply matrix * vector or vector * matrix...). Inferring hierarchy is more difficult. If your source files don't specify hierarchy, then it's likely that the models in the game either used no hierarchy at all, or that they all used one constant hierarchy. That's something only you can investigate, since we don't know the source. \$\endgroup\$ Commented Dec 29, 2018 at 18:39

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.