[GSoC 2008 - Accepted] OgreCollada

Threads related to Google Summer of Code
User avatar
nanocell
Google Summer of Code Student
Google Summer of Code Student
Posts: 37
Joined: Wed Oct 25, 2006 6:03 pm
Location: Stellenbosch, South Africa.
Contact:

Post by nanocell »

Let the student decide!
Pressure! Pressure! Pressure!
If I were getting upset it would be in capital letters.
Phew!
Can you list deliverables?
Preliminaries are done. I've decided to edit the latest proposal into the first post instead of having to repost it everytime but I'll post just to let everybody know of every major update.

I've added some more info on the DAE Repository at the end of the "OgreCollada Scope for GSoC 2008" section and added a new section "DAE Repository".

I am sticking with my initial choice of using FCollada because, honestly, I don't want to chop and change code in my application everytime a new COLLADA version is released. I'd prefer it to be wrapped by a high level library (my apologies to the folks rooting for the COLLADA DOM API. It's nothing personal :wink: ). I'd rather have FCollada utilise the COLLADA DOM API as a parser (as I have mentioned previously).

Thanks for all the feedback! Let me know if anybody think of anything else!
A programmer is someone who solves a problem that you didn't know you had, in a way that you don't understand.
michaweyel
Gnoblar
Posts: 21
Joined: Thu Dec 21, 2006 3:18 pm
Location: Germany

Post by michaweyel »

Hi all,

Very cool that someone is working on ogreCollada :) In the past few weeks Ive done my own collada importer for Ogre, nothing fancy and still some major bugs, but it works well for our purpose, which was mainly skeletal animation. If anyone's interested, it can be found following the link below, including source and all, plus a simple viewer application.

link

cheers,
-Michael[/url]
User avatar
nanocell
Google Summer of Code Student
Google Summer of Code Student
Posts: 37
Joined: Wed Oct 25, 2006 6:03 pm
Location: Stellenbosch, South Africa.
Contact:

Post by nanocell »

Hey Michael,

Thanks for the contribution. I'm sure it will come in handy. I'm downloading it right now!
A programmer is someone who solves a problem that you didn't know you had, in a way that you don't understand.
michaweyel
Gnoblar
Posts: 21
Joined: Thu Dec 21, 2006 3:18 pm
Location: Germany

Post by michaweyel »

Just noticed that I had a version uploaded which only contained the header files...new one with all the files should be up now :)
Hirni
Gnoblar
Posts: 2
Joined: Mon Nov 06, 2006 11:30 am
Location: Vienna, Austria

Post by Hirni »

michaweyel wrote:Just noticed that I had a version uploaded which only contained the header files...new one with all the files should be up now :)
Hi I just found this thread, what about the 1.4 Importer that is already in the OgreAddons, it can be used as a basis for reimplementation....
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

Some collada related post that you might find interesting, if you don't read or re-read Fcollada forum& patch tracker.

FCollada GenerateTextureTangentBasis: bug/fix
(author blog post with interesting other bug listed in comments here and a nice mixed feeling but sincere collada user 'postmortem')
kex
Google Summer of Code Mentor
Google Summer of Code Mentor
Posts: 49
Joined: Thu May 24, 2007 8:57 am

Post by kex »

michaweyel wrote: In the past few weeks Ive done my own collada importer for Ogre, nothing fancy and still some major bugs, but it works well for our purpose, which was mainly skeletal animation.
Thanks for this! After a short look at your code it seems that you are creating OGRE skeletons but not animations, is this right? OgreCollada supports already creation of skeletons and the main goal for this GSoC is to create animations.

Your converter is licensed under LGPL while OgreCollada is MIT. But as you use COLLADA-DOM and OgreCollada uses FCollada it would not be possible to re-use your code directly, anyway.
Hirni wrote: Hi I just found this thread, what about the 1.4 Importer that is already in the OgreAddons, it can be used as a basis for reimplementation....
We want to impove this project during GSoC.
tuan kuranes wrote: Some collada related post that you might find interesting, if you don't read or re-read Fcollada forum & patch tracker.

