PDA

View Full Version : skeletal animation using key frames and not algorithms


Hamumu
01-05-2005, 09:57 AM
I didn't want to threadjack, so here's a separate thread for a similar question - I want to make my first fully 3D game. I know the basics, I've done tons of simple tests and things over the years, but there's one thing that I find very very daunting: animated characters. Where do you people all learn about this stuff? I may try just using an engine like torque or ogre (am I the only one who HASN'T bought a torque license?), but I don't want to do the traditional "world built in max or some other editor" thing, but rather a 'tile-based' world (actually blocks instead of tiles, but only stacked a few high). Magic Ball 2 looks *exactly* how I would want my game to look. Recommendations and resources? I can hack together all the other parts, but the character animation is a little off-putting.

Should I try Torque or Ogre and make my own 'landscape' thing? It'd be low-poly enough that I imagine occlusion issues won't really matter much (like Magic Ball). I'm more comfortable doing things with my own paradigms - ideally there must be some engine out there that kinda just lets you plot 'sprites' in 3D space that are animated 3D characters, right? My best idea so far is just to use straight-up OpenGL, which I'm comfortable with, but it means writing the whole animated character thing from scratch, which I am highly uncomfortable with. Maybe a book would solve that.

I threw together a mini-version of this type of thing in Blitz in like an hour, which was nice, except that I will never use Blitz again, because I get unbelievably lost in basic. It's just hideous and unusable - I can't make something more extensive than I did without losing my mind. I need my C. Just wanted to get that in there before somebody recommends Blitz.

svero
01-05-2005, 10:01 AM
I recommend you write a C -> Blitz converter and then put it in MSVC's custom build settings so whe you hit compile it outputs blitz script and compiles the blitz script using blitz in the background. As a bonus you can sell the c converter thingy to people like me that also hate basic.

Linusson
01-05-2005, 10:27 AM
If you want to start learning simple key frame animations (it's really easy), check out GameTutorials.com (http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg5.htm) they've got tutorials on both MD2 and MD3 (quake 2 & 3 format) and they are made with OpenGL.

Then they've got an ASE loader tutorial and that one is really easy to extend to a key-frame animated version using the same techniques as in the quake formats. ASE is a text file so it makes it really easy to figure out the animation parts.

Some more links I had available:
MD2 animations info (http://www.planetquake.com/polycount/cottages/iwow/Quake2/Model_Tut/Animations_Page(fs).html)
More info md2 (http://linux.ucla.edu/%7Ephaethon/q3a/formats/md2-schoenblum.html)
More info about md3 (http://linux.ucla.edu/%7Ephaethon/q3a/formats/md3format.html)
Milkshape 3D Skeleton animation tutorial (http://rsn.gamedev.net/tutorials/ms3danim.asp)

Hamumu
01-05-2005, 10:32 AM
Thanks, this might be good stuff. Tutorials certainly help. The art path from Max is probably going to be the big kicker now!

EpicBoy
01-05-2005, 10:45 AM
I threw together a mini-version of this type of thing in Blitz in like an hour, which was nice, except that I will never use Blitz again, because I get unbelievably lost in basic. It's just hideous and unusable - I can't make something more extensive than I did without losing my mind. I need my C. Just wanted to get that in there before somebody recommends Blitz.
Did you try BlitzMax? I'm just saying ... it's a world of difference from Blitz3D.

Hamumu
01-05-2005, 11:01 AM
Isn't it 2D? And isn't it still basic?

luggage
01-05-2005, 11:30 AM
lol. BlitzMax really is a world of difference to Blitz3D - it's missing a dimension for a start.

Wish they'd pull their finger out and get the PC version done, then the 3D addon.

EpicBoy
01-05-2005, 11:33 AM
You can use any OpenGL command you want. So no, it's not just 2D.

Hamumu
01-05-2005, 11:35 AM
Ah, in that case, I'll stick with PTK - same option, but in C!

EpicBoy
01-05-2005, 11:43 AM
Sure, whatever you like. Just pointing it out...

Dan MacDonald
01-05-2005, 03:09 PM
MD2 and MD3 are the way to go I think. MD2 is probably just fine. It's a very popular format and a TON of editors supuport it. Pick up a copy of milkshape or blender and you'll be good to go.

Linusson
01-05-2005, 03:30 PM
One thing that is really good with MD3 compared to MD2 is that the body is split in a few parts and connected via some tags. This makes it possible to animate the different bodyparts independent of each other. But this brings a few other problems instead.

yanuart
01-05-2005, 08:33 PM
get a book call Real Time Rendering, it's worth every pennies if you're planning on making a 3d game

Omega
01-05-2005, 09:19 PM
BlitzMax for Windows is already available as a beta download for BlitzMax customers who buy the released Mac version, from what I hear.

Buy BlitzMax and just download the Windows version. You'll be weeks ahead of those who actually wait for it to be announced, if you want to so bad :)

Mike D Smith
01-08-2005, 01:08 AM
MD2 just has copies of the model in different poses and then linearly interpolates between those points. This causes some pretty poor inbetweens when the key frames are not close together.

I Use Milkshape 3D to export my models to the Half-life format (HL). The HL format uses skeletons and spherical linear interpolation which give really nice inbetweens and smaller data sizes. Of course it is a bit more computationaly expensive and much more mathematically challenging. However, I do have some code for loading, animating and rendering half life models. You can get the source code to a Half-life model viewer from the Chumbalum Soft web site HERE (http://www.swissquake.ch/chumbalum-soft/hlmv/index.html) and for the MD2 viewer HERE (http://www.swissquake.ch/chumbalum-soft/md2v/index.html). I pretty much just ripped out his GUI stuff and grabbed the parsing and rendering code for the models. I can also send you the source code to my game Caster that has them implemented in C++ with a ton of other special effects.

I don't remember, does MD3 use skeletal spherical linear interpolation or just the old MD2 method?

Hamumu
01-08-2005, 08:25 AM
Somebody pointed out recently that in my haste to copy svero's title, I misspoke - what I wanted was the simplest possible 3D character animation, and the MD2s have it! I've messed around with it, and though I may not use the actual MD2 format (since the exporter I found for it is way too picky), that's the basic thing I'll be doing, and the GameTutorials code for it is super simple to understand. Heck, even if I export out my animations with 100s of keyframes, they'd still be miniscule files compared to my 8-way sprites in the past.

So thanks for all the input, and the Ham3D engine is now under construction.

vjvj
01-13-2005, 11:08 AM
Moving over to morph animations from sprites will definitely save you some memory and make things look much better overall.

At some point in the future I would still suggest giving skeletal animation a look-over though :) The math is a little more complicated, but not really (just recursive matrix multiplies), and there are a lot of benefits... And I don't just mean memory savings. The biggest one IMHO is that the animations are waaaay easier to control/make look good. When you do morph blending, the animations tend to look ass-tastic... Especially if you do any interpolation since it's just a naive interpolation that results in lots of wobbling and warping. In fact you may want to try not doing any interpolation at all and see if it looks any better, because it might.

Best of luck Mikey, and let us know how it works out for ya!
Peter