Vertex Blending

Rodéric

a.k.a. Ingenu
Moderator
Veteran
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 ?
 
Dunno why, but I often find a solution a short time after I post...
maybe it's the way to activate my brain to full power ;)

Anyway, I generate a triangle list, with a list of bone affecting it (from the list of bone affecting each vertex).
The artists will need to be carefull with this, only area transition will have many bones affecting them. (and the upper limit will be 4)

Not sure if I'll start with the biggest bone lists and integrate every triangle having this set or subset of it into it, or require that each triangle have the exact same list...
The first would reduce the number of state change, but maybe make the latest state change be made for only a couple of triangles...


If anyone have an idea on how to improve grouping them...
 
Back
Top