Wednesday, 30 December 2009

New Year, new Library

F32 yeah enbiggen

As part of getting ready for my new job, I'm in the process of publishing a lot of the common code that I've been using over the years and I thought why not start a collection. And so the very humble and small PolymonkeyLibs begins.

The first official package is polymonkey.time it features 3 classes that relate to (you guessed it) time.

Time - used for keeping track of TimeDelta (the time in seconds of the previous frame) can also speed up and slow down time.

TimerEvent - A helper class that will automatically call a timerEvent() method in a set number of seconds.

StopWatch - A helper class for timing how long an operation takes.

Docs, Examples and version 001 of the library are in the Download tab of the page above. If you've got questions / problems / requests then send em this way.

Matt Ditton

Disclaimer: Although the internals are as accurate as possible. Everything gets converted to floats or ints when talking to processing. So your mileage my vary. And although it works like a charm I wouldn't use it to run a pacemaker or anything.

Labels: , , ,

Saturday, 12 July 2008

Objloader version 014 up on google code

Now with VBO!

One piece of advice for all who come after me. When dealing with arrays in opengl, remember that the stride of an array IS IN BYTES. That's right F**KING BYTES. One Float is 4 bytes. to get to the second element in a float array you need to skip 4 bytes. Motherfu----.

Seriously I spent about 8 hours on that bug. Just another example of information so common knowledge I knew nothing about it. Opengl you are a fickle mistress.

mattD

Labels: , ,

Saturday, 29 March 2008

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

Labels: , , ,

Tuesday, 11 March 2008

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.

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

ColladaLibrary_003_demo.zip
ColladaLibrary_003_lib.zip
ColladaLibrary_003_src.zip

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.

Labels: , ,

Tuesday, 19 February 2008

Processing Collada Loader version 001

Here it is.

Library
Source
Example

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.
  1. Multiple materials
  2. Multiple geometries.
  3. Cameras
  4. Lights
  5. Splines
  6. 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

Labels: , ,