Jump to content
  • Advertisement
Sign in to follow this  
bigdilliams

OpenGL skeletal animations and suitable formats

This topic is 2137 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

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. Edited by bigdilliams

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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. Edited by bigdilliams

Share this post


Link to post
Share on other sites
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. Edited by pondwater

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

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!