Jump to content

  • Log In with Google      Sign In   
  • Create Account


Coding Animation of Armature


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 caibbor   Members   -  Reputation: 116

Like
0Likes
Like

Posted 26 February 2013 - 10:38 AM

I've been working on a 3d engine from scratch for a while now. I've got my own model format with an export plugin for blender, and models are importing just fine in game. I'm working with a test model - a Hellknight imported from Doom3 and exported to my own format. The mesh draws as expected in my engine. But now I'm designing animation.

 

Basically, I'm not sure the right way to go about this, either:

 

A.) I'll export the skeleton with each bone pose (in world space, not relative to any other bones) as an array for each frame - even non-key-frames. this way, I can just set bone pos and be done with it. However, this will take lots of memory and more disk space than option B or C.

 

B.) I do the same as above, except export only keyframes, but this time interpolate between bone vertex positions. With this, we'd need more informatiion and processing to do the interpolating so that bones/mesh doesn't deform improperly, since point A to point B would need to be on a curve, not linear. This also would have to be relative to it's parent bone.

 

C.) Same as option B, except bone head/tail positions will be relative to the parent bone's tail position.

 

What's the standard way of doing this in decent game engines?



Sponsor:

#2 caibbor   Members   -  Reputation: 116

Like
0Likes
Like

Posted 27 February 2013 - 01:23 PM

bump


Edited by caibbor, 23 March 2013 - 09:36 AM.


#3 hunpro   Members   -  Reputation: 835

Like
0Likes
Like

Posted 27 February 2013 - 02:21 PM

Old MD2 format does something like you said in B i think.I just did the same thing days ago (exporting with own plugin from Blender into my own engine). I export keyframes only for every bone in bone space, and in the engine i use 'hardware skinning' to do the animation. This means building a matrix tree from interpolating between two keyframes on the cpu. Then upload the matrix list for vertex shader which does the transformations with vertex weights and blendindices. This is pretty standard i think, and with this you can do other effects like IK or ragdoll effects.

Edited by hunpro, 27 February 2013 - 02:25 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS