Model animation

Started by
14 comments, last by Zaphos 22 years ago
I''m beginning research to make a 3D game, starting in part by spending much time looking over model formats and loading routines. Skeletal animation or something looks the most powerful, but by the explanations I''ve seen it looks all complex. I was wondering whether skeletal would be best, or if it would be fine just to have a model for each movement position, ala an animated sprite or a md2 file? And if I do an md2 file type of animation, should I be using md2 files? Or is it fine to use whatever file format is easiest for me to load and manage, saving a model file for each frame of animation? Or would that be horribly less space / processor effecient? Essentially, I''m just asking for opinions on the easiest way to load and animate a model while still being reasonably effecient.
The question is not "why a talking monkey," but rather, "why not a talking monkey." -Monkey Island 4
Advertisement
linear interpolation..

the results are very smooth, but the memory requirements are large..

check out the dolphin example in the dxsdk, there is a vertex blend example using linear interpolation. hardware blending or vertex shading really makes the interpolation fast at the cost of a memory. but its nothing a modern system cant handle.




{ Stating the obvious never helped any situation !! }
No wait. Linear interpolation (bones, skinning, etc) has small memory requirement. Only one model is in memory. MD2 files, like Quake style, have big memory requirements because so many models are loaded up (one for each frame). LI just has more CPU intensity, which can be taken care of by a good graphics card that supports hardware vertex shading.
While MD2 may require more models, LI requires more transformations. To my (uneducated and fuzzy) mind, the LI technique will also require a fair chunk of memory, but slightly less than MD2-style.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! | Asking Smart Questions | Internet Acronyms ]
Thanks to Kylotan for the idea!


Tualin: wrong.

Linear interpolation is the process of producing intermediate frames from a series of connected key frames. Key frames are the same model snapshotted (is that a word?) over time. Memory requirements are dependent on the model size and number of key frames.

Quake (1, 2 and 3) models use linear interpolation with key frames.

Email me for some MD2/MD3 code.

eb.

[edited by - eagleboy on April 18, 2002 3:31:20 AM]
eagleboy: I am not familiar with tweening, but linear interpolation seems awfully like mapping a spline from some points and then using some matrices to transform the object, this operation would be covered by the CPU, but memory requirements are minimal (store a some matrices and a spline). (Thats what the tweening sample looks like anyway.)

Speaking of memory and CPU, IK/FK is definitely more expensive to use than keyframing, although it''s cool because it''s often less work for the artists and provides a plethora of opportunities for other stuff. Oh and did I say with IK its so much easier you can probably script movements?

-------
"Programming is like sex make one mistake, and you have to support it forever."
Homepage: www.ussshrike.com/pcwebvia/
-------Homepage: http://www.pclx.com
Ok, maybe I have my vocabulary mixed up.

Take the SkinnedMesh example. It has one
mesh loaded in memory, and then a bunch of data structures
holding transformation data (very small in memory). With
it a model position can be interpolated based on time.
While this is a skinned model, based on the bones concept,
would ''linear interpolation'' be the wrong word for this method
of animation? If so, what is the correct term, just ''skinning''?

With only one copy of the model in memory, I would consider this a very small memory footprint compared to MD2 format. Even then, you can add more keyframes with a fraction of what it would take for the MD2 format, plus being time based, it can look more pleasing.
So md2 is easier on the processor but (potentially somewhat slightly) harder on the memory? And looks worse? I imagine it must look okay, because Quake2 used it and that''s a pretty high profile tech-demo sort of game.
I''m pretty sure that, from all the tutorials I''ve seen on Q2 models, that it doesn''t have any linear interpolation in it, but rather a set of "frame" models which can be flipped through to create animation ... much like one would animate a 2D sprite. The common format I''ve seen is to have a render function kinda like this, "Render(int frame)", which doesn''t allow any interpolation, so far as I know.
Perhaps the Q2 engine did interpolation, but people don''t note it in the tutorial because the format doesn''t store interpolation data? I''m not sure how it would interpolate w/out storing interpolation data, though ... so I think it''s probably just that Q2 didn''t have any interpolation in it.

It seems that the reasons for doing an md2 model are for simplicity and to support low end systems.

What kind of system is the lower-end of fast enough to do a SkinnedMesh type deal? If I want a game to run on a low-end PC, maybe 200 to 300 mhz minimum, should I avoid this method?
And are there any good sample code / tutorials for this stuff on the net?

And I''d love to see some .md2 code, eagleboy! Expect to see an email from me shortly =) ... the great tutorial on gamedev gives code that doesn''t appear to be effecient (I don''t think it compiles it''s vertices?), and has a code sample that doesn''t compile (We both use VC++, we both use dx8 ... why wouldn''t it compile?) and is furthermore written in GERMAN. Which is something of a problem.

Thanks, I appreciate the help!
Above is me. Sorry ... my connection was all screwy and I did not mean to do that multi-post thing ... sorry sorry sorry

[edited by - Zaphos on April 18, 2002 8:45:05 AM]
The question is not "why a talking monkey," but rather, "why not a talking monkey." -Monkey Island 4
sorry sorry sorry

[edited by - Zaphos on April 18, 2002 8:45:37 AM]
The question is not "why a talking monkey," but rather, "why not a talking monkey." -Monkey Island 4

This topic is closed to new replies.

Advertisement