Original Post
Hi! I'm trying to handle skinned models with joints in my current application. However, I seem to fail to grasp how the position updates to vertices are done based on their weights and the joints they are based upon. I've also tried searching for a good tutorial or article to explain this, though none of those I've found actually gives me a good description of this. It's always some uncommented code-example or similiar that takes hours and hours to figure out and still seem to fail. What I do (which seems to fail) is: I iterate through all my skinclusters, where I iterate through each indice, where an indice is basically a 3-integer where each integer represents a vertice in a list. Each indice describes one triangle. Each vertice contains up to 4 influences. Where each influence is a weight and an integer that points to a joint in a list. So what I do each update is that a vertice's position is: first calculate the position of the vertice multiplied by the world-matrix for each joint that influences that vertice, named P. I then multiply P by its weight. I then take the position of the vertice, and updates it to the current position multiplied by P, for each joint. for each joint influencing vert with world matrix W and weight w: P = vert.pos * W; P = P * w; vert.pos *= P; Though this doesn't seem to work. All help is greatly appriciated. Edit: I thought I might add that some of my vertices gets undefined position values (which in opengl is drawn as 0, 0, 0) Best regard, Simon. [Edited by - simpeman on December 6, 2005 7:53:45 AM]