How do we know the animation states in 3D model formats (especially 3DS)?

I have a student who wants to import free 3D character models for a gaming project.  We can do MD2, but would prefer something more current, and have been looking at 3DS format.  The program is in OpenGL using C++.  We also have 3D Studio.

I'd assume that 3DS models have animation states:  sequences of frames that relate to walking, or running, or crouching, or whatever.  But where do we get this information?  The models don't seem to come with readmes showing this.  Or is it built somehow into the file format?  I have an unofficial file format specification, but it doesn't seem to have this.

We would also be happy to use some other file format, if it's modern, and if it's easier to get information on animation frame sequences, and if we can convert 3DS files to it using 3D Studio.
CS4LCAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mcmillanjeCommented:
I believe the animation is built into the file as a complete set of frames, in other words, it just lists frames 1-the last keyed frame. Being mainly a model/animation format, I don't believe it separates the animation into sequences (crouch, walk, etc...).

What exactly are you looking for? is your class a programming class using c++? i.e. are you making a program, and therefore could use its own format if you wanted?

if so:
you could make models/animations in 3ds and make an exporter script for exactly what you'd want
or:
you could use a nice, simple, text-based format... Which would be easy to export to from a easy-scripting 3d program like blender.
or:
you could use a text file defining 'animation groups' of your .3ds

0
thegilbCommented:
I would recommend MD3 (Quake III) file format. It's pretty current and well documented - especially as the Quake III source code was released a while back.

3DS models do not contain the kind of animation state that you need. Generally this information is 'extra' and it's not uncommon to have several models in the 3ds format and only export animation data to individual files. Often this data is compiled into one larger binary 'archive' of animations for easier handling of the data.

You can't convert 3DS files to MD3 as far as I know, but another alternative may be the Ogre file format ( http://www.ogre3d.org/ ) it's completely open, has all the current features and more importantly contains open source importer / exporter tools for working with the file format.
0
CS4LCAuthor Commented:
What I would like to do is import downloaded models, since we aren't artists!  3DS, or some other format.  I will also look into 3DS-MD3 conversion.

How do people using 3DS do it?  Or is that the wrong question -- do they use other model formats instead, like MD3?

Thanks.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

CS4LCAuthor Commented:
Even when I was doing MD2 (in a text example), I wasn't sure how you knew which frames were for what animation (idling, running, walking, jumping, whatever).
0
mcmillanjeCommented:
you might also check that the downloaded models are even animated, and if so are they animated specifically for games (i.e. they'd have cycles that could be repeated)

most animation formats don't have that data standard as was said, many artists just remember it (i.e. frames 1-150 for walk, 151-200 for run etc...) and hard-code it into their games, or use multiple files. 3dsmax is not a primarily game-oriented package, rather it is set up for animations too (commercials etc...). Therefore, it is unlikely it would even have tools set up to separate animation sequences directly as 'game sequences'


my advice:
Look into OGRE, and check your models! some models you can buy are just that; models. set up for animation, but not animated.
0
CS4LCAuthor Commented:
So which format is best for this, and how do I identify the animation states in it?
0
thegilbCommented:
Hey Venabili and CS4LC I would be happy to close up this question on behalf of the asker. The question I have is what else do they need to know?

In my first response I explained the 3ds format does not contain animation, and further went on to describe 2 other suitable file formats (MD3 and Ogre) which do. Once you look at these file formats it is obvious how the animations are stored in the file, though I will happily provide references if this is necessary.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CS4LCAuthor Commented:
Here are the answers I was able to determine:

MD3 models don't have the animation states stored in the .md3 file, but they can have an associate .cfg file which lists the animation states in this format:

first frame, num frames, looping frames, frames per second // name -- as in

161      17      17      23            // LEGS_WALK

This is from GameTutorials2 (http://www.gametutorials.com/).  Here's an online description:  http://sauerbraten.org/docs/static_wiki/MD3%20Guide.html

MDL models have the animation sequences contained in the same file; I found code from the textbook Focus on 3D Models by Pipho and LaMothe that loads and uses this.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Game Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.