Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

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

Posted on 2007-04-02
Last Modified: 2013-12-26
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.
Question by:CS4LC
  • 4
  • 2
  • 2

Expert Comment

ID: 18840629
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
you could use a nice, simple, text-based format... Which would be easy to export to from a easy-scripting 3d program like blender.
you could use a text file defining 'animation groups' of your .3ds


Expert Comment

ID: 18842457
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.

Author Comment

ID: 18845231
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?

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Author Comment

ID: 18845328
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).

Expert Comment

ID: 18873871
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.

Author Comment

ID: 18982615
So which format is best for this, and how do I identify the animation states in it?

Accepted Solution

thegilb earned 500 total points
ID: 19170736
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.

Author Comment

ID: 19180188
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.

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question