Solved

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

Posted on 2007-04-02
9
352 Views
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.
0
Comment
Question by:CS4LC
  • 4
  • 2
  • 2
9 Comments
 
LVL 1

Expert Comment

by:mcmillanje
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
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
 
LVL 5

Expert Comment

by:thegilb
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.
0
 

Author Comment

by:CS4LC
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?

Thanks.
0
 

Author Comment

by:CS4LC
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).
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Expert Comment

by:mcmillanje
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.
0
 

Author Comment

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

Accepted Solution

by:
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.
0
 

Author Comment

by:CS4LC
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.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now