Skip to main content
gamedev.net
🔒 Locked

Animation using Models

Started by Numsgil Apr 5, 2005 at 4:39 AM 6 replies 1.2k views
Original Post
Numsgil
Numsgil
I understand the basics of 3D programming, and I'd like to move onto models. I've found a few tutorials on loading models into the world, so I'm confidant I can figure that out. But I'm having a harder time figure out what to actually do with those models. How do I animate them? How do I get a walking motion? I obviously need to define some kind of 'frames', but how do I do that? Do I figure out the frames inside the modeling software or my program? Does anyone know of any tutorials on this kind of thing?
[size=2]Darwinbots - [size=2]Artificial life simulation
Phy
Phy
You have to decide what kind of animation you're going to use and what your modeling program supports. Older games like Quake2 used a list of vertices that stored every animation frame into them with where the vertecies are in that frame. All you had to do was render them from the list. Most newer games use skeletal animation where the model has a 'skeleton' made of 'joints' or 'bones'. Every vertex in the model was assigned a bone, and the animations were created by rotating and moving the joints. When it came time to render, you would multiply every vertex by the combined hierarchy of joints in the frame you wanted to render. The most used, that I know of, are matricies and quaternions. To use matrices, you create individual matrices for each joint and them multiply them all together with a vertex for every frame. I don't know a thing about Quaternions, so I can't help you with those. Some newer games are using joint weighting, where a single vertex is bound to different joint's with a set influence. There are tons of ways to go about animating a model, you just have to choose one that matches what you can do with teh tools, and what you want to program.
Numsgil
Numsgil
If most modern games are using bones, I should probably go that route to (this is, after all, a learning process. Might as well learn more modern techniques and work backwards).

What kind of file formats use bones? And does anyone know a good tutorial for loading them in and working with them in OpenGL?
[size=2]Darwinbots - [size=2]Artificial life simulation
winsoft2003
winsoft2003
I know there is a good example in Game Programming Gems 2,which just introduces the way of obtaining model and animation data from 3dmax and rendering them out.Most importantly,the source code is written in OpenGL!
I am a Chinese spare time game developer and I hope to make mores friends to talk about game developing!
Guimo
Guimo
Hi,
If you are using DX, the latest SDKs have tutorials and demos about how to load and display X files with animation.

If you dont want to use X, then you have to read the theory about Skinning.

Luck!
Guimo
Guimo
Guimo
Obviously, if you are using OGL, use the code in a recent article here in Gamedev about how to load and display animation using X files in OGL

Luck!
Numsgil
Numsgil
Is X file format fairly standard? The obvious next question is how to convert into X format from my 3D modeling software, but I'm sure I can find some google resources on that.
[size=2]Darwinbots - [size=2]Artificial life simulation

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.