FCollada GenerateTextureTangentBasis: bug/fix
(author blog post with interesting other bug listed in comments here and a nice mixed feeling but sincere collada user 'postmortem')
Indeed, a very interesting blog. That comment sounds a bit like xavier to me.
I think we should not worry too much about FCollada bugs. We had already a discussion whether to use it or not. Now we should stick to it. If we encounter bugs which are critical to use, we may contribute to it.

@nanocell
What do you think?
User avatar
nanocell
Google Summer of Code Student
Google Summer of Code Student
Posts: 37
Joined: Wed Oct 25, 2006 6:03 pm
Location: Stellenbosch, South Africa.
Contact:

Post by nanocell »

FCollada GenerateTextureTangentBasis: bug/fix
Hmm. I wasn't aware of this bug. It's just something that needs to be fixed if the bug is still there. Not a trainsmash.

I see that those Blog posts/comments have quite a bit mixed feelings in there. I see that there are mention of developing your own toolset as opposed to using something like FCollada. That's all fine and dandy if you have a nice development team at your disposal. And even if you have a huge dev team then you will still invest lots of time into something that is already done. People's opinions will always differ. I prefer the FCollada toolset route. Cuts down on my development time.

As for FCollada...I'm not sure what amount of activity is currently going on there since the FeelingSoft devs put it up there. I'll get back to you all on this one.
If we encounter bugs which are critical to use, we may contribute to it.
Exactly.
A programmer is someone who solves a problem that you didn't know you had, in a way that you don't understand.
michaweyel
Gnoblar
Posts: 21
Joined: Thu Dec 21, 2006 3:18 pm
Location: Germany

Post by michaweyel »

kex wrote: Thanks for this! After a short look at your code it seems that you are creating OGRE skeletons but not animations, is this right? OgreCollada supports already creation of skeletons and the main goal for this GSoC is to create animations.
Yep, that is true, I am not importing animations. For our project, we only needed the skeleton since we are animating our character with bone transformations from a realtime tracking system.

I wasn't aware that ogreCollada already supported skeletons, i guess I should have had a closer look. But it was fun to do it myself anyway ;)
User avatar
nanocell
Google Summer of Code Student
Google Summer of Code Student
Posts: 37
Joined: Wed Oct 25, 2006 6:03 pm
Location: Stellenbosch, South Africa.
Contact:

Post by nanocell »

I wasn't aware that ogreCollada already supported skeletons, i guess I should have had a closer look.
No problem at all. We always appreciate contributions coming our way :)
But it was fun to do it myself anyway
The way it should be :).
A programmer is someone who solves a problem that you didn't know you had, in a way that you don't understand.
User avatar
nanocell
Google Summer of Code Student
Google Summer of Code Student
Posts: 37
Joined: Wed Oct 25, 2006 6:03 pm
Location: Stellenbosch, South Africa.
Contact:

The future of FCollada

Post by nanocell »

Hi all,

I have received an email from Steve Thomas from Sony who is one of the guys in charge of the ColladaMaya project (www.sf.net/projects/colladamaya). I asked him about the future of the project and he replied with the following:
We are planning on continuing to maintain ColladaMaya (and Max and Motionbuilder) and will be contracting a company to do the maintenance and improvements to the code as well as maintain the sourceforge project. The new contractor has already done quite a bit of work on COLLADA tools for some large companies in Europe, so we think they will be able to do a very good job on this. We expected to have them hired by now, but the legal arrangements are taking a little longer than expected. Hopefully it will be less than a month before everything is fully up and running.

The main reason for the downturn in activity is that, till we have this contractor on-line, we don't have enough people to do proper quality control on releases or submissions.

We would be really happy to have submissions from people out in the community as well...they just can't be properly reviewed till we finish hiring this contractor.
Hurray for Sony!
A programmer is someone who solves a problem that you didn't know you had, in a way that you don't understand.
User avatar
triton
Greenskin
Posts: 138
Joined: Thu Mar 13, 2008 10:25 pm
Location: Portugal

Post by triton »

I was getting worried, but I'm happy now. Thanks for the news. :P
User avatar
nanocell
Google Summer of Code Student
Google Summer of Code Student
Posts: 37
Joined: Wed Oct 25, 2006 6:03 pm
Location: Stellenbosch, South Africa.
Contact:

