Sign in to follow this  

OpenGL [Solved]Skeletal Animation + Blender

Recommended Posts

Hello! I am working at my first skeletal animation system and blender exporter. The exporter are nearly finished and I can export, meshes, armatures, bones and animations. I can render the mesh with opengl and glsl and can apply matrices the mesh deforms, but I have problems calculating the right matrices: exported: A(i) = bone.matrix['ARMATURESPACE'] = use the inverse to transform from model space to bone space R (i)= bone.matrix['BONESPACE'] = the rotation of the bone relative to the parent calculated each frame: F(i) = R(0)*..*R(i-1)*R(i) M(i) = F(i)*A(i)^-1 = used to transform the vertices in vertex shader Without animation this works fine and M(i) is the identity matrix and the character is rendered in reference pose. I also export the rotation matrix T for the animations, but I don't know how to add them. Every thing I tried turns out wrong. F(i) = R(0)*..*R(i-1)*R(i)*T(i) The result is that the bones affected with an animation are wrong. Can somebody help me? I noticed that blender and opengl uses different coordination systems. Could this be a problem? SOLVED: It was a problem with the different coordination systems. Solution: Use the matrices from blender, but change y and z coordinate from the vertices. [Edited by - Orchaldir on August 11, 2007 4:07:25 AM]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this