Jump to content
  • Advertisement
Sign in to follow this  
DocKode

OpenGL skeletal animation?

This topic is 4585 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I recently purchased dave astle's "more opengl game programming" primarily hoping to get information about skeletal animation. turns out that none of the sample code is available for this chapter yet... so basically I'm back at square one... only now I have a better understanding of the work involved. :) From the book i discovered that .ms3d (Milkshape 3d's format) is a decent format for use with skeletal animation. Is there a better format? Or is this format good enough for most people? Also... I still have no demos or sample code to help explain how I might actually implement a skeletal animation system based on the information extracted from a 3d model + it's animation information. I have several artists working in maya, blender, and milkshape 3d. I am hoping to use the .ms3d format simply because every other modeling package can easily export to it, and then the animation can be done with milkshape. I would then like to import the .ms3d files and attempt to animate them. although the truth is that if the animation work could be done in the other packages and exported to milkshape 3d for conversion to the .ms3d format that would be even better. Basically I'm asking for information on where to get my hands on source code, demos. Any and all help would be most appreciated. The first milestone would be loading the .ms3d format, and I suppose the second would be getting it to animate. Thanks in advance for your help, you've never failed me.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
am I asking the wrong questions?

Share this post


Link to post
Share on other sites
Give people time, 2 and a half hours isn't enough. I implemented my ms3d skeletal anim module, in Java, using 2 references. The real soon now skeletal anim tutorial hosted by the very site we're on now, gamedev. Also, chumbalum soft has released a reference implementation on their site: http://www.swissquake.ch/chumbalum-soft/files/MsViewer.zip. Check these out, mish mash the two together and devise a proper animation system yourself, seeing as ms3d doesnt support animation ranges or naming or anything useful like that.

Share this post


Link to post
Share on other sites
Not many master 'skeletal animation' or 'bones animation' as its also called. I learned it in here. check out my old thread:
http://www.gamedev.net/community/forums/topic.asp?topic_id=341121&whichpage=1�

If you have more questions about bones animation you can contact me on msn
jplindberg@hotmail.com

good luck

Share this post


Link to post
Share on other sites
There is also a book called "Focus 3d Models" http://reallylongamazonlink

In here they cover skeletal animation, and using ms3d format. You should check it out. I bought the book used for about $3.


EDIT: clean up link ... way to long and stretched the page.

[Edited by - Nit on December 30, 2005 7:49:39 PM]

Share this post


Link to post
Share on other sites
Thanks you guys are great! I originally started programming this thing in Java, but decided to switch to C++ because I felt that I wasn't get the best control of the OpenGL environment. P.S. switching from Java to c++ isn't as hard as I thought it would be. I still miss some of the great Java features though....

Anyway. I'll check out those two references that you mentioned Optus, and I'm almost positive I'll have questions for ASL. I bought 'More OpenGL Game Programming' and Evan Pipho was one of the included authors, I actually had already seen that book that Nit mentioned but was worried that I wouldn't easily be able to apply the DirectX based code to OpenGL.

---

I am hoping you all can answer a few more questions. If this sounds like it won't work please let me know, or if there is an easier or better way please let me know. Thanks...

I load .obj files, convert them to my own format, and load them into my OpenGL program. If I add the additional structures needed to define animation, could I use my format for skeletal animation?

And if I use my format, I will need to write a tool to allow me to animate meshes and save the animation data to my file format, would this be too difficult to do or just stupid on my part? Basically will it be worth all the trouble I went through.

Also Optus, what do you mean by animation ranges? Is it anything like the number of frames in an animation?

---

Thanks again for all the help! Atleast now I have a great place to start. I don't feel completely lost anymore!

Can't wait to hear from you all about my other questions! :)

Share this post


Link to post
Share on other sites
I strongly surgest you dont start out with making your own format for skeletal animation. If you dont know how to handle bones yet, you are reducing your chances of ever learning it. I know how to handle bones now, but it toke me ages and I was mostly on my own. So few people know bones into depth. Most people use OPC because learning it in details mean having to learn advanced matrix and vector math not to mention quarternion math. If you are a person who cant hold your concentration for long dont get involved with bones!!
BUT if you think you have the mental stamina to keep your concentration for some time, I will gladly help you reach the goal.

Here is what I think you should start with:

1.Choose a format supporting bones (not your own to begin with!!!!!!! You ask if we think it would be stupid! My answer is YES).

2.Find the file-specification of your chosen format on the internet.

3.With the specification in hand, build a writer-program that dumps whats inside a given file. Its a good ways to start. It will give you a good over-view of how a file with bones is build up. (you really dont need this step if you have chosen a text-based format like .x for example)

4. Now you have to read all you can find on the net about quaternion, matrix and vector-math conserning skeletal animation. You need to know how to multiply matrices, how to make matrices of quaternions and vectors and how to interpolate quaternions using SLERP. There are various ways to get to your goal but this is how I do it. Also read about bind-pose matrices, global and local matrices. Read my thread again and again - you dont have to understand it all at once. have patence.

when you hit walls on your way (YOU WILL!) feel free to contact me on msn.=D

again good luck

Share this post


Link to post
Share on other sites
Thank you all again!

I was wanting to start with the .ms3d format, but I'm worried about it not being easily usable in games.

I also checked out the collada format, which i don't think is supported yet by any of my artists.

So I was wondering if there is a format anyone could recommend other than .ms3d or collada. I will use .ms3d if I can't find another format, simply because I have several examples on how to implement it already.

Thanks again in advance, you guys have been real helpful.

Share this post


Link to post
Share on other sites
Quote:
I also checked out the collada format, which i don't think is supported yet by any of my artists.

all main modling programs have exporters for collada

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!