Sign in to follow this  
Eldritch

Tutorial for loading 3ds keyframes

Recommended Posts

Characters in a game are important, and I have reached the critical state where I am to implement these. Therefore, I have been thinking about which format to use. Personally, I would like to be able to load a 3ds model with keyframes and simply call the animations I want to play at any given time. Unable to find any tutorial on how to successfully load these keyframes and use them, I am interested to know if anybody has seen a good tutorial on this, or perhaps have something to share. I would not like to do bones or any of the quake model (MD2 or MD3) files formats due to limited knowledge, though I know how to animate an object using IK in 3D Studio, so a simple 3ds format would suffice.

Share this post


Link to post
Share on other sites
I've been looking at how to load .3ds models for a long time and the only thing that i can't load so far is the keyframe data, because i haven't found any (clear) documentation on keyframe data.

Here are some resources that should help you load the .3DS format. Spacesimulator and The Labs these helped out a lot! If you figure out how to it do be sure to post it up on gamedev.net. :-)

Share this post


Link to post
Share on other sites
I'd recommend looking into ASE format, it's plain text so VERY easy to get data from. But for .3ds there are tons of docs for this. Wotsit site rules, just put "3ds" in as the search terms. The first link I think is source code included. The next two documents I used back in 96 (think it was them) to get keyframe data working. But honestly, look at ASE, much better format imo.

Share this post


Link to post
Share on other sites
I have had major problems with ASE. I used to use that format, and I think it is better to have an ASCII format due to the clarity it gives over the structure, but major problems when loading presented themselves.. especially when trying to load the face indices. It refuses to load the digits as numbers. I have tried loading the entire line as a string and reading it as a string, but it never worked.

I would gladly move back to ASE for many reasons, but I think I'd need to look at how someone else has solved it because I feel my solution is not good enough.

Share this post


Link to post
Share on other sites
I've never tried to load keyframes from 3DS, but sounds like Mike2343 has done it.
The problems I had was done 3ds is not well documented, so I didn't know how to load keyframes or how to get vertex colors.

Keyframes are quite simple. It just another pose of the same model, so all you need to do is "blend" them. You can even store each frame in a different 3ds

You have other file formats to choose from : .x, .milkshape, .ase, .obj (no keyframes)

Quote:

I would not like to do bones or any of the quake model (MD2 or MD3) files formats due to limited knowledge, though I know how to animate an object using IK in 3D Studio, so a simple 3ds format would suffice.


md2 is a nasty format. Go for md3. There are tutorials out there.

www.GameTutorials.com (digiben@gametutorials.com)
"Talk to me like I'm a 3 year old!" Programming Lessons"

digiben was good but the website is down???

How to blend?
====================
You can do it on the CPU.
From pose 0, vertex 0
From pose 1, vertex 0
Blend them with tfactor = 0.6

vertex_0_0 * (vertex_1_0-vertex_0_0) * 0.6 = blended_vertex

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this