PDA

View Full Version : Skinning



LightMap
02-09-2005, 05:25 AM
http://www.gamedev.ru/images/?id=3445
after assigning SECOND bone to vertex, vertex move in some direction (weights are normalized eq 1)


for(long int i=0;i<all vertices;i++){
SET(AV[i],0,0,0);
for(int g=0;g<all bones assigned to this vertex;g++){
if(m->bi[i][g]<0){
COPY(AV[i],V[i]);
}else{
Matrix TM;
mSET(TM,bm[m->bi[i][g]]);
COPY(tv,md.V[i]);
v3TRANSFORM(tv,TM);
vSCALE(tv,m->sbi[i][g]);
ADD(AV[i],AV[i],tv);
};
};
}; what there wrong :confused: ?
russian version of question (http://www.gamedev.ru/forum/?group=0&topic=14012)