Skip to main content
GameDev.net gamedev.net
🔒 Locked

Skeletal Animation File Format

Started by Guy1524 Jun 1, 2015 at 11:54 PM 6 replies 6.8k views
Original Post
Guy1524
Guy1524

Hey guys, this is my first time posting on gamedev.net so please tell me if I am posting in the wrong place or anything like that. Anyway, I recently read the post by Namethatnobodyelsetook on this thread: http://www.gamedev.net/topic/267412-good-tutorials-on-skeletal-animations/. It is a great tutorial and I have implemented it into my engine. So then I started looking for file formats and choosing which one would be best. I thought it would be easy, but I was wrong. So far the main formats that I have seen are collada and md5. I love md5 except for one important thing. It uses weighted anchor points and the vertices don't have bind pose positions. So I would have to rewrite a lot of code. Do you know of any file format that I could use that supports direct vertex skinning? Also just to be sure, the bones that I should be reading are in local space, right? Thanks in advance!

Buckeye
Buckeye

Welcome to gamedev!




please tell me if I am posting in the wrong place or anything like that

This forum is probably okay for the subject, though there's a specific forum for OpenGL related questions. In general, if you would like responses relating only to OpenGL, that would be a better forum.

Regarding "anything like that" - I suggest you read the Beginner's FAQ. One of the guidelines in the FAQ is, before posting, attempt to find the answer to your questions yourself. It's often much faster to do so. For instance, your question regarding file formats has been asked and answered here on gamedev multiple times. You can search through gamedev posts using the search box in the upper right-hand corner of this page. Also, you mentioned the Collada format, and what's called a Google First Hit for "Collada OpenGL skeletal animation" is a tutorial on skeletal animation in OpenGL using the Collada format - which seems to be exactly what you're asking about.

For importing data from various formats, you may want to look into Assimp, a library that imports data from a variety of formats and returns a structure of data that you can search through to extract data needed. The advantage of such a library is that you can write a single routine to extract data from assimp's aiScene structure, and not get into the particulars of other formats (such as collada, etc.).

Regarding your specific questions:

1. it's not clear what you mean by the phrase "direct vertex skinning."

2. with regard to skeletal animation, a "bone" is really a transformation, AKA reference frame. So, a bone defines a space, most often relative to a parent "bone."

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly. You don't forget how to play when you grow old; you grow old when you forget how to play.
Guy1524
Guy1524

Thanks for your great answer, I was not expecting one so fast!

So what I have learned from this tutorial: http://research.ncl.ac.uk/game/mastersdegree/graphicsforgames/skeletalanimation/Tutorial%209%20-%20Skeletal%20Animation.pdf (Page 3) Is that direct vertex skinning is when you have a model imported where the vertices are in bind pose position and you calculate the bone matrices that directly affect the vertex. There is this other kind of skinning I do not want to use called weighted anchor points where the weights have positions and the vertices don't. My hardware skinning is based off this openGL tutorial: https://www.opengl.org/wiki/Skeletal_Animation

About the bone space, thanks for clearing that up for me. I understand a lot better now. (:

About assimp, I am using light weight java game library which contains openGL natives to create the game so all the c++ libraries I cannot use.

I have found two java ports for assimp, although one is just using natives which I do not like using when it is not necessary and the other can only import from md2.

Buckeye
Buckeye

Did you try to find it elsewhere? E.g., did you try googling for, oh, maybe, something like: "kreationsedge skinning?"

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly. You don't forget how to play when you grow old; you grow old when you forget how to play.
thatguyfromthething
thatguyfromthething

Did you try to find it elsewhere? E.g., did you try googling for, oh, maybe, something like: "kreationsedge skinning?"

i spent hours looking for it on that site for fuck's sake, so don't give me that BS and waste my valuable time and irritate someone who's been registered here for 7 years. That kind of post is not really helpful. If you don't have the info, don't answer. Especially if someone asks a direct question to someone...who is not you. Why are you butting in at all?

Treat people like they are grownups, people like you are why the internet sucks so badly.
This is my thread. There are many threads like it, but this one is mine.
thatguyfromthething
thatguyfromthething
I did find it though finally. I looked through every post on programming tag and a few other tags, turns out it's not tagged at all, but it was linked from the main page in a place I couldn't see because of a browser plugin screwup. here's the direct link, if anyone else is interested: http://kreationsedge.net/?page_id=29
This is my thread. There are many threads like it, but this one is mine.
jeskeca
jeskeca

Many engines read skeletal meshes in their own custom format. MD5Mesh, in fact, is one of those custom formats, it just happens to be simple and public.

In order to get meshes into the custom format, tools outside the game typically read Collada or FBX, and then convert them into game-ready assets in an engine specific format.

Therefore, one way to get skeletal meshes into a "direct vertex skinning" format is to design your own format and write it yourself using an offline tool.

Of course, another option is to modify your vertex skinning code to handle Md5mesh. It's not hard to setup the initial bind pose by applying the bind-pose weights. There are several tutorials about the md5mesh format which explain it. (this is my favorite : http://www.3dgep.com/loading-and-animating-md5-models-with-opengl/ )

If you'd like to look at a C# implementation of Md5Mesh, you can look here: https://github.com/jeske/SimpleScene/tree/skeletal-animation/SimpleScene/Meshes/Skeletal

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.