We’re up on google code

city lights river view

In the last week I’ve been putting the two libraries I’m involved in up on google code. So the OBJLoader and the Collada Loader both have nice safe source controlled homes. Over the coming weeks I’ll be making sure that all documentation and examples are also up on google code.

the OBJLoader
the Collada Loader

Collada Loader 003

The Collada Loader has been updated and now sits at version 003. There are a few new functions involving materials. You can check out the supplied example file for the usage. But here is the list of new stuff.
[cce lang="java"]
model.toggleTexture();
//toggles the texture on and off

model.toggleMaterial();
//toggles the collada material

model.setTexture(PImage);
//replaces the loaded texture with a supplied PImage

model.originalTexture();
//reloads the original texture
[/cce]

ColladaLibrary_003_demo
ColladaLibrary_003_lib
ColladaLibrary_003_src

UPDATE: I’m sorry to say that with the updates to the XML library in processing, the collada loader broke. And broke hard. If anyone would like to help out in fixing this, that would be great. I’m afraid free time is just not happening for me at the moment.

Processing Collada Loader version 001

Here it is.

colladaLoader_001
collada_library_test
Collada_Loader_source_001

So why another format?
Lot’s of reasons but mostly because I needed to load Collada files into processing. The added bonus is that the collada format is far more extendable than the obj format. It can store mesh, splines, cameras, lights, skeletons, skins, animation and even physics. So it’s more a storage medium for 3D data rather than being just a model format.

What can your loader do for me?
At the moment the loader can load and display one model with one material (textured or untextured). There are also several helper functions for drawing the bounding box, vertex normals, face normals and the wire frame. You can see them all in the example above.

Is that it?
In this release, I’m afraid so. There is a lot more work to do. The current todo list (in order) looks like this.

  • Multiple materials
  • Multiple geometries.
  • Cameras
  • Lights
  • Splines
  • Animation
  • So when is it going to be finished?
    Um. I’ll get back to you on that.

    Can you add support for (insert thing here)?
    Yes. It’s meant to be used. If there is something that you need from the loader just ask.

    I broke it.
    Excellent. Drop me and email and I’ll try and get it sorted.

    MattD