COLLADA and Java

I just wanted to let you know that I’m working on a COLLADA reader in Java as part of my thesis project.

The project is to add support for COLLADA for the company I’m currently working for. I’m using JAXB to build API specific classes and interfaces for the COLLADA schema structure. I’m also using JAXB for XML document parsing and schema validation.

However I must point out that since it’s a thesis project there is not a definite statement that the engine will support collada… Also I’m certain that being discreet about your work is what to be expected when doing a thesis project overall. At least until it’s completly done.

What I have right now is working geometry (triangles only), materials and textures and lightning (point lights right now).
The scenegraph rendering is fully build from collada with nodes, transforms and preserved hierarchy.

I’m using Maya 6.0 to export my scene.

Soon to come is animation (hopefully) and possible CG shader support.

I cannot provide any screenshots but if anyone is interested in writing COLLADA support in their Java application then check out more information on my blog:

There will proberly be other resources there in the feature (if I happen to get time to write them down) on my work with the schema structure, XML schemas, Maya exporter and other stuff.

I’ve written a COLLADA Loader for Java using JAXB. It works with the Xith3D scene graph API, an Open Source Java 3D graphics library that layers on top of Open GL:

You can see a demo here:

In the demo, there are two space shuttles in the opening scene. The shuttle on the left is loaded with a pre-existing OBJ loader. The shuttle on the right is loaded with the COLLADA loader I am developing.

The source code is available but I would not dive into it just yet. Give me another month or so to fix it, clean it up, and make it reusable. I will announce then.

I am learning 3D as I go. I would prefer to do networking code. If you get something up and running that I can use instead, please announce.

I checked it out. Is the source code available as Open Source?

No I’m sorry. Since I’m doing this for a company as part of my thesis project I am writing directly to their engine and cannot release any code. However if I have time in summer then I will develop my own API code to be used with JAXB to provide easier support for third-parties when reading a collada in JAVA.

Question to the research team: Will the COLLADA reader API currently in development support JAVA?

I will proberly have a demo of my work up and running next week. Will announce it here then. :slight_smile:

We are only creating a C++ API from the COLLADA schema. However you create Java bindings with XMLSPY 2005 and probably some other tools as well.

The default JAXB settings work just fine as far as automatically generating an API. This is because the COLLADA XML Schema is written in a way that makes it easy for JAXB to digest it. I tried the same with the X3D XML Schema and JAXB could not handle it.

As far as Java is concerned, the COLLADA XML Schema is the API. This will be even more true when JAXB is distributed with the Java Core. I have heard this might happen in Java 6.0.

See for how to compile collada 1.5 with jaxb.
By default it seems that jaxb is very strict and that the collada xml scheme is not standard conform, but I don’t know much about xml schemes.

I managed get it working and load my collada file but i had to change:
<COLLADA xmlns=“” version=“1.4.0”>
<COLLADA xmlns=“” version=“1.4.0”>

That is invalid!

To be correct, the namespace has to be <COLLADA xmlns=“” version=“1.5.0”>

You cannot mix them up.

Please also note that the 1.4 schema was not written to be as friendly to code generators as we later did with the 1.5 schema (shout out to Boris Kolpackov of Codesynthesis for great feedback on this topic at the time!).