OgreCollada Homepage

Post by nanocell »

I have set up a home for OgreCollada on sourceforge: http://ogrecollada.sf.net. There is a forum and a wiki. NOTE: The wiki is still a work in progress. Some of the information may still be outdated and probably needs a little bit of reorganising. I mostly copied the stuff from the old wiki.

I mentioned earlier in this thread about changes that was made to the ColladaMaya exporter so that the CG shaders authored in Maya can be directly loaded into Ogre. I have posted a more detailed discussion thereof here:
http://ogrecollada.crazycoder.co.za/for ... hp?f=3&t=2
A programmer is someone who solves a problem that you didn't know you had, in a way that you don't understand.
User avatar
nanocell
Google Summer of Code Student
Google Summer of Code Student
Posts: 37
Joined: Wed Oct 25, 2006 6:03 pm
Location: Stellenbosch, South Africa.
Contact:

Reporting in...

Post by nanocell »

Just an update to let you people know that I am alive and kicking!

I have replace the build system on linux with Premake, updated the local FCollada version from 3.04E (?) to the latest 3.05B.

I found a small issue in the OgreCollada library when loading a skinned mesh. Sometimes the mesh would appear be missing lots of faces/vertices but only when the mesh is skinned. If it was loaded normally without the its skeleton then it would be fine.
This issue has been resolved (and the latest code have been uploaded), although there are still some issues with texture coordinates that still needs sorting out.

I have added a panning functionality for the ColladaViewer (for now the left mouse button can be used for panning). I have also added command-line parameter support for opening documents to the ColladaViewer because I got annoyed opening a document through the menu for the tenth time.

So, most of my time thus far have been spent on infrastructure (wiki, forum, sourceforge, whatever) but now that all of this is out of the way I was finally able to start coding.

Feel free to use the sourceforge patch / bug tracker. I know that OgreCollada still has a heap of bugs but it is still a very young project. Eventually all the bugs will get attention and, hopefully, squashed. ;)

What will I be doing next, besides sleep? I'll be hunting down the texture coordinate issue because I have a vague suspicion that there are still some vertex skinning issues lurking below the surface.
A programmer is someone who solves a problem that you didn't know you had, in a way that you don't understand.
User avatar
triton
Greenskin
Posts: 138
Joined: Thu Mar 13, 2008 10:25 pm
Location: Portugal

Post by triton »

Thanks for the update. Keep doing a nice job! :D
User avatar
stenyak
Kobold
Posts: 39
Joined: Tue Feb 10, 2004 4:53 pm
Location: Spain
x 1
Contact:

Post by stenyak »

Where can i get the plugin, and how usable is it?
Thanks!

Edit: Nevermind, finally found it (it would be nice to have the info on its website, since there are links to deprecated svn repositories in some threads, there's also an old copy of it in the old cvs repo of ogre, but there's no trace of it in the svn, etc.)
User avatar
nanocell
Google Summer of Code Student
Google Summer of Code Student
Posts: 37
Joined: Wed Oct 25, 2006 6:03 pm
Location: Stellenbosch, South Africa.
Contact:

Post by nanocell »

Hi stenyak,

I'm not sure which webpage you visited but regarding this OgreCollada for this years GSoC, the official site is: http://ogrecollada.sf.net. As for the usability of OgreCollada, read the wiki and browse this thread.

Regards,
Van Aarde.
A programmer is someone who solves a problem that you didn't know you had, in a way that you don't understand.
User avatar
stenyak
Kobold
Posts: 39
Joined: Tue Feb 10, 2004 4:53 pm
Location: Spain
x 1
Contact:

Post by stenyak »

nanocell wrote:I'm not sure which webpage you visited but regarding this OgreCollada for this years GSoC, the official site is: http://ogrecollada.sf.net
Desperately googling for a correct url, this is what i found:
Official Ogrecollada wiki: https://ogrecollada.svn.sourceforge.net ... grecollada
OgreAddons svn repo: https://ogreaddons.svn.sourceforge.net/ ... ladaPlugin
Old Ogre cvs repo: http://ogre.cvs.sourceforge.net/ogre/og ... ladaPlugin
Official Collada wiki: http://ogre.cvs.sourceforge.net/ogre/og ... adaPlugin2
This url is mentioned at some place, it's the old sf.net url scheme: http://cvs.sourceforge.net/viewcvs.py/o ... s/COLLADA/
OgreCollada pre-alpha release thread mentions a password-protected one: https://svn.clashofsteel.net:8445/OgreCollada

I think that's about it. Which one should i use? Thanks!

Edit: it looks like there are several ogre projects related to collada? I want to be able to load a .dae file into ogre, just that...
kex
Google Summer of Code Mentor
Google Summer of Code Mentor
Posts: 49
Joined: Thu May 24, 2007 8:57 am

Post by kex »

it looks like there are several ogre projects related to collada? I want to be able to load a .dae file into ogre, just that...
Checkout code form here:
https://ogrecollada.svn.sourceforge.net ... lada/trunk

And follow instructions here:
http://www.ogre3d.org/wiki/index.php/OgreCollada

Note: the wiki article references an old svn repo
User avatar
nanocell
Google Summer of Code Student
Google Summer of Code Student
Posts: 37
Joined: Wed Oct 25, 2006 6:03 pm
Location: Stellenbosch, South Africa.
Contact:

An update, long overdue.

Post by nanocell »

Greetings everybody. Here is an update on OgreCollada, which is long overdue.

I ran into some major issues when trying to extract animation data for different animation clips.

Note: During this post I will be refering to scene nodes. In FCollada a bone and a scene node (a node in a scene graph) is the same thing.

Now, I have been trying every dang approach to this API that I possibly could. And no, FCDSceneNodeTools does not help when working with multiple animation clips, so don't suggest it to me!!! The reason I've been trying so hard to get it working with the existing API is because I didn't want to modify the stock FCollada...but alas.

<tiny_rant>
FeelingSoftware seemed to be in the process of modifying some fundamental approach to loading DAE documents and left FCollada 3.05B in a bit of a sorry state. It seems impossible with this version to determine which scene node belongs to which animation clip.
</tiny_rant>

Fortunately (!!!) v3.05A is able to report which animation curves (retrieved from scene nodes) belongs to which animation clips. v3.05B was missing a large chunk of code (FColladaPlugins/FArchiveXML/FAXAnimationImport.cpp) that was present in v3.05A so, fortunately, by putting that code back fixed the problem.

What this patch does is the following: FCDAnimationCurve::GetClipCount() correctly reports the number of animation clips to which this curve belongs. FCDAnimationCurve::GetClip(int) also correctly returns a pointer to the animation clip.

How to collect the animation curves for a scene node:
Iterate over the scene nodes (FCDSceneNode).
Get the SceneNode's transform (FCDTransform)
Get the Transform's animation track (FCDAnimated)
Iterate over the FCDAnimated's animation curves (FCDAnimationCurve). Use FCDAnimationCurve::GetClip() to retrieve the animation clip to which the current animation curve belongs. The FCDAnimationClip can then be used to seperate the animation curves and then finally create the Ogre animations.

I hope I'm making some sense... (it's 2am in the morning so bear with me if I have totally screwed up this post!).

I hope that the animation clip solution discussed above will carry me through this GSoC. So far every "solution" I have found fell flat on its face as soon as I start using it because the FCollada API doesn't do what its supposed to do.

If I can show some brutal honesty here, I would say that I feel that I made a mistake in choosing FCollada. In theory I'm satisfied with my choice but FeelingSoftware made a bit of a mess with FCollada. But I'll leave my FCollada rants for another day.

OgreCollada repository:
I have created a branch for myself (nanocell) to that I can do all this hacking and experimentation without messing up the trunk. Note that the 'nanocell' branch is not guaranteed to work but there you'll be able to follow my more bleeding edge development.

Regards,
Van Aarde.

--edit--
Oh yes. The next step is to put the animation curve data into ogre animations. Roger Wilco, over and out!
A programmer is someone who solves a problem that you didn't know you had, in a way that you don't understand.
ben81
Gnoblar
Posts: 12
Joined: Sat Jun 21, 2008 9:38 am

Post by ben81 »

Optional (High priority)
---------------------------
* Support Collada files exported from SoftImage XSI's crosswalk exporter.
I regret that Softimage XSI is optional. Actually XSI's users can export only single meshes (exporter is very good by the way) whereas 3ds max and maya users can export .scene. Supporting XSI's Collada make sense for XSI users like me.

XSI seems to have improve their exporter : .dae works now fine with papervision (a flash 3d engine) and SWtranslator (a .dae to vrml/x3d converter).

I'm not a developper so I'm afraid I can not help, but I can provide sample .dae files generated with XSI if it can help ? Thank You and please dont forget XSI :wink:
Last edited by ben81 on Sat Jun 21, 2008 4:12 pm, edited 1 time in total.
User avatar
nanocell
Google Summer of Code Student
Google Summer of Code Student
Posts: 37
Joined: Wed Oct 25, 2006 6:03 pm
Location: Stellenbosch, South Africa.
Contact:

Post by nanocell »

Hi ben81,

I have not looked at the latest version of Crosswalk (XSI's proprietary .dae exporter) they had some annoying issues. The one bug that I reported to them was that they exported animation length as 'frames' instead of 'seconds' as specified by the COLLADA spec.

I would really like to see XSI support in OgreCollada but I can't make any guarantees.

CheerZ,
Van Aarde.
A programmer is someone who solves a problem that you didn't know you had, in a way that you don't understand.
User avatar
nanocell
Google Summer of Code Student
Google Summer of Code Student
Posts: 37
Joined: Wed Oct 25, 2006 6:03 pm
Location: Stellenbosch, South Africa.
Contact:

OgreCollada update

Post by nanocell »

Just an update on the things that I have achieved over the past few weeks:
(Note that this is applicable to the 'nanocell' branch. It will be cleaned up and moved over the trunk somewhere this week.)

* OgreCollada is now compiled against FCollada 3.05b
* FCollada 3.05b have been patched so that the FCDAnimationCurves references the animation clips to which it belongs. The animation clips can be retrieved by its GetClipCount() and GetClip() methods. (I reported this bug on the ColladaMaya sourceforge bugtracker)
* FCollada 3.05b have also been patched to compile on 64bit linux. I have only been able to test this on my PC. I still have to test if it still compiles in 32bit.
* Scene Node animation had to be completely reimplemented to support animation clips but fortunately this work layed the foundation for complex skeletal animations.
* Scene Node animation (tested from Maya) now works (translation, rotation and scaling).

The rotation required a bit of a hack to get it to work but I have a suspicion that there is another bug in the library. This is an issue that I think really needs to be addressed because the current implementation (read: hack) has too much potential for breakage.

But all in all I've made some great breakthroughs over the past few days for which I am very happy.

I'll document all the 'tricks' I've figured out about using FCollada sometime so that everybody may become a bit more informed but not right now.

CheerZ,
Van Aarde.

-edit-
Oh yes! I forgot to mention: I have also added support to load unnamed animations (animations that are in the timeline of the authoring application but not in any animation clips). The unnamed animations are added to an animation clip called "ogrecollada_unnamed_animclip".
Last edited by nanocell on Wed Jun 25, 2008 10:13 am, edited 1 time in total.
A programmer is someone who solves a problem that you didn't know you had, in a way that you don't understand.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: OgreCollada update

Post by xavier »

nanocell wrote: But all in all I've made some great breakthroughs over the past few days for which I am very happy.
I feel your pain, and congratulate you on the progress! :)
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
nanocell
Google Summer of Code Student
Google Summer of Code Student
Posts: 37
Joined: Wed Oct 25, 2006 6:03 pm
Location: Stellenbosch, South Africa.
Contact:

Post by nanocell »

I have just found out that the weird rotations aren't an FCollada bug but rather to do with the way that Maya exports its transformation stack. So my rotation collection method is not quite correct but I'm working on it :).

Just thought I'd let everybody know that it wasn't an FCollada bug at all.
A programmer is someone who solves a problem that you didn't know you had, in a way that you don't understand.
Post Reply