• Content count

  • Joined

  • Last visited

Community Reputation

120 Neutral

About princezahee

  • Rank
  1. Skinning Problem

    ***I have updated the thread*** Please view the thread and help me.
  2. Skinning Problem

    I have some problems with skinning. So, here are the steps i have done to perform skinning. Export: - When exported, all vertices are already in the reference pose. - All bone transformations are absolute transformation. (Not relative to parent) - bone offset matrix = inverse (bone transform matrix) - bone matrix = bone matrix * inverse (parent bone matrix) CPU: - bone.transformMatrix = bone matrix (as exported) - Loop through each bone bone.absoluteMatrix = bone.transformMatrix * parentBone.absoluteMatrix - Send bone.absoluteMatrix as the bone matrix to the GPU - Send bone.offsetMatrix (as exported) as the bone offset matrix to the GPU GPU: for each vertex vec4 tempVertex = [0, 0, 0, 0] for each bone influencing this vertex boneMatrix = boneMatrix[this bone] * boneOffsetMatrix[this bone] tempVertex += (vertex * boneMatrix) * weight[this bone on this vertex] tempVertex /= total weight final vertex position = projection Matrix * view matrix * world matrix * tempVertex So, the skinned mesh is not being rendered correctly and i am not being able to spot the problem but i know the problem comes from the matrices. The weights and bone influences are all right. Any1 can help please?