Page 1 of 2

Collada Animation support

Posted: Wed May 02, 2007 5:52 am
by PJjerry
I am trying to add the functionality for Irrlicht to make it able to parse animation data from the Collada format.

For this purpose, I have two questions:

(1) Is Irrlicht a tri-polygon based engine, or quads works as well? I know eventually the engine would always handling tris, but for the users that would be great he can just focus on the quads manipulation and the engine will do the rest. In short, does Irrlicht support quads?

(2) Currently I wanna focus on skeleton animation first, so I hope to know where can I find the info about how Irrlicht parse the skeleton data. I did check the MS3D loader, but more would be great. Is this the only available resource I can find? It's a binary format so I have to guess a lot.

Collada is a text format so I can know exactly know how the data are handled. I know it's a speed tradeoff, but once I can get the animation parsing works, it won't be a problem to transfer the text file into a binary file that Irrlicht is fimilar with, which would increase the speed loading time.

I am not going to use the X format, which use tris and will cause lots of problem later on. The animation format is also confusing as well. Seems that collada is the way to go. I know it's pretty complicated, but once I can get it, that would be a great plus for the engine.

Thanks in advance.

PJjerry

Posted: Wed May 02, 2007 7:16 am
by Zeuss
1) GFX cards only really push tri's. Quad wills just be pushed as 2 tri's (even if you don't see it), therefore Irrlicht only has triangle indexed buffers. I know artists love their quad modelling :P and you can keep it, just export each quad as 2 triangles.

2) Inless irrlicht 1.3 has change, I personally am not very fond or impressed by irrlichts skeleton/bone support, and have not really made anything with it. You will notice a very distinct lack of Ragdoll demos (there are a few), due to the inaccess to the meshes bone system, and any proper IK and bone hierarchy (that I have seen).

Posted: Wed May 02, 2007 11:18 am
by hybrid
Unfortunately, Direct3D does not support Quads, so there will be some conversion necessary. But for OpenGL, quad support is available. You have to provide a custom render method, though.
There is a new animation system on its way. So either work with the new layout right away, or expect some conversion trouble later on.
I am not really sure what you want to achieve. Do you want to add animation to the current Collada support? It might be a good idea to add support for more recent Collada versions first, before adding new features. For ideas on how to implement animations you might want to look at the b3d scene node. That's the most recently developed node and Luke is heavily involved with the new animation system, too.

Posted: Wed May 02, 2007 12:17 pm
by PJjerry
Yea.. adding support for the more recent Collada versions is what I am trying to do :D

Luke's new animation system makes perfect sense to me. I am checking out a copy from SVN, internet is slow so downloads take forever :shock:

Is the B3D Scene Node in Irrlicht's source, or it's on Luke's new animation system (SVN) ?

Maybe we should name "the animation system" something for easier referring. "Bamboo" ?

Posted: Wed May 02, 2007 2:17 pm
by Luke
Hi,
Luke's new animation system makes perfect sense to me. I am checking out a copy from SVN, internet is slow so downloads take forever Shocked

Is the B3D Scene Node in Irrlicht's source, or it's on Luke's new animation system (SVN) ?
Well, if you look at the Skinned Mesh stuff (the new animation system) on the SVN at:

http://code.google.com/p/irrlicht-plugins/

With the new animation system, the loaders just use a SkinnedMesh class that does all the work (animating the joints/bone control/skinning/blending/transitions/etc) and it's much more unified.

So if you use this, your loader only has to parse the collada file, and dump the data into SkinnedMesh.

But only just been developed, and CB3DMeshLoader.cpp is the only loader that is fully working with it so far (and it's still a bit messy, as it's only just been converted over).

I'll try add a patch on the SVN, hopefully tomorrow, right now it's just the files.
Maybe we should name "the animation system" something for easier referring. "Bamboo" ?
lol, possibly

Posted: Wed May 02, 2007 3:09 pm
by hybrid
PJjerry wrote:Yea.. adding support for the more recent Collada versions is what I am trying to do :D
But adding animation to the current format is different to supporting Collada 1.4 syntax. Right now, Irrlicht only supports the older Collada syntax. So you might consider supporting the new syntax for static meshes first, then try to add animations for one or the other syntax with a more stable animation system.

Posted: Thu May 03, 2007 3:38 am
by PJjerry
Thanks hybrid! Seems that's the way I should go :D

By the way, I have some diffuculty to integrate the files checked out from SVN to the existing 1.3 build. I use Tortoise on Windows XP.

The files could be checked out correctly, but when I tried to use the patch file, some were patched but some weren't.

Is there a SVN tutorial somewhere on the net that can show me the concept how this system works? Console (dos) commands works for me, but of course a GUI is better.

I use Perforce primarily for source control, and seems like SVN is something similar. just kinda confused when should I do what.

Posted: Thu May 03, 2007 7:31 am
by hybrid
You are probably integrating the new animation system into the Irrlicht trunk. This won't work automatically, you have to either patch or manually copy them into the code. Maybe Luke will provide some instructions when the code is stabilized.

Posted: Thu May 03, 2007 7:55 am
by Luke
I just made that patch quickly, so I may not have made it right.

and if your not using the codeblocks project file, then you with have to add the new files into the project you are using.
but when I tried to use the patch file, some were patched but some weren't.
Sorry, I'm not sure what you mean by this

Posted: Fri May 04, 2007 3:45 am
by PJjerry
After some trial and errors, I finally got Bamboo works on my machine...

(1) check out the latest Irrlicht source and include from:
https://svn.sourceforge.net/svnroot/irrlicht/source
https://svn.sourceforge.net/svnroot/irrlicht/include


(2) check out Bamboo from:
http://code.google.com/p/irrlicht-plugins/source

(3) move the two folders gotton from (1) to
(Bamboo)\trunk\scene\meshloaders\SkinnedMesh

(4) apply the patch

(5) I use VS 2003 so I added the following 6 files to the Solution:
CB3DMeshLoader.h
CBoneSceneNode.cpp
CBoneSceneNode.h
CSkinnedMesh.cpp
CSkinnedMesh.h
CB3DMeshLoader.cpp


(6) Compile and it should work.

(7) Time to check into the Collada format now. Wiiiiii~

Posted: Fri May 04, 2007 4:21 am
by Luke
Well, unless I made a mistake (very possible :) )

you should be able to just apply the patch to https://svn.sourceforge.net/svnroot/irrlicht and add the new files to the project you are using.

Posted: Wed Nov 17, 2010 4:48 pm
by PJjerry
Though the thread it's been a while, I would like to clarify does Irrlicht 1.7.1 now support skinned mesh and keyframe-based skeleton animation from Collada (1.4.1) now?

Can the engine correctly parse the collada format from Feeling Software's collada exporter, either in Max or Maya?

Thanks.

Posted: Wed Nov 17, 2010 5:03 pm
by shadowslair
Yep, it looks it`s been a while. ATM I don`t see animated Collada support in the Irrlicht features list yet ( http://irrlicht.sourceforge.net/feature ... tedformats ), only static, please come back later. :D

Seriously, most of the Irrlicht developers seem rather busy recently, so there are not that many features being added, but it`s resonable, because they`re all working for free of good will, so I`m very happy and thankful with all that`s already implemented.

And I don`t quite get what`s so special with the Collada format? Can`t you just import it in Max and export as .b3d for example? :roll:

Posted: Wed Nov 17, 2010 10:20 pm
by Kalango
You could try to integrate ASSIMP with irlicht. ASSIMP is a open source asset importer that handles a lot of formats.
you should try that.

Posted: Wed Nov 17, 2010 10:46 pm
by hybrid
Not possible, because Irrlicht requires the possibility to load from zip files etc. But you can use those tools externally. Collada is a quite complex format, which requires to store many things in order to resolve the references in the last step. This is quite some overhead, so it's usually not suggested to use Collada for in-game data.