Jump to content

  • Log In with Google      Sign In   
  • Create Account

skeletal animations and suitable formats


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 bigdilliams   Members   -  Reputation: 118

Like
0Likes
Like

Posted 17 November 2012 - 01:11 PM

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 Posted Image
2. I don't know how to parse binary files like iqm/ iqe, are they just zeros and ones? Posted Image

Thank you.

Edited by bigdilliams, 17 November 2012 - 01:14 PM.


Sponsor:

#2 zacaj   Members   -  Reputation: 643

Like
0Likes
Like

Posted 17 November 2012 - 01:21 PM

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)

#3 bigdilliams   Members   -  Reputation: 118

Like
0Likes
Like

Posted 17 November 2012 - 01:40 PM

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, 17 November 2012 - 01:40 PM.


#4 pondwater   Members   -  Reputation: 191

Like
1Likes
Like

Posted 17 November 2012 - 02:31 PM

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, 17 November 2012 - 02:33 PM.


#5 bigdilliams   Members   -  Reputation: 118

Like
0Likes
Like

Posted 17 November 2012 - 02:36 PM

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? Posted Image

#6 pondwater   Members   -  Reputation: 191

Like
0Likes
Like

Posted 17 November 2012 - 03:19 PM

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.

#7 noizex   Members   -  Reputation: 882

Like
0Likes
Like

Posted 17 November 2012 - 04:48 PM

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.

#8 larspensjo   Members   -  Reputation: 1557

Like
0Likes
Like

Posted 18 November 2012 - 10:18 AM

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.
Current project: Ephenation.
Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/

#9 Lauris Kaplinski   Members   -  Reputation: 841

Like
0Likes
Like

Posted 18 November 2012 - 10:45 AM

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/




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS