This Question is about Skinning actually. Lets say we have a model with vertex groups(bones) as a float buffer and we pass it to the shader. is there any way to partial rotate a vertex group? buffer is x,y,z,u,v,n1,n2,n3,boneid,rotfactor . (rotfactor is a float that represents the %amount of rotation we want to apply to this vertex). So if rotate the group with a rotation matrix with angle = 45 , is there any way to rotate each vertex for 45 * rotfactor? Thanks.
Asked
Active
Viewed 603 times
1 Answers
0
This describes in pretty good detail exactly what you're trying to do:
http://www.opengl.org/wiki/Skeletal_Animation
Note this line:
uniform mat4 Bone[10]; //Array of bones that you compute (animate) on the CPU and you upload to the shader
As it implies, you will need to compute a matrix for each bone. You will do this in your application code on the CPU side, i.e. not in the shader. You will then pass these matrices in to the uniform variable Bone
.

rlkw1024
- 6,455
- 1
- 36
- 65