View Full Version : Skeletal animation for games..need advice
07-24-2004, 02:15 AM
I am working on a game and we are thinking about switching from keyframe animation to skeletal, which from what i've read is much much better. But I really don't know where to start concerning how I would do it.
Are there any tutorials out there that focus on what an artist would have to do to get things all ready for a game engine?
Even links to tutorials that talk a bit about the programming involved would be helpful.
I know many things would depend on how it is implemented into the engine, but there has to be some basics about it. Like if it is based on bones/skeleton, then do you export a skeleton for the engine? I just don't get how it would work without saving the vertex data in keyframes http://www.gamingartist.com/images/smiles/icon_razz.gif
Any help is appreciated!!
07-25-2004, 02:55 PM
doesn't anyone know anything about this??? Please, I really need some help on how to get started!
Yan Loong Wong
07-26-2004, 06:35 PM
i'm not quite sure if i understand what you mean "about switching from keyframe animation to skeletal". Do u mean trying to set up a character system that uses skinning with skeletons? If that's the case, then you'll need to skin your character mesh with a skeleton, and the engine will need to export all those vertex weight information, and deform your character mesh in realtime.
07-26-2004, 09:43 PM
no no, I mean skeletal animation for a game engine. Instead of saving the model's vertex keyframes.
Yan Loong Wong
07-26-2004, 10:18 PM
The animation data would be in the skeleton(joints) that deforms the mesh, which are usually rotation and position keyframes. You usually keep the animation data separate from the model files that has the character mesh.
The deforming mesh would need to have "weight" information on each vertex regarding to the skeleton it was bind with. They're not "vertex keyframes"(i suppose u mean vertex animation) because it holds information regarding how much influence each joints has on a particular vertex, not the position of the vertex at a particular frame.
Don't know what software u're using, but if u're using 3dsmax, it'll be just like putting on the skin modifier and export all the info from the weight table, along with the deforming mesh and the all the joints. You'll end up with a model file with the skinned mesh and the skeleton, along with vertext weight information on the mesh. Then the game engine can feed the animation data into this base model so it'll deform in real time.
i'm speaking from a game artist perspective, so that must be other ways to do it. Hope i'm not too far in understanding your question.
07-27-2004, 03:08 AM
Hmm...yeah ok, that makes sense. The exporter would take the weighted vertex data and save it in the separate(?) skeleton animation file? So would there be a file for the actual skeleton with animation data, and a separate file for the mesh with vertex weight data?
So that, I could use that skeletal animation data file for more than 1 mesh, as long as it has the same # of vertices? Or would the same # of vertices even matter for this type of animation?
I'm using Blender, but I have used 3d max before so I know how that program works as well.
Yan Loong Wong
07-27-2004, 04:18 AM
hmm..since i'm in the typing mood tonight, let me give u a run down of how a typical game engine might take in skinned character data.
Assuming this is a humanoid character, the artist build the rig, with either the pelvis or another root node on the highest level of the heirachy. You then use this skeleton and skin your desired mesh. (ex. use the Skin or Physique modifier in 3dsmax) You then export this file, both the mesh and the skeleton binded to it, into your game engine format. That file should at least contain the mesh(all the vertex position and color), and the vertex weight information that each joint has on each vertex.(The weight table in Skin Modifier) Most game engine put a limit on the number of joints that can affect each vertex(or mesh) for faster calculation, and i remember reading something like 4 is a standard number of joints for each vertex(or mesh...can't remember). This file will be your model file with no animation data.
You then animate your character in your 3d software by keyframing your humanoid rig(or use mocap data). Then you export this animation data into your game engine, in which it usually contains both position and rotation keyframe info on the highest node, and then just rotational keyframes for the rest of the joints. You then hand these files to the programmers, and somehow they'll figure out how to hook them up in the game engine :)
And to answer your question, yes, keeping the model and animation data separate is quite handy, because you can apply the same animation to different models as long as they've the same rig structure(vertex # doesn't matter, because you're feeding the animation data into the joints that drive the deforming mesh).
hope these helps.
07-28-2004, 01:51 AM
Thank you very much for that explaination, that does clear up a lot :)
But I do have one more question...
You then animate your character in your 3d software by keyframing your humanoid rig(or use mocap data). Then you export this animation data into your game engine, in which it usually contains both position and rotation keyframe info on the highest node, and then just rotational keyframes for the rest of the joints.
Are you exporting just the skeleton here, with no mesh involved on exportation?
Yan Loong Wong
07-28-2004, 05:36 AM
that depends on how your exporter is written. I once worked with an exporter that let u choose to export either the mesh or the animation into separate file format(u can probably call them anything, like Filename.meshData and Filename.animData). The mesh file would contain all the vertext/face/vertex weight/skeleton joints name and their default position&rotations/etc info, and the animation file can be set up so that it list all the joint names and their position/rotation at specific frames. I think the idea is storing these data in separate locations, and have your engine hook them up in real-time.
07-28-2004, 05:57 AM
try searching for cal3d skeletal animation system... may have something u need :thumbsup:
07-29-2004, 01:04 AM
cal3d..one of the programmers did mention that he might use that... ok, well thanks a lot for your help guys! I appreciate it! :)
07-29-2004, 03:34 AM
yeah i've tested it myself... except for some glitches and certain things u have to take note... it's quite a well-built and complete system... try using tt... the developers are pretty helpful too... gd luck! :thumbsup:
Hi, I'm trying to use Cal3D to export a skinned mesh from 3DS Max 6 so that I can import it into my C++ program to animate it. I'm having a lot of trouble setting up any using the max exporter though. Can anyone tell me how to set it up? I have tried both version 10, which has a nice GUI you can use to export, but as soon as I click the export button I get an error, no matter what I put in as my options. Most tutorials also say that there should be an option to export Cal3D skeleton objects by going to file->export, but this isn't there! I have found the setup document for the exporter, but one of the steps is to place a certain file into the max plugin folder. However this file doesn't seem to actually exist! I'm at a complete dead loss, and need to get this model into my program. If anyone can suggest where I am going wrong with this, or has any alternative solution to getting the 3DS Max model that has a skeleton and fully weighted vertices into my own program to animate from there, I'd be very greatful to them!
Thanks for your time
03-11-2005, 01:21 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.