# kumpaka

Member

14

100 Neutral

• Rank
Member
1. ## Skeletal animation - vertex/bone weight

Hi there, So i've been continuing my pursuit for skeletal animation! Hasn't been a long time since i started, but hard. I got a little understanding of how the structures work and i think i got that ok, also i spent the last couple of days building the code i needed for quaternions, and altough problems will appear im sure, the tests i ran so far worked well(even slerp). My problem now is, even if i have all bones loaded and correctly positioned, and all the vertex information and weights also loaded and linked with the bones. How do i use this information, so that when i rotate a bone for example, it will drag with it, the vertex's associated? Thanks in advance.
2. ## Quaternions

Ok then i got this sorted, ty very much for your help.
3. ## Quaternions

This is making me confused, i tought and it made sense. I was happy i got this out of the way, but now i found this here: http://content.gpwiki.org/index.php/OpenGL:Tutorials:Using_Quaternions_to_represent_rotation#Rotating_vectors They actually normalize the vector they are about to rotate: // Multiplying a quaternion q with a vector v applies the q-rotation to v Vector3 Quaternion::operator* (const Vector3 &vec) const { Vector3 vn(vec); vn.normalise(); Quaternion vecQuat, resQuat; vecQuat.x = vn.x; vecQuat.y = vn.y; vecQuat.z = vn.z; vecQuat.w = 0.0f; resQuat = vecQuat * getConjugate(); resQuat = *this * resQuat; return (Vector3(resQuat.x, resQuat.y, resQuat.z)); }
4. ## Quaternions

I see, that was very helpful indeed thank you. What about the vector i want to rotate? on v' = q . v . conj(q), does 'v' also need to be normalized? Because if it does, wont it alter the result intended? Very sorry if this sound like dumb questions, just started looking at quaternions a few days ago =( You're help is much appreciated.
5. ## Quaternions

Its solved, the math i had on paper was right but not the one on code =( both problems were solved, my vector dot product and vector cross product had mistakes. Thank you. PS: If the vector i want to rotate does not have lenght 1, i need to normalize it? Rotation quaternions, if calculated by that formula are always unit quaternions?
6. ## Quaternions

I started to prove that today on paper(yeah by scalar i meant real part, on book im reading he calls it scalar, on some toturials it's the 'w') and thats what i got, it should be zero i was just afraid i did the math wrong. The examples i try on my code dont end up getting 0 on the real part, means im doing something wrong... need to find out what and correct it, just wanted to be sure i was on the right path. Btw, you say for quaternions that represent rotations |q| = 1, i calculated it, for example with this: alpha = 90º v = (1.0,0.0,0.0) q = [cos(90/2), sin(90/2) * (v)] But it did not result in a normalized quaternion, again the math on my code must be working improperly right? Thank you. PS(before calculating the cos or sin, i convert de degree's to radians)
7. ## Quaternions

Hi there, So I've been working around with quaternions, let me just see if i got this straight: v' = q . v. q^-1 Will get me a new vector with an applied rotation? To do this multiplication we turn v into a quaternion by adding scale with value 0, and from the resulting quat. we can extract the vector value to get the result. But on this new resulting quat, for us to just simply extract the values doesnt the scale of the resulting quaternion need to be 0? Or whatever the value is, we just dont mind and extract the vector values anyways? Thanks in advance.
8. ## Skeletal animations and skinning

I used another model already with an armature not done by myself, but on this one i got the same error but it sucessfully exported the skeleton.xml Heres the thing, on the structure of the mesh.xml theres something like this "<face v1="0" v2="1" v3="2"/>" that defines faces, i still dont know what indexes this values are since the vertex arent identified so im assuming its by the order they are red from the file. When drawing, if i drawed every face as a single triangle it would turn out very heavy i think. If instead i made an algorithm to search in this list for faces that had 2 vertex's wich were the same as the last 2 drawn, i could use triangle strip and save a bit. Would this be bad? also when moving the skeleton according to each vertex weight, would it have a nasty effect using triangle strips? Thanks in advance.
9. ## Skeletal animations and skinning

I just tried exporting from blender but the armature doesnt show up, for what ive looked around it seems to be a problem with the root bone, did you have any problem like this in blender 2.6? Thanks a lot for the help btw, finally feel like im moving forward.
10. ## Skeletal animations and skinning

I can do those things in blender, but then if i export to ogre, and then from ogre to xml, i can load and work with that in my opengl app? that sounds nice! if its a fixed animation i can even do it blender and proceed trough the same steps?
11. ## OpenGL Skeletal animations and skinning

Hi there, Ive been struggling with skeletal animation and skinning now, using this tutorial as reference: http://content.gpwiki.org/index.php/OpenGL:Tutorials:Basic_Bones_System I could get a lot of it to work, but now i started searching about how to skin... I is it possible to define an armature in blender, and also weight the vertex there and somehow use it in my opengl/c++ app? i can now build a skeleton, but i have no clue on how to load a model(obj?) and paint the vertex. Thanks in advance.
12. ## Skeletal animation - blender & opengl

Yes the intention would be to animate in a game engine, but with complicated models i assumed it would be very tricky to assign the weight of the vertex to the bones, so if i could somehow use what was done in blender it would be nice. I really just intend to get some grasp of how skeletal animation is done to be honest. Im going to look around cal3d.
13. ## Skeletal animation - blender & opengl

Thanks, going to check that. But do you think its a viable way of trying to do skeletal animation?
14. ## OpenGL Skeletal animation - blender & opengl

So i've been looking around a lot on this subject and it is quite dificult. What i was thinking, is that, if i can build the armature in blender, and even weight the vertices... isnt there some way to export this information so that i can load the armature into a struct in c++ and work from there? It may be an idiotic question, but im looking everywhere to grasp this subject. At this moment im reading "Computer Animation" by Rick Parent, very good book so far but i need more pratical examples on how to implement skeletal animation in opengl. Thanks in advance!