skeletal animations and suitable formats

Started by
7 comments, last by lauris71 11 years, 5 months ago
Hello forum,
I want to load models in a format that supports skeletal animations into opengl.

The formats that I problably want to load are: dae (collada) or iqm/ iqe.
I already checked md5 but at the moment I don't care to much about it.

My problems are:
1. I don't want to use libraries like assimp, collada dom, fcollada or opencollada. So were do I find good examples I knew a site called wazim or similar, but I can't find it anymore dry.png
2. I don't know how to parse binary files like iqm/ iqe, are they just zeros and ones? wacko.png

Thank you.
Advertisement
Collada is a very complex format, you really don't want to be loading it manually.

before you try to load a new format and get is displaying, I recommend you get your engine to display hand-made data correctly.

Binary files can be parsed by using fread() (assuming you're using C)
I nearly parsed md5 completly, but than I tought about loading a much easier format like collada.
I am writing in C++ and iqm/ iqe seems to me much more complex than md5.
Here is the link you were talking about:

http://www.wazim.com..._Tutorial_1.htm

In any case, you want to have some sort of asset conditioning pipeline where you take in an interchange format like .dae and bring it into your own runtime format for your game/engine. How your engine manages its content at runtime is another story.

I attempted to go the approach you did and write my own collada parser. I got it working, but it wasn't robust at all. I find the incredible amount of a variance in the .dae format extremely frustrating and ended up switching to using Assimp for my .dae models. It is great. Nice clean interface, very robust, and much faster than my own parser for optimizing vertex indices. I'd recommend attempting to roll your own like I did, once you get it working for just 1 instance of the .dae format you will understand the format so much more and will feel more comfortable transitioning to Assimp.

Here is a fantastic tutorial if you decide to switch to Assimp:

http://ogldev.atspac...tutorial38.html

It also teaches you how to skin on the GPU, instead of the CPU like wazim's.
I totally agree with you, I just want to learn how I can do skeletal animations in OpenGL. And don't start immediately with libraries. So how did you start with you're personal loader? happy.png
Find yourself an XML parser, I used rapidxml from http://rapidxml.sourceforge.net/ , it seemed lightweight, then again I haven't much experience parsing XML files so definately look around yourself, here would be a good starting point: http://stackoverflow.com/questions/170686/best-open-xml-parser-for-c

Definately look at wazim's article for a nice introduction to the .dae file format and how to approach it.
IQM comes with a format description and a sample in C++ that should be enough to implement your own loader.

Format is here: http://lee.fov120.com/iqm/iqm.txt and sample loader is part of development kit that can be downloaded here (http://lee.fov120.com/iqm/).

If you have any particular problem loading IQM format just ask.

Where are we and when are we and who are we?
How many people in how many places at how many times?

I just want to learn how I can do skeletal animations in OpenGL. And don't start immediately with libraries.

That statement is an oxymoron. If you want to learn about OpenGL animations, then you should definitely use a library from somewhere else.

And you should not begin with a loader until you know well enough how the animation is done. The reason is that the data structures required are complicated.
[size=2]Current project: Ephenation.
[size=2]Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/

I nearly parsed md5 completly, but than I tought about loading a much easier format like collada.
I am writing in C++ and iqm/ iqe seems to me much more complex than md5.

MD5 is so much easier to parse than COLLADA. Do you understand that COLLADA is interchange format that is designed to support many very different applications and pipelines? Thus the format is VERY generic - so generic that using it for simple tasks is often overkill.

Have you successfully implemented static mesh loader and renderer? And scene graph wit (animated) hierarchical transformations. You should feel yourself comfortable in transformation matrices before you start doing skeletal animations.
Lauris Kaplinski

First technology demo of my game Shinya is out: http://lauris.kaplinski.com/shinya
Khayyam 3D - a freeware poser and scene builder application: http://khayyam.kaplinski.com/

This topic is closed to new replies.

Advertisement