at the moment i am only trying to influence a simple set of quads(6 in a row), by giving each vertice a weight relevant to each matrice as i want them affected.
I think you are right about the scaling effect!
since i am only using 3 matrices that i have specified manually there is a scale in one of the matrices which is just getting multiplied up /down bt the weights.
the matrices i specified manually are being loaded them into const registers in the vp like this
for (int k = 0; k < 3; ++k)
{
// build the rows...
col[0] = *(bone_ONE + k);
col[1] = *(bone_ONE + 4 + k);
col[2] = *(bone_ONE + 8 + k);
col[3] = *(bone_ONE + 12 + k);
glProgramParameter4fvNV( GL_VERTEX_PROGRAM_NV, 8 + k, col );
}
where bone one is a matrice like this
float bone_ONE[16] = {1,0,0,0, 0,1,0,0,
0,0,1,0,
0,-.2,0,1
};
then reloading them with updated values for each frame.
Im using the following vertex program
// “# We transform the offset by bone one’s tranform”
“DP4 R0.x, c[8], v[OPOS];”
“DP4 R0.y, c[9], v[OPOS];”
“DP4 R0.z, c[10], v[OPOS];”
“DP4 R0.w, c[11], v[OPOS];”
//"# We multiply the transformed offset by the weight"
“MUL R0.xyz, R0, v[WGHT].x;”
//"# We transform the offset by bone two’s tranform"
“DP4 R2.x, c[12], v[OPOS];”
“DP4 R2.y, c[13], v[OPOS];”
“DP4 R2.z, c[14], v[OPOS];”
“DP4 R2.w, c[15], v[OPOS];”
//"# We multiply the transformed offset by the weight"
“MAD R0.xyz, R2, v[WGHT].y, R0;”
where the wights are given by a glVertexAttrib4fNV call
such as this one
glVertexAttrib4fNV(1, 0.75, 0.25, 0, 0);
this isnt very efficent (and i’m not entirely sure its right! if some one might have a look),but i’m tring to understand MPS at a low level as i need to explain it in my thesis!
cheers Devulon for the help.
ps do you (or anyone!) know of any tutorials or even just sample code by any chance that might explain MPS better than NVs example
it just i’m tring to really get to grips with it and want to fully understand it both from my own experiences and from someone elses perspective of it.
[This message has been edited by spiralsmile (edited 02-17-2003).]