I think I got the theory behind Vertex Blending which is pretty easy, I also think I know how to do it in both DirectGraphics and OpenGL.
However I've a hard time translating modelers data to usefull engine data.
The engine needs groups/joints, which contains a triangle list (3 indices to the vertex array), a bone count, and bonelist (which bones affect the vertices of that group, order matters [cause of the weight array ordering]).
The Modelers file format (in fact I use dotXSI, but I suppose it works like that for most modelers format [checked in 3DSMAX the logic seems the same]), stores a bone list, and for each bone, a list of vertex index and a weight.
I can build a vertex list with both bone indices and weights, however I fail to go much farther.
I tried to build a triangle list, with, for each triangle, a bone list, and maybe group them (but in which order ? [filling biggest groups first, or smallest ?]).
But there might be a problem if a vertex is included into 2 groups (or more), what happens to the weights order and all ?
Could it happen ? Should the vertex be duplicated in order to have one weight list per group ?
Anyone have an idea on how to do that, a tutorial, some code sample, article, link, whatever ?
However I've a hard time translating modelers data to usefull engine data.
The engine needs groups/joints, which contains a triangle list (3 indices to the vertex array), a bone count, and bonelist (which bones affect the vertices of that group, order matters [cause of the weight array ordering]).
The Modelers file format (in fact I use dotXSI, but I suppose it works like that for most modelers format [checked in 3DSMAX the logic seems the same]), stores a bone list, and for each bone, a list of vertex index and a weight.
I can build a vertex list with both bone indices and weights, however I fail to go much farther.
I tried to build a triangle list, with, for each triangle, a bone list, and maybe group them (but in which order ? [filling biggest groups first, or smallest ?]).
But there might be a problem if a vertex is included into 2 groups (or more), what happens to the weights order and all ?
Could it happen ? Should the vertex be duplicated in order to have one weight list per group ?
Anyone have an idea on how to do that, a tutorial, some code sample, article, link, whatever